Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrecompilableError thrown outside of __precompile__(false) cases #51299

Open
IanButterworth opened this issue Sep 13, 2023 · 0 comments
Open
Labels
compiler:precompilation Precompilation of modules

Comments

@IanButterworth
Copy link
Sponsor Member

IanButterworth commented Sep 13, 2023

PrecompilableError is reserved for when packages use __precompile__(false) which seems quite rare in the ecosystem now.

julia/base/loading.jl

Lines 1688 to 1692 in 7b88c58

# we throw PrecompilableError when a module doesn't want to be precompiled
struct PrecompilableError <: Exception end
function show(io::IO, ex::PrecompilableError)
print(io, "Declaring __precompile__(false) is not allowed in files that are being precompiled.")
end

However it can also get thrown when the package cache gets into a bad state.

This means Pkg.precompile can't handle these cases properly (marked here with ?)

Precompiling project...
  Progress [=====================================>   ]  99/108
  ✓ Revise
  ? Symbolics
  ? DiffEqBase → DiffEqBaseUnitfulExt
  ? SteadyStateDiffEq
  ◐ NonlinearSolve

In the case above it was also reported that simply restarting the session fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

No branches or pull requests

2 participants