Package does not have ... in its dependencies, but it does

I developed a package called EquationsOfState.jl. However, when I try to build the latest version (v1.1.1), I got such error:

(v1.0) pkg> st
    Status `~/.julia/environments/v1.0/Project.toml`
  [0438fec6] EquationsOfState v1.1.1

(v1.0) pkg> precompile
Precompiling project...
Precompiling EquationsOfState
[ Info: Precompiling EquationsOfState [0438fec6-b81c-52d9-9651-d286848f50a8]
ERROR: LoadError: ArgumentError: Package EquationsOfState does not have Reexport in its dependencies:
- If you have EquationsOfState checked out for development and have
  added Reexport 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 EquationsOfState
 [1] require(::Module, ::Symbol) at ./loading.jl:836
 [2] include at ./boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1044
 [4] include(::Module, ::String) at ./sysimg.jl:29
 [5] top-level scope at none:2
 [6] eval at ./boot.jl:319 [inlined]
 [7] eval(::Expr) at ./client.jl:393
 [8] top-level scope at ./none:3
in expression starting at /Users/qz/.julia/packages/EquationsOfState/9ywpR/src/EquationsOfState.jl:3
ERROR: Failed to precompile EquationsOfState [0438fec6-b81c-52d9-9651-d286848f50a8] to /Users/qz/.julia/compiled/v1.0/EquationsOfState/Fr41m.ji.
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203
 [3] precompile(::Pkg.Types.Context) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:514
 [4] do_precompile!(::Dict{Symbol,Any}, ::Array{String,1}, ::Dict{Symbol,Any}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:662
 [5] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:697
 [6] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:696
 [7] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:603
 [8] #do_cmd#33(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:577
 [9] do_cmd at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:573 [inlined]
 [10] (::getfield(Pkg.REPLMode, Symbol("##50#53")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:923
 [11] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [12] invokelatest at ./essentials.jl:696 [inlined]
 [13] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2273
 [14] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1034
 [15] run_repl(::REPL.AbstractREPL, ::Any) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
 [16] (::getfield(Base, Symbol("##718#720")){Bool,Bool,Bool,Bool})(::Module) at ./client.jl:355
 [17] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [18] invokelatest at ./essentials.jl:696 [inlined]
 [19] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:339
 [20] exec_options(::Base.JLOptions) at ./client.jl:277
 [21] _start() at ./client.jl:425

But I do have Reexport in Project.toml. Why cannot I build my package? I have a clean .julia directory. I have tried to rm and gc, and even remove .julia, but it did not help.

Could it because I once changed the package’s name and UUID?

Yes, very likely. Remove the old one and add the correct one.

I’m sorry I do not understand to remove what and add what? Remove the old package from METADATA.jl?

The General registry is based on METADATA which is based on REQUIRE files. You don’t have the dependencies in your REQUIRE-file, so that is (likely) the problem.

Thank you for your reply. I am just curious about why Project.toml is not enough. Because I saw

  1. When everything is working the dependencies are computed from the Project.toml not from REQUIRE . You don’t need the REQUIRE file anymore.

from here.

That refers to the process of deprecating METADATA/Attobot/REQUIRE in favor of General/Registrator/Project. The last component is being tested right now through Registrator and a branch of General. Depending on how the beta test works, it should be rolled out soon. Once that happens, REQUIRE won’t be needed and Project.toml will completely replace it.

1 Like

Thank you! I have installed the attobot app, and I wonder how I can benefit from Registrator over attobot?

It is currently in beta so some changes are happening currently (e.g., making it read-only permission bot). You can install it just like Attobot and follow the docs on the project. For that, no REQUIRE required.

So create new packages, have them get registered, update them etc.
To test it, add @nishanth's fork of the registry to Pkg and try to install
the packages etc. The more testing the faster we can make it the
default and the less problems it will have when we switch.

You can join the Slack channel #pkg-dev for more info and support testing it out.

1 Like

Thank you for your information.