JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
609 stars 251 forks source link

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

Open KristofferC opened 3 months ago

KristofferC commented 3 months ago

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.

DilumAluthge commented 3 months ago

😬

staticfloat commented 3 months ago

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`