Skip to content

Conversation

@KristofferC
Copy link
Member

The previous strategy was to import all loaded packages into the "PrecompileStagingArea" and then execute the precompile statements. Here, I instead try to execute the precompile statement and if this throws an UndefVarError I try import that symbol from the loaded modules. If there exist multiple loaded modules with that name, we ignore the statement.

As a future improvement to ignoring the precompile statement could be to try executeing it with the different modules with the same name, one by one, until we manage to execute something that works.

Fixes #798
Fixes #767

With this PR I can precompile a sysimage of OmniPackage.jl which didn't work before.

@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

Merging #805 (8ad085d) into master (696064c) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #805   +/-   ##
=======================================
  Coverage   82.98%   82.98%           
=======================================
  Files           3        3           
  Lines         670      670           
=======================================
  Hits          556      556           
  Misses        114      114           
Impacted Files Coverage Δ
src/PackageCompiler.jl 92.99% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

Reenable ignored precompile statements on julia 1.9+ Precompile stage doesn't support packages with the same names and different uuids

1 participant