Skip to content

Manually pass --check-bounds=yes to Pkg.test()#301

Merged
maleadt merged 1 commit intomasterfrom
dpa/bounds-check
Jan 19, 2026
Merged

Manually pass --check-bounds=yes to Pkg.test()#301
maleadt merged 1 commit intomasterfrom
dpa/bounds-check

Conversation

@DilumAluthge
Copy link
Copy Markdown
Member

Needed after JuliaLang/Pkg.jl#4494.

@DilumAluthge
Copy link
Copy Markdown
Member Author

Woo-hoo, all green CI!

@KristofferC
Copy link
Copy Markdown
Contributor

KristofferC commented Jan 16, 2026

Is all precompilation done by PkgEval so that it also runs with this option? So that the precompile files are valid.

@DilumAluthge
Copy link
Copy Markdown
Member Author

Indeed. We pass --check-bounds=yes when precompiling:

# we load the package in a session mimicking Pkg's sandbox,
# because that's what we previously precompiled the package for.
println("Loading $(pkg.name)...")
run(```$(Base.julia_cmd())
--check-bounds=yes
--inline=$(Bool(Base.JLOptions().can_inline) ? "yes" : "no")
$(julia_args)
-e $("using $(pkg.name)")```)

The PkgEval test suite includes a regression test for this:

PkgEval.jl/test/runtests.jl

Lines 176 to 178 in 8fa8397

# make sure we only generated one package image
@test isdir(compilecache)
@test length(filter(endswith(".so"), readdir(compilecache))) == 1

If we only find one pkgimage, then that means we were able to use the same pkgimage for both the load (precompile) and test goals.

@maleadt maleadt merged commit 2d563f1 into master Jan 19, 2026
6 checks passed
@maleadt maleadt deleted the dpa/bounds-check branch January 19, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants