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

Cargo build error: failed to fetch https://github.com/rust-lang/crates.io-index #1290

Open
2 tasks done
ribosomerocker opened this issue Sep 1, 2020 · 4 comments
Open
2 tasks done

Comments

@ribosomerocker
Copy link

Xi-Editor Issue Template

  • I have searched existing issues and could not find my issue.
  • I have studied the documentation.

Details

If your issue is a build or runtime error, please include the following:

  • OS / platform (e.g. macOS 10.13.2)
    Ubuntu 19.10
  • rust compiler version (rustc --version) (we test against the latest
    stable release)
    1.45.2
  • rust compiler installation method (e.g. rustup, homebrew, source)
    Using this command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • the frontend you're using, if applicable
    None
  • the commit you're on, if building from source (#3a2405b)
    Latest in main branch
  • a full backtrace or error message, if available
warning: /home/mon/github/xi-editor/rust/Cargo.toml: unused manifest key: package.rust
error: failed to resolve patches for https://github.com/rust-lang/crates.io-index

Caused by:
  failed to load source for dependency onig
                                                                              Caused by:
  Unable to update https://github.com/kornelski/rust-onig?branch=bindgen#3c40d564

Caused by:
  the given reference name 'refs/heads/.l2s.bindgen.lock0001' is not valid; class=Reference (4)

Expected vs Actual

Expected xi-editor to build without errors.

    $ cd xi-editor/rust && cargo build
    # Successfuly builds xi

Actual: Cargo fails with the error message:

    $ cargo build # in xi-editor/rust
     warning: /home/mon/github/xi-editor/rust/Cargo.toml: unused manifest key: package.rust
     error: failed to resolve patches for https://github.com/rust-lang/crates.io-index

     Caused by:
       failed to load source for dependency onig
                                                                              
     Caused by:
       Unable to update https://github.com/kornelski/rust-onig?branch=bindgen#3c40d564

     Caused by:
       the given reference name 'refs/heads/.l2s.bindgen.lock0001' is not valid; class=Reference (4)
@cmyr
Copy link
Member

cmyr commented Sep 1, 2020

I'd try rustup update and cargo clean and maybe cargo update and see if any of those help.

@ribosomerocker
Copy link
Author

Removing the last 3 lines (in the [patch part) and running cargo build worked amazingly. Will try the commands you suggested.

@ribosomerocker
Copy link
Author

Nope, they didn't, thanks for helping though, do I keep this issue open until it's resolved in master, or...?

@cmyr
Copy link
Member

cmyr commented Sep 2, 2020

I'm not able to reproduce. 😒

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants