Pkg.jl icon indicating copy to clipboard operation
Pkg.jl copied to clipboard

Things get very confusing when putting the wrong name to a UUID in the project file

Open KristofferC opened this issue 1 year ago • 2 comments

Try a project file with:

[deps]
ForwardDiff = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29"

activate it and then do:

julia> Pkg.add("ForwardDiff")
   Resolving package versions...
    Updating `/tmp/jl_RX2R13/TestWeakDepProject/Project.toml`
  [0f1e0344] + ForwardDiff v0.8.21
    Updating `/tmp/jl_RX2R13/TestWeakDepProject/Manifest.toml`

This now actually installed version 0.8.12 of WebIO (https://github.com/JuliaGizmos/WebIO.jl/releases/tag/v0.8.21) for which this is the UUID for.

KristofferC avatar Mar 22 '24 17:03 KristofferC

😬

DilumAluthge avatar Mar 22 '24 18:03 DilumAluthge

Probably worthwhile to have the package printing recognize when you've locally altered the name of your package in opposition to what the loaded registry would call it, and print something like:

julia> Pkg.add("ForwardDiff")
   Resolving package versions...
    Updating `/tmp/jl_RX2R13/TestWeakDepProject/Project.toml`
  [0f1e0344] + WebIO (mapped as ForwardDiff) v0.8.21
    Updating `/tmp/jl_RX2R13/TestWeakDepProject/Manifest.toml`

staticfloat avatar Mar 22 '24 19:03 staticfloat