I’m trying to add package dedendency to newly generated package environment, and if that depencency was not added to my main julia environment, using new package from main environment fails to precompile it. (Windows 10, Julia 1.2)
Steps to reproduce:
-
In REPL:
]generate MyPkg
]activate MyPkg
]add LazyArrays
(or any other package instead of LazyArrays that you did NOT added earlier to your main environment) -
Add
using LazyArrays
to src\MyPkg.jl -
In REPL:
]instantiate
using MyPkg
- at this point, using package from its own environment works fine. -
Restart Julia.
-
In REPL:
using MyPkg
ERROR: LoadError: ArgumentError: Package LazyArrays [5078a376-72f3-5289-bfd5-ec5146d43c02] is required but does not seem to be installed:
– RunPkg.instantiate()
to install all recorded dependencies.
- Trying to
]instantiate
from main environment doesn’t help. But if I]activate MyPkg
andusing MyPkg
from its own environment, all looks fine.
Being able to use a new package only from its own environment seems strange to me. Also, there are no errors when adding packages already added to main environment.