Open nilshg opened 3 years ago
My hope is that Pluto simply wraps around Pkg, and the Pkg - together with the packages themselves - is responsible for making everything download, build and run correctly. This seems to work well for almost all packages, except Plots.
We could check for notebooks that import Plots and print that error message, and then call Pkg.build( "GR")
. But why doesn't Plots do this automatically? It seems silly that we would have to create a workaround. I definitely don't feel motivated to do it ☹️
If this situation comes up with another package, then we have more reason to invest in a more general "rebuild and rerun" system.
I'm sorry that this is a super unhelpful issue, but as reproducing this requires a "fresh" Julia install I haven't been able to actually create an MWE.
I recently shared a notebook that used Pluto's package manager with a colleague. My instructions to him were to just do
Pkg.add("Pluto", version = 0.15); Pluto.run()
at the REPL and then open the notebook, which he did. Unfortunately, Plots failed to precompile, with the errorNow I've seen this a few times and indeed it's easy to fix with
build GR
, but of course it requires some sophistication on the part of the user to figure this out. In my case, the solution was to change my replication instructions toPkg.add("Plots")
first, then add Pluto - this way precompilation of Plots happens prior to starting Pluto, and (for another colleague) everything went smoothly.While I appreciate that this issue will be hard to address given that Plots precompilation can be a bit... unpredictable, I hope it can at least serve as a starting point for thinking about how these types of issues can be dealt with in general, now that package management in notebooks happens "automagically".