-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.
Description
Here's an example project https://github.com/polachok/cargo-failed
root@b844ce65b37d:/shit/cargo-failed# cargo build --verbose
Updating git repository `https://github.com/libpnet/netmap_sys`
error: Unable to update https://github.com/libpnet/netmap_sys?rev=4bc5496c0afb6dc884a3d8c686a58bff82b323b8
Caused by:
Could not find `Cargo.toml` in `/root/.cargo/git/checkouts/netmap_sys-779e4f2b4f88d060/netmap_sys`
root@b844ce65b37d:/shit/cargo-failed# stat /root/.cargo/git/checkouts/netmap_sys-779e4f2b4f88d060/netmap_sys
stat: cannot stat `/root/.cargo/git/checkouts/netmap_sys-779e4f2b4f88d060/netmap_sys': No such file or directory
It's actually in commit hash folder:
root@b844ce65b37d:/shit/cargo-failed# stat /root/.cargo/git/checkouts/netmap_sys-779e4f2b4f88d060/4bc5496c0afb6dc884a3d8c686a58bff82b323b8/
File: `/root/.cargo/git/checkouts/netmap_sys-779e4f2b4f88d060/4bc5496c0afb6dc884a3d8c686a58bff82b323b8/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fc01h/64513d Inode: 143487 Links: 5
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-05-23 14:35:00.883844613 +0000
Modify: 2016-05-23 14:34:35.339844934 +0000
Change: 2016-05-23 14:34:35.339844934 +0000
Birth: -
root@b844ce65b37d:/shit/cargo-failed# cargo --version
cargo 0.11.0-nightly (259324c 2016-05-20)
I'm running this in a docker container with ubuntu 12.04 and rust installed with official installer.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
alexcrichton commentedon May 23, 2016
Oh dear well that's just a terrible error message!
I think, however, that it's a legitimate error message due to this line which is going outside its directory to find a dependency. We could probably show this a bit more with better errors, however (e.g. why we're looking at this path in the first place)
polachok commentedon May 23, 2016
Oh boy, I would have never guessed it comes from
netmap_test
!I should change that to
netmap_sys = { path = ".." }
, right?alexcrichton commentedon May 23, 2016
Yeah I think that'll get it working
Change path in netmap_test
ehuss commentedon Mar 23, 2020
This should be more-or-less fixed by #7947, where broken path dependencies are ignored. Cargo still hunts through the git repo for the dependency (which is a little wonky, but mostly works). It probably shouldn't ignore the paths, but that's an issue for another day.