I am trying to create a new PR for a package (Catalyst) that adds a dependency (MetaGraphs). I run ]dev Catalyst, and add some code under “.julia/dev/Catalyst/src”, this includes using MetaGraphs.
I then create a new julia Script in a new environment (ensuring that the output from ]status
includes [479239e8] Catalyst v12.3.0~/.julia/dev/Catalyst`
I then try using Catalyst, but get an error:
[ Info: Precompiling Catalyst [479239e8-5488-4da2-87a7-35f2df7eef83]
ERROR: LoadError: ArgumentError: Package Catalyst does not have MetaGraphs in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
to ensure all packages in the environment are installed.
- Or, if you have Catalyst checked out for development and have
added MetaGraphs as a dependency but haven't updated your primary
environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with Catalyst
Stacktrace:
[1] macro expansion
@ ./loading.jl:1167 [inlined]
[2] macro expansion
@ ./lock.jl:223 [inlined]
[3] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
[4] include
@ ./Base.jl:419 [inlined]
[5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1554
[6] top-level scope
@ stdin:1
in expression starting at /home/SLCU/user/.julia/dev/Catalyst/src/Catalyst.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile Catalyst [479239e8-5488-4da2-87a7-35f2df7eef83] to /home/SLCU/user/.julia/compiled/v1.8/Catalyst/jl_Vm90Lm.
(Spatial CRN Modelling) pkg> activate ../.julia/dev/Catalyst/
Activating project at `~/Desktop/.julia/dev/Catalyst`
(Catalyst) pkg> add MetaGraphs, GraphRecipes
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
No Changes to `~/Desktop/.julia/dev/Catalyst/Project.toml`
No Changes to `~/Desktop/.julia/dev/Catalyst/Manifest.toml`
(Catalyst) pkg> resolve
No Changes to `~/Desktop/.julia/dev/Catalyst/Project.toml`
No Changes to `~/Desktop/.julia/dev/Catalyst/Manifest.toml`
(Catalyst) pkg> activate .
Activating project at `~/Desktop/Spatial CRN Modelling`
julia> using Catalyst
[ Info: Precompiling Catalyst [479239e8-5488-4da2-87a7-35f2df7eef83]
ERROR: LoadError: ArgumentError: Package Catalyst does not have MetaGraphs in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
to ensure all packages in the environment are installed.
- Or, if you have Catalyst checked out for development and have
added MetaGraphs as a dependency but haven't updated your primary
environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with Catalyst
This seems to work, ish, in that MetaGraphs is now listed.
However, I seem to be having another version of Catalyst than what is in my .julia/dev/Catalyst folder. E.g. I check .julia/dev/Catalyst/Project.toml and there is no sign of MetaGraphs. Furthermore, new functions that I added under .julia/dev/Catalyst/Project.toml I cannot reach through using Catalyst.
Does this approach really work to update the Catalyst version I am working on a PR for?