Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update git dependency #2728

Closed
polachok opened this issue May 23, 2016 · 4 comments
Closed

Unable to update git dependency #2728

polachok opened this issue May 23, 2016 · 4 comments
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself.

Comments

@polachok
Copy link

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.

@alexcrichton
Copy link
Member

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)

@alexcrichton alexcrichton added the A-diagnostics Area: Error and warning messages generated by Cargo itself. label May 23, 2016
@polachok
Copy link
Author

Oh boy, I would have never guessed it comes from netmap_test!
I should change that to netmap_sys = { path = ".." }, right?

@alexcrichton
Copy link
Member

Yeah I think that'll get it working

polachok pushed a commit to polachok/netmap_sys that referenced this issue May 23, 2016
@ehuss
Copy link
Contributor

ehuss commented 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.

@ehuss ehuss closed this as completed Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself.
Projects
None yet
Development

No branches or pull requests

3 participants