Skip to content

Conversation

@KristofferC
Copy link
Member

@KristofferC KristofferC commented Nov 19, 2025

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 stdlibs so they can be loaded via using Package without a corresponding project file
  • packages are also treated as stdlibs by Pkg
  • package's source code is not copied, shims are added so that Pkg will properly treat it as an stdlib

TODO:

  • test
  • see how extensions are treated

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
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 0% with 64 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.86%. Comparing base (c1e37c4) to head (4cc409b).

Files with missing lines Patch % Lines
src/PackageCompiler.jl 0.00% 64 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1073      +/-   ##
==========================================
- Coverage   86.21%   79.86%   -6.35%     
==========================================
  Files           3        3              
  Lines         805      869      +64     
==========================================
  Hits          694      694              
- Misses        111      175      +64     

☔ 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.

Comment on lines +1016 to +1018
- `copy_globs::Vector{String}=String[]`: Glob patterns for copying package files to the stdlib directory.
Patterns are relative to each package root and apply to all packages in the distribution.
Example: `["assets/**", "data/**"]` copies assets and data directories for all packages.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When specifying globs, if one forgets to include "src/**", you end up with a distribution that does not work because none of the packages can be loaded. I'm not 100% sure if this is true in general, but in my testing when I messed this up nothing would work.

I'm wondering if making the stub generation conditional on whether the src folder was copied over. That way there is no extra configuration to be done, although I guess there could be an argument to explicitly disable it, and when someone forgets to add "src/**" to the globs the distribution still ends up working.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the stub generation is even conditional on whether the package entrypoint is already in the target location or not.

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