Hello,
I am writing a Julia package. I already have a few releases, so I got the basics working. I just added another function and I added the new dependency on Statistics, like so:
(Planets) pkg> resolve
Resolving package versions...
Updating `Project.toml`
[no changes]
Updating `Manifest.toml`
[no changes]
The first time I ran this Project.toml
and Manifest.toml
were updated so that now they include the Statistics
package. For example, Manifest.toml
contains this bit:
[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
So now I want to run the new tests that I’ve added, and that’s where I run into trouble. The test feature doesn’t realize that I’ve already added Statistics as a dependency:
Varda ~/Science/Planets.jl % julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.7.0 (2018-08-08 06:46 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
(v0.7) pkg> activate .
(Planets) pkg> test
Testing Planets
Resolving package versions...
WARNING: Method definition intern(Type{WeakRefStrings.WeakRefString{UInt8}}, Tuple{Ptr{UInt8}, Int64}) in module Parsers at /home/daniel/.julia/packages/Parsers/kL0P9/src/strings.jl:17 overwritten in module CSV at /home/daniel/.julia/packages/CSV/uLyo0/src/CSV.jl:5.
ERROR: LoadError: LoadError: ArgumentError: Package Planets does not have Statistics in its dependencies:
- If you have Planets checked out for development and have
added Statistics 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 Planets
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:830
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1038
[4] include at ./sysimg.jl:29 [inlined]
[5] include(::String) at /home/daniel/Science/Planets.jl/src/Planets.jl:1
[6] top-level scope at none:0
[7] include at ./boot.jl:317 [inlined]
[8] include_relative(::Module, ::String) at ./loading.jl:1038
[9] include(::Module, ::String) at ./sysimg.jl:29
[10] top-level scope at none:2
[11] eval at ./boot.jl:319 [inlined]
[12] eval(::Expr) at ./client.jl:399
[13] top-level scope at ./none:3
in expression starting at /home/daniel/Science/Planets.jl/src/isochrone.jl:8
in expression starting at /home/daniel/Science/Planets.jl/src/Planets.jl:9
ERROR: LoadError: Failed to precompile Planets [7a3fd1c8-cccc-11e8-1991-ff9663c7a777] to /home/daniel/.julia/compiled/v0.7/Planets/RNNVP.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1185
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
[8] include at ./boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1038
[10] include(::Module, ::String) at ./sysimg.jl:29
[11] include(::String) at ./client.jl:398
[12] top-level scope at none:0
in expression starting at /home/daniel/Science/Planets.jl/test/runtests.jl:2
ERROR: Package Planets errored during testing
(Planets) pkg>
I’m really stuck here. Can anyone figure what’s going on? It’s complaining that I have not added Statistics to the list of dependencies, but it’s right there in the .toml
files. Does anyone know what to do here?
Cheers,
Daniel