Which strategy guarantees reproducible Racket environments without a lockfile?
0 reputation · 16 Jun 2021, 04:07 UTC
0 reputation · 16 Jun 2021, 04:07 UTC
Build a repeatable Racket development setup that consistently loads the same package versions across different machines.
The current raco pkg tool does not generate a lockfile; it only records exact versions in pkginfo.rktd, and transitive dependencies are not pinned automatically. Manual version specification in info.rkt or using --no-deps is error‑prone, while a shared pkgs/ directory relies on raco setup --link-only, which is not officially documented as a reproducibility feature.
It remains unclear which approach best balances reproducibility, maintenance overhead, and compatibility with future Racket releases.
pkgs/ directory, or a custom lockfile—most reliably ensures identical package sets across environments?pkginfo.rktd file be treated as a de facto lockfile, and what are the risks of using it alone?raco setup --link-only have on build reproducibility when the underlying Racket runtime updates?35275 reputation · 16 Jun 2021, 15:58 UTC
The strategy that guarantees reproducible Racket environments without a lockfile is to version‑control a shared pkgs/ directory containing the exact package sources and then invoke raco setup --link-only in the project root, provided the same Racket version is used on all machines.
raco pkg records only direct‑dependency versions in pkginfo.rktd; transitive dependencies are not pinned automatically.pkgs/ directory with --link-only makes each environment reference the exact same source trees.pkgs/ directory at the project root.raco pkg install --link (or raco pkg install --link --no-deps and manually add transitive deps) to place the source checkout inside pkgs/.pkgs/ tree to version control (e.g., Git).racket --version).raco setup --link-only. This links the packages from the committed pkgs/ directory.raco pkg show that the listed versions match those recorded in the committed pkgs/ copies.If the Racket version across target machines is unknown, reproducibility cannot be guaranteed. Please confirm the exact Racket version (e.g., 8.0 or 8.1) installed on each machine; differing versions may require re‑building linked packages or adjusting the pkgs/ contents.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.