Reproducible workspace#163
Open
PatrickHaecker wants to merge 1 commit into
Open
Conversation
`compile_products` previously copied the entire project tree into a temporary directory so `Pkg.instantiate` could write a manifest even when the source was read-only. That copy is harmful because it kills reproducibility: - An app which is part of a workspace loses its Manifest by the copy. - Therefore, the `instantiate` will be a `resolve` (already bad because any version changes can happen within the compatible set). But as the source entries from the top-level project are missing, too, it will in general also resolve to totally different branches from different URLs (very bad!). This PR : - Resolve the manifest in place. If no manifest applies and the directory is read-only, error out instead of silently resolving into a throwaway, non-reproducible manifest. - Inject HostCPUFeatures' `freeze_cpu_target` preference through a throwaway load-path overlay environment rather than writing a `LocalPreferences.toml` into the project. A leading empty JULIA_LOAD_PATH entry expands to Julia's default load path, so JuliaC no longer hardcodes it. - Drop the now-unused `TOML` and `Preferences` imports. - Add WorkspaceProject test fixtures and cover the in-place workspace-member build. This PR is ideally combined with [Pkg.jl#4713](JuliaLang/Pkg.jl#4713) Claude Opus 4.8 helped in creating this PR.
PatrickHaecker
force-pushed
the
reproducible_workspace
branch
from
July 7, 2026 02:23
3ba122d to
798083c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
compile_productspreviously copied the entire project tree into atemporary directory so
Pkg.instantiatecould write a manifest even whenthe source was read-only. That copy is harmful because it kills reproducibility:
instantiatewill be aresolve(already bad becauseany version changes can happen within the compatible set). But as
the source entries from the top-level project are missing, too, it will
in general also resolve to totally different branches from different
URLs (very bad!).
This PR :
read-only, error out instead of silently resolving into a throwaway,
non-reproducible manifest.
freeze_cpu_targetpreference through a throwawayload-path overlay environment rather than writing a
LocalPreferences.tomlinto the project. A leading empty JULIA_LOAD_PATH entry expands to Julia's
default load path, so JuliaC no longer hardcodes it.
TOMLandPreferencesimports.build.
This PR is ideally combined with Pkg.jl#4713
This PR builds on #117 just because I was too lazy to create yet another branch.We should really get the number of open PRs containing bugfixes down.
#117 has been merged and I rebased #163 on
main. Thanks, @gbaraldi!Claude Opus 4.8 helped in creating this PR.