Cargo printing wrong path to local pkg?


#1

When adding a dependency to /path/to/mainrepo using

[dependencies.name]
path = /path/to/localdep

I seem to remember that Cargo used to print

Compiling name (/path/to/localdep)

but now it prints

Compiling name (/path/to/mainrepo)

I think this is a regression. Can someone more versed in Cargo have a look?


#2

I think that Cargo has actually always printed /path/to/mainrepo for various technical reasons here and there, although I forget precisely what they are at this time…


#3

I assume it’s fine to open an issue?


#4

Do you have a sample project that has this behavior?


#5

It’s easy to reproduce with

$ cd tmp
$ cargo new a
$ cat <<EOF >> a/Cargo.toml 
[dependencies.b]
path = "../b"
EOF
$ cargo new b
$ cd a
$ cargo build 
   Compiling b v0.1.0 (file:///.../tmp/a)
   Compiling a v0.1.0 (file:///.../tmp/a)