Pkg.jl: compat install_archive needs update to new protocal

Created on 29 Nov 2019  路  15Comments  路  Source: JuliaLang/Pkg.jl

Most helpful comment

https://github.com/JuliaLang/Pkg.jl/pull/1427 should get rid of the duplication.

All 15 comments

Possibly because of this, essentially all packages are currently failing their nightly tests (e.g., https://github.com/JuliaDebug/JuliaInterpreter.jl/pull/352, many others).

Yes, I鈥檒l try to fix this today. It鈥檚 unfortunate that the file this is in is apparently untested yet relied upon by the entire ecosystem. I鈥檓 also unclear why there鈥檚 a whole seemingly near copy of normal Pkg code that鈥檚 just for testing, but I guess the simplest solution is just to fix it...

Wonderful. I'll hold off on tagging packages that build docs, just so the docs stay fully up to date.

https://github.com/JuliaLang/Pkg.jl/pull/1427 should get rid of the duplication.

I have a tentative fix but I can't test since I don't know how to reproduce this problem. How does one trigger this issue?

You trigger it by having [target] style test deps (that needs to be downloaded).

Can you give me some code I can run to trigger this? I've tried running tests for Primes and JuliaDebugger, but they work fine without this patch.

Not at a computer right now, but did you try with an empty depot path?

If I empty the DEPOT_PATH it tells me that there's no active project. As soon as someone comes up with a way to repro the issue and test that the fix actually fixes it, we can merge.

I realize it's post-Thanksgiving weekend, but this seems somewhat urgent. Can no one give me a way to reproduce this issue?

Or we merge https://github.com/JuliaLang/Pkg.jl/pull/1427 that gets rid of this file.

I'd be very happy what that as well.

I think you can just copy what happens when this goes awry in a Travis test? E.g., https://travis-ci.org/JuliaDebug/JuliaInterpreter.jl/jobs/619205659?utm_medium=notification&utm_source=github_status

You would think, but...

$ export JULIA_PROJECT=@.
$ julia -q
julia> import Pkg

julia> Pkg.test(coverage=true)
   Testing Primes
 Resolving package versions...
No changes
Test Summary:    | Pass  Total
totient(::Int16) | 1001   1001
Test Summary:    | Pass  Total
totient(::Int32) | 1001   1001
Test Summary:    | Pass  Total
totient(::Int64) | 1001   1001
Test Summary:     | Pass  Total
totient(::BigInt) | 1001   1001
Test Summary:         | Pass  Total
totient() correctness |   83     83
Test Summary:      | Pass  Total
nextprime(::Int64) |  155    155
Test Summary:      | Pass  Total
nextprime(::Int32) |  155    155
Test Summary:       | Pass  Total
nextprime(::BigInt) |  155    155
Test Summary:      | Pass  Total
prevprime(::Int64) |  183    183
Test Summary:      | Pass  Total
prevprime(::Int32) |  183    183
Test Summary:       | Pass  Total
prevprime(::BigInt) |  183    183
Test Summary:  | Pass  Total
prime(::Int64) |   20     20
Test Summary:  | Pass  Total
prime(::Int32) |   20     20
Test Summary:   | Pass  Total
prime(::BigInt) |   20     20
Test Summary:       | Pass  Total
nextprimes(::Int32) |   51     51
Test Summary:       | Pass  Total
nextprimes(::Int64) |   51     51
Test Summary:        | Pass  Total
nextprimes(::BigInt) |   51     51
Test Summary:       | Pass  Total
prevprimes(::Int32) |   34     34
Test Summary:       | Pass  Total
prevprimes(::Int64) |   34     34
Test Summary:        | Pass  Total
prevprimes(::BigInt) |   34     34
   Testing Primes tests passed

Ah, it seems like the issue is that I already had all of Primes' dependencies installed. When I tried with JuliaInterpreter, which has some dependencies I didn't have installed, I can trigger this:

julia> import Pkg

julia> Pkg.test(coverage=true)
   Testing JuliaInterpreter
 Resolving package versions...
ERROR: Error when installing package Tensors:
MethodError: no method matching install_archive(::Array{String,1}, ::Base.SHA1, ::String)
Closest candidates are:
  install_archive(!Matched::Array{Pair{String,Bool},1}, ::Base.SHA1, ::String) at /Users/stefan/dev/julia/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:461
Stacktrace:
 [1] macro expansion at /Users/stefan/dev/julia/usr/share/julia/stdlib/v1.4/Pkg/src/backwards_compatible_isolation.jl:233 [inlined]
 [2] (::Pkg.Operations.var"#24#27"{Symbol,Pkg.Types.Context,Dict{Base.UUID,Base.SHA1},Dict{Base.UUID,Array{String,1}},Channel{Any},Channel{Any}})() at ./task.jl:349
Was this page helpful?
0 / 5 - 0 ratings