-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix precompilation on latest master #26
Conversation
Use Revise.jl's "trick" that disables __init__() when precompiling. See: timholy/Revise.jl#731
LGTM. |
Does PyPlot.jl need a similar patch? |
Codecov Report
@@ Coverage Diff @@
## main #26 +/- ##
=======================================
Coverage ? 17.33%
=======================================
Files ? 5
Lines ? 450
Branches ? 0
=======================================
Hits ? 78
Misses ? 372
Partials ? 0 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
So people can not use this package at top-level now when they precompile their package? What if they want to precompile some workload that plots something with PythonCall? |
Indeed that is the issue I am facing with Plots.jl now |
I guess you could manually call |
I'm getting segfaults either way, for now I have to put an upper bound on PythonPlot |
Yeah well, this causes trouble for |
Towards a better fix: Lines 6 to 16 in fe588f4
I think creation of these kinds of globals must be deferred until the first call to a plotting function. @stevengj - any thoughts on why it's currently set up this way, and whether it serves us in more recent Julia versions?
Agree, personally. Some thought is needed, but my short-term fix seems like it will not suffice. |
Use Revise.jl's "trick" that disables
__init__()
when precompiling.See: timholy/Revise.jl#731
May not be the most idiomatic or best fix in the long term; perhaps the first call to a
PythonPlot
function could initialize the backend instead?May or may not be related to #25 .