Skip to content

Unable to update git dependency #2728

@polachok

Description

@polachok

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.

Activity

alexcrichton

alexcrichton commented on May 23, 2016

@alexcrichton
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)

added
A-diagnosticsArea: Error and warning messages generated by Cargo itself.
on May 23, 2016
polachok

polachok commented on May 23, 2016

@polachok
Author

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

alexcrichton

alexcrichton commented on May 23, 2016

@alexcrichton
Member

Yeah I think that'll get it working

added a commit that references this issue on May 23, 2016
ehuss

ehuss commented on Mar 23, 2020

@ehuss
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ehuss@alexcrichton@polachok

        Issue actions

          Unable to update git dependency · Issue #2728 · rust-lang/cargo