Skip to content

WIP: fix create_distribution CI#1091

Draft
asinghvi17 wants to merge 18 commits intoJuliaLang:masterfrom
asinghvi17:as/devel
Draft

WIP: fix create_distribution CI#1091
asinghvi17 wants to merge 18 commits intoJuliaLang:masterfrom
asinghvi17:as/devel

Conversation

@asinghvi17
Copy link
Copy Markdown
Contributor

Summary

  • Work in progress to fix create_distribution CI issues

Test plan

  • CI passes for create_distribution tests

🤖 Generated with Claude Code

KristofferC and others added 17 commits November 19, 2025 13:46
this creates basically a new julia "distribution" with a custom set of packages in it.

Right now:

- packages get added to the sysimage
- packages are treated as stdlib so they can be loaded via `using Package` without a corresponding project file
- packages are also treated as stdlibs by Pkg
- packages source code is not copied, shims are added so that Pkg will properly treat it as an stdlib
Addresses review feedback from @bauglir: allow copy_globs elements to be
anything Glob.glob accepts (String, GlobMatch, Vector of matchers including
FilenameMatch, Regex, etc.) instead of only String. This enables
case-insensitive matching via e.g. `[[fn"license*"i]]`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bundle_artifacts had two bugs that caused it to ignore artifact overrides:

1. UUID-based overrides were never processed because _collect_artifacts
   and bundle_artifacts called select_downloadable_artifacts without
   pkg_uuid, so process_overrides was never invoked to convert UUID-based
   entries into hash lookups.

2. The copy loop used basename(artifact_path) as the destination directory
   name. For overridden artifacts the path is something like
   /tmp/bzip2_override, so basename gives "bzip2_override" instead of the
   hash. The distribution's Artifacts.toml still references the original
   hash, so the artifact wasn't found at runtime.

Fix by:
- Threading pkg_uuid through _collect_artifacts and bundle_artifacts
- Storing the artifact hash alongside the resolved path and using it
  directly in the copy loop instead of basename

Add a test that sets up a UUID-based override with a marker file and
verifies bundle_artifacts copies the overridden content under the correct
hash directory name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Skip create_distribution test on Julia 1.10 (no Precompilation module)
- Make precompile_stdlibs version-compatible: try Base.Precompilation
  (1.12+), fall back to importing the stdlib (1.11), skip gracefully (1.10)
- Relax nthreads test to accept 3 or 4 (Julia 1.13 pre-release reports 4
  due to interactive thread pool changes)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The skip keyword for @testset was only added in Julia 1.11, so it's
silently ignored on 1.10, causing create_distribution to still run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve conflict in test/runtests.jl: keep regex nthreads check [34]
which handles both Julia <1.12 (3 threads) and >=1.12 (4 threads).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 83.47826% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.05%. Comparing base (bfa5939) to head (95bcffe).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/PackageCompiler.jl 83.47% 38 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1091      +/-   ##
==========================================
- Coverage   85.36%   85.05%   -0.32%     
==========================================
  Files           3        3              
  Lines         827     1037     +210     
==========================================
+ Hits          706      882     +176     
- Misses        121      155      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The test was inheriting JULIA_DEPOT_PATH from the test harness
(set to a temp dir at runtests.jl:13), causing the distribution's
Julia binary to look for artifacts in the wrong depot instead of
its own <BINDIR>/../share/julia/artifacts/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants