A similar problem has been discussed here, but I think this is subtly different:
Say I have a project with the following simple Project.toml after running
add Catwalk in the current Project:
[deps] Catwalk = "860e6890-8a08-4313-9643-fcac6eb69798"
and I have NOT installed the package in my global @v1.6 environment.
If I then run:
julia --project -p2 -e 'using Catwalk'
ERROR: On worker 2: ArgumentError: Package Catwalk [860e6890-8a08-4313-9643-fcac6eb69798] is required but does not seem to be installed: - Run `Pkg.instantiate()` to install all recorded dependencies. ...
Everything works fine when running
julia --project -e 'using Catwalk'. And if I add the dependency in the @v1.6 environment,
julia --project -p2 -e 'using Catwalk' works fine as well.
This is not as I expected, since I did not run
@everywere using Catwalk and I thought the master process should have access to the current project environment.
Is this expected behaviour? Is there any way to get around this? I would prefer to be able to deploy only my project without touching the global environment.