JuliaLang / Pkg.jl

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

Incorrect resolution of local path dependencies included with `[source]` in a root project setup #3989

Open JanisErdmanis opened 3 months ago

JanisErdmanis commented 3 months ago

There seems to be an oversight in the implementation of [sources] for the local path and its interaction with a workflow that uses a root project. In particular, I have a temporary dependency put within the existing package ShuffleProofs, and I have the following [sources] section:

[sources]
SigmaProofs = {path = "SigmaProofs"}        

When activating the project at ShuffleProofs, the dependency is correctly located, indicating that the setup is done accurately.

I use the root project setup extensively and have the following directory structure:

├── AppBundler
├── CryptoGroups
├── CryptoPRG
├── CryptoSignatures
├── HistoryTrees
├── Manifest.toml
├── PeaceFounder
├── PeaceFounderAdmin
├── PeaceFounderClient
├── PeaceFounderCompiled
├── PeaceFounderDemo
├── Project.toml
├── ShuffleProofs
├── TallyProofs
└── [peacefounder.org](http://peacefounder.org/)

where every dependency is added with dev in the project. When I activate this root project and load ShuffleProofs, it tries to find SigmaProofs in the wrong location:

(Github) pkg> test ShuffleProofs
     Testing ShuffleProofs
ERROR: expected package `SigmaProofs [f8559b4c]` to exist at path `/Users/jerdmanis/BtSync/PeaceFounder/Github/SigmaProofs

where instead, it should be located at /Users/jerdmanis/BtSync/PeaceFounder/Github/ShuffleProofs/SigmaProofs. For now, I have resolved the situation by making a soft link in the root project.

KristofferC commented 3 months ago

Maybe dup of https://github.com/JuliaLang/Pkg.jl/issues/3842