Tests don'r run anymore because "sourcepath !== nothing"

This happened first with Julia 1.5, now with Julia 1.6, i only have left Julia-DEV

(@tomls) pkg> test GMT
ERROR: AssertionError: sourcepath !== nothing
Stacktrace:
  [1] is_package_downloaded(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1780
  [2] #13
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:130 [inlined]
  [3] _all
    @ .\reduce.jl:923 [inlined]
  [4] #all#698
    @ .\reducedim.jl:886 [inlined]
  [5] all
    @ .\reducedim.jl:886 [inlined]
  [6] is_instantiated(ctx::Pkg.Types.Context)
...

You’re probably using a manifest generated with a different version of Julia. Delete it.

Don’t know which Manifest you refer to. The package didn’t have a Manifest. Ended up nuking the .julia (not fun).

I don’t know that to say. People should report issues to Pkg.jl when it gives unhelpful error messages, like Unhelpful error message about failure to parse compatibility version · Issue #1853 · JuliaLang/Pkg.jl · GitHub. Nuking .julia and moving on is not going to fix anything if Pkg developers aren’t reminded of these usability issues.

3 Likes

Sorry, you are right but I needed to have this issue solved and didn’t think on it.

Ok, got the error again. How can I help solving it?

(@tomls) pkg> test GMT
ERROR: AssertionError: sourcepath !== nothing
Stacktrace:
  [1] is_package_downloaded(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1780
  [2] #13
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:130 [inlined]
  [3] _all
    @ .\reduce.jl:923 [inlined]
  [4] #all#698
    @ .\reducedim.jl:886 [inlined]
  [5] all
    @ .\reducedim.jl:886 [inlined]
  [6] is_instantiated(ctx::Pkg.Types.Context)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:130
  [7] instantiate(ctx::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Base.BinaryPlatforms.Platform, allow_autoprecomp::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1307
  [8] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1621
  [9] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:336
 [10] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:323
 [11] #test#62
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:73 [inlined]
 [12] test(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:72
 [13] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:408
 [14] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:386
 [15] do_cmd
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:377 [inlined]
 [16] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:550
 [17] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [18] invokelatest
    @ .\essentials.jl:706 [inlined]
 [19] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\LineEdit.jl:2441
 [20] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:1126
 [21] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:406

Open an issue in Pkg. The very first problem at this point is that we don’t even know what manifest is triggering the issue. Maybe the one of the @tomls environment? Who knows, it isn’t written anywhere.

Done.

I read in the issue

Currently, 1.5, 1.6 and 1.7DEV and have been doing this for a long time but now, possibly related to something new in 1.7DEV I’m getting this error when trying to run the tests in either julia1.5 or 1.6

As I already said above, manifests are specific to a minor version of Julia. You can’t expect to share them across multiple minor versions. That’s a matter of fact and something that is likely not going to be fixed: manifests are for reproducibility with a specific minor Julia version.

For me the issue is that Pkg doesn’t clearly tell what file is causing the issue.

1 Like

But I’ve been doing that for years and only more recently things broke.
I don’ want to have to reinstall everything (packages) every time I update Julia.

Things “break” especially when standard libraries change between minor versions. They changed a lot between v1.5 and v1.7. You’ve been only lucky before because there is no guarantee that a manifest can be instantiated with a different minor version of Julia.

Who said you have to?