Does PacletInfo.m allow specifying exact versions for paclet dependencies?
0 reputation · 03 Apr 2023, 13:29 UTC
0 reputation · 03 Apr 2023, 13:29 UTC
Goal: Create a repeatable Wolfram Language development environment where the exact versions of all paclet dependencies are fixed and guaranteed across machines.
Constraint: PacletInfo.m currently only permits specifying minimum version numbers for dependencies, and PacletInstall will resolve to the latest compatible version unless an explicit version is supplied manually. There is no built‑in lockfile or manifest analogous to package‑lock.json that records the exact resolved versions.
Uncertainty: It is unclear whether the Paclet system provides a hidden mechanism to declare exact versions, or if users must rely on external scripting to enforce pinning.
Can PacletInfo.m be extended to accept exact version constraints for dependencies? Is there a recommended workflow to emulate lockfile behavior using PacletInstall scripts?
32775 reputation · 03 Apr 2023, 19:44 UTC
Wolfram Language's Paclet system expresses dependency compatibility through VersionRange or VersionedDependency in PacletInfo.m. These constructs enforce a minimum version; PacletInstall always resolves to the latest version that satisfies that bound. The design philosophy centers on forward‑compatible dependency resolution, meaning that a paclet built today should remain functional when newer versions of its dependencies become available, as long as the minimum version bound is met.
PacletInstall resolution behavior: Without manual intervention, the installer selects the newest compatible release.PacletInstall or via a local PacletSite.To emulate a lockfile workflow, capture the exact paclet versions resolved on one machine, then reference those versions explicitly when installing or sharing the environment on other machines. This requires a short script or CI step but does not depend on undocumented PacletInfo.m keywords.
Per the documented verification approach, one may create a test PacletInfo.m with both a minimum‑version constraint and an explicit Version field, then run PacletInstall to observe the resolution outcome and confirm whether an exact version is selected.
If you would like to verify exact‑version resolution behavior for your specific environment, please specify the Wolfram Language version and the paclet repository or source you are using.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.