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

Fix dependencies patch #86

Closed
wants to merge 2 commits into from
Closed

Fix dependencies patch #86

wants to merge 2 commits into from

Conversation

haythemsellami
Copy link

@haythemsellami haythemsellami commented Feb 25, 2023

With Cargo 1.66.0 (d65d197ad 2022-11-15) the current dependencies patch is failing with:

rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file /Users/haythem96/Projects/MEV/mev-rs/Cargo.toml, Some(Version { major: 1, minor: 67, patch: 1 }): Failed to run `"cargo" "metadata" "--format-version" "1" "--manifest-path" "/Users/haythem96/Projects/MEV/mev-rs/Cargo.toml" "--filter-platform" "x86_64-apple-darwin"`: `cargo metadata` exited with an error:     Updating git repository `https://github.com/ralexstokes//ethereum-consensus`
warning: spurious network error (2 tries remaining): remote error: 
  ralexstokes//ethereum-consensus is not a valid repository name
  Visit https://support.github.com/ for help; class=Net (12)
warning: spurious network error (1 tries remaining): remote error: 
  ralexstokes//ethereum-consensus is not a valid repository name
  Visit https://support.github.com/ for help; class=Net (12)
error: failed to load source for dependency `ethereum-consensus`

Caused by:
  Unable to update https://github.com/ralexstokes//ethereum-consensus?rev=ef89b4a#ef89b4a4

Caused by:
  failed to fetch into: /Users/haythem96/.cargo/git/db/ethereum-consensus-70d123a531568296

Caused by:
  failed to authenticate when downloading repository: ssh://[email protected]/ralexstokes//ethereum-consensus

  * attempted ssh-agent authentication, but no usernames succeeded: `git`

  if the git CLI succeeds then `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  remote error: 
    ralexstokes//ethereum-consensus is not a valid repository name
    Visit https://support.github.com/ for help; class=Net (12)

The same error for the other 2 patched dependencies.

The changes in the PR is a workaround instead of the double /

@haythemsellami
Copy link
Author

haythemsellami commented Feb 25, 2023

Similar issue rust-lang/cargo#5478

@ralexstokes
Copy link
Owner

does this happen with rust v1.67?

that's the current MSRV as given in the rust-toolchain.toml

@haythemsellami
Copy link
Author

haythemsellami commented Feb 26, 2023

does this happen with rust v1.67?

that's the current MSRV as given in the rust-toolchain.toml

Yes rustc 1.67.1 (d5a82bbd2 2023-02-07)

@haythemsellami
Copy link
Author

Is this fix valid? @ralexstokes

@ralexstokes
Copy link
Owner

the thing is that this works just fine for me (e.g. cargo clean && cargo check) with rustc 1.67.1 (d5a82bbd2 2023-02-07)

if I try some of the other options listed in the cargo issue you linked, things start breaking for me...

things also work fine in the CI environment and Docker as well so I'm not sure why you are running into this issue...

is there something non-standard about your rust installation perhaps?

@ralexstokes
Copy link
Owner

do you know if this works, just adding the ?rev=... part like they do here?

https://stackoverflow.com/a/72261235

@haythemsellami
Copy link
Author

cargo clean && cargo check

What's ur Cargo version? Mine is Cargo 1.66.0 (d65d197ad 2022-11-15)

Nothing non-standard, just curl https://sh.rustup.rs -sSf | sh

@haythemsellami
Copy link
Author

do you know if this works, just adding the ?rev=... part like they do here?

https://stackoverflow.com/a/72261235

Yeah it should works without the port, I changed it.

@ralexstokes
Copy link
Owner

cargo clean && cargo check

What's ur Cargo version? Mine is Cargo 1.66.0 (d65d197ad 2022-11-15)

Nothing non-standard, just curl https://sh.rustup.rs -sSf | sh

it's the same as my rustc above, they are versioned together

also i would expect cargo to detect this but the MSRV is 1.67 so i don't want us to spend time with 1.66 -- can you verify the problem exists with 1.67 on your machine?

you should be able to just rustup update stable

@haythemsellami
Copy link
Author

Did that, have cargo 1.67.1 (8ecd4f20a 2023-01-10) now, still same issue on main

$ cargo check                                                
    Updating git repository `https://github.com/ralexstokes//beacon-api-client`
warning: spurious network error (2 tries remaining): remote error:
  ralexstokes//beacon-api-client is not a valid repository name
  Visit https://support.github.com/ for help; class=Net (12)
warning: spurious network error (1 tries remaining): remote error:
  ralexstokes//beacon-api-client is not a valid repository name
  Visit https://support.github.com/ for help; class=Net (12)
error: failed to load source for dependency `beacon-api-client`

Caused by:
  Unable to update https://github.com/ralexstokes//beacon-api-client?rev=53690a711e33614d59d4d44fb09762b4699e2a4e#53690a71

Caused by:
  failed to fetch into: /Users/haythem96/.cargo/git/db/beacon-api-client-9eb91f58a460bf86

Caused by:
  failed to authenticate when downloading repository: ssh://[email protected]/ralexstokes//beacon-api-client

  * attempted ssh-agent authentication, but no usernames succeeded: `git`

  if the git CLI succeeds then `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  remote error:
    ralexstokes//beacon-api-client is not a valid repository name
    Visit https://support.github.com/ for help; class=Net (12)

@ralexstokes
Copy link
Owner

hey @haythemsellami , sorry for the hassle here, this should no longer be an issue after #107

@ralexstokes ralexstokes closed this Jul 9, 2023
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

Successfully merging this pull request may close these issues.

2 participants