Another mystery in IJulia

What does this mean? This occurs in a jupyter notebook when I try to use a local package added to my packages with Pkg.develop().

I do using mypkg and the result is:


SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

What’s weird is that the package has been pre-compiled successfully and no packages have changed, been updated, been removed. It is the environment that is active that causes the problem. In one case, the base environment works, But the project environment seems not to work. But, both environments contain almost the same environment. I think the difficulty is that it is impossible for Julia to compile the package in the package’s development environment. Just a theory.

Well, I have to reject my theory. I have run the package in the base project (“@v1.12”) in the project’s own local development directory with that environment. It seems like Julia has to attempt precompile a couple of times and then it is ok.

For each experiment, I restart the kernel and then go cell by cell except when I get to Pkg.activate: there I have a choice of Pkg.activate()–>the base environment. Or Pkg.activate(“.”)–>the project’s own development directory. I only run ONE of these; then using CovidSim_Ilm.

Eventually, when restarting the kernel, I can activate either environment and “using” is successful and everything works. As I said–another mystery. I think Julia seems to treat local packages whcih are developed rather than added as a stepchild with some undefined behavior.

Is it possible to add a local project? Might this work better?

I have been stymied a lot by environments since version 1.11 of Julia.

That’s an IJulia bug:

which shouldn’t affect your usage of whatever package is precompiling.