-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
error with Julia 1.10 when loading packages that trigger precompilation #1089
Comments
+1 on 1.10 beta2! I presume it's the same root cause.
IJulia: 1.24.2 Versioninfo:
|
It seems to be similar to: JuliaLang/julia#28042 I can confirm that the issue is 1.10 beta2. I can run it fine on 1.9 and 1.10 beta1. I haven't had much luck with a reproducible example yet; it's easy to repro with our internal packages, but not with mock ones. |
This seems to be replicable on my machine: generate a random module, eg, ABC/ABC.jl module ABC
greet() = print("Hello World!")
struct A1 end
struct B1 end
greet(::A1) = print("Hello World!")
x(::A1) = "x"
end # module ABC In your script simply have: using StatsPlots # not sure why but it helps to have some complex package there
using ABC
ABC.greet(ABC.A1) If you first open REPL and precompile it, IJulia will work fine. Notes:
EDIT: sometimes the change has to be bigger (eg, introduce a new struct and a new function with a method for it) to trigger the issue EDIT2: For whatever reason, putting this at the top solves the issue??? |
Quick update:
The only workaround so far is to add explicit precompile ( |
It should be fixed by JuliaLang/julia#51397 I believe this issue can be closed |
Suppose I want to load a package, say
TestPkg.jl
with contentIf the package triggers precompilation, then in IJulia with kernel Julia 1.10.0-beta1 I get
The same happens for
import TestPkg
.With command-line Julia 1.10 or IJulia with kernel 1.9 I get the expected result,
I'm using Jupyter Notebook 6.3.0 with IJulia 1.24.2.
EDIT: The problem persists with Julia 1.10.0-beta2. Also, for me it appears even for trivial packages like
TestPkg
above, but only with IJulia: If I create a scripttest.jl
with the lineusing TestPkg
, then bothjulia test.jl
andjulia -L test.jl
work fine ifTestPkg
needs precompilation.The text was updated successfully, but these errors were encountered: