Add flexible source-free load remap regression test#2
Merged
Conversation
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.
What this locks in
Adds
test/test_flexible_load.jl: an end-to-end regression for the flexiblesource-free load that
remap!+load_package_imageexist to enable —loading a precompiled package image whose dependency has since been rebuilt
under a new build-id, by rewriting the recorded build-id so the image
relinks against the new dependency at load time, with no source.
The test builds its own two trivial packages (
User -> Dep) in an isolatedtemp depot (never touches
~/.julia), precompilesDep@v1+User, stashesthe images, then perturbs
Depand recompiles toDep@v2. It then runs fourscenarios, each in a separate
juliachild process (two builds of the samemodule name cannot coexist in one process):
Useragainst theDepit was built with →User.hello() == "User sees: Dep v1".UseragainstDep@v2→ clean failure inresolve_dep(Cannot resolve dependency: module 'Dep' ... not found), nocrash, no spurious load.
User's recordedDepbuild-id toDep@v2in both the
.so(read by the C restore step) and the.jiheader (readby
resolve_dep), then load source-free → loads and relinks:User.hello() == "User sees: Dep v2".crash, no spurious load).
Notes
bundle or
JSD_FIXTURE_DEPOT.@test_skipwhen a split.sopackage image cannot beproduced (no C toolchain, or the build otherwise fails) instead of failing.
JULIA_DEPOT_PATHand a stdlib-onlyload path; the user depot is never written.
src/.Result
Full suite green locally on Julia 1.12.6 (
Pkg.test()): 198 Pass, 0 Fail,with the round-trip actually exercised (not skipped).
🤖 Generated with Claude Code