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 update: repo updated twice #8293

Closed
matthiaskrgr opened this issue May 28, 2020 · 2 comments
Closed

cargo update: repo updated twice #8293

matthiaskrgr opened this issue May 28, 2020 · 2 comments
Labels
A-git Area: anything dealing with git C-bug Category: bug Command-update

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented May 28, 2020

Problem
when running cargo update in the rustc or rls repo, it looks like the clippy repo inside the cache is updated twice. This seems redundant.

  Updating crates.io index
    Updating git repository `https://github.com/rust-lang/cargo`
    Updating git repository `https://github.com/rust-lang/rust-clippy`
    Updating git repository `https://github.com/rust-lang/rust-clippy`
      Adding addr2line v0.12.1
    Updating anyhow v1.0.28 -> v1.0.31

Steps

  1. cargo update

Possible Solution(s)
Don't update the git repo two times back-to-back.

Notes

Output of cargo version:
cargo 1.45.0-nightly (cb06cb269 2020-05-08)

Note: It doesn't look like cargo update -vvvvv has any additional effect :/

@matthiaskrgr matthiaskrgr added the C-bug Category: bug label May 28, 2020
@ehuss
Copy link
Contributor

ehuss commented May 29, 2020

The CARGO_LOG=debug environment variable is usually the best way to get more information.

In this case, there are two separate revisions of rust-clippy in the graph (probably a mistake in the RLS repo).

Cargo doesn't know that the rev is a precise commit hash, so it takes a conservative approach of making sure the repo is updated before checking what the actual rev is.

There are some wonky issues with how Cargo is creating GitSources. Sometimes they are unique per revision, and sometimes they are shared, causing various bugs like #7841 and #8101. This looks like a similar situation where there are two GitSources where one would suffice.

@epage
Copy link
Contributor

epage commented Nov 3, 2023

This looks to be a duplicate of #6921, closing in favor of that. If there is something I missed, let us know!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git C-bug Category: bug Command-update
Projects
None yet
Development

No branches or pull requests

3 participants