You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When given tag names containing a +, cargo will re-fetch the tag every time dependency operations are run.
The following Cargo.toml file exhibits the problem:
[package]
name = "cargo-test"version = "0.1.0"edition = "2021"
[dependencies]
openssl-src = { git = "https://github.com/vectordotdev/openssl-src-rs", tag = "release-300-force-engine+3.1.2" }
As written, running cargo tree > /dev/null repeatedly fetches the tag each time. When the + in the tag is replaced with _ (same underlying revision), the tag is fetched only once and subsequently the cached version is used.
In our larger dependency file, this also ends up fetching the crates.io index repeatedly as well, causing undue load on the servers. I have not pinned down where this happens, as replacing the tags in the larger file also fixes the problem.
This was a known issue first reported in #11085. The relevant fix was merged with #12280 behind a non-public-facing feature flag. However, that fix needs a Cargo.lock version bump, so we try to gather a certain number of changes before committing a new version to avoid too much churn. See #12120.
Problem
When given tag names containing a
+
, cargo will re-fetch the tag every time dependency operations are run.The following
Cargo.toml
file exhibits the problem:As written, running
cargo tree > /dev/null
repeatedly fetches the tag each time. When the+
in the tag is replaced with_
(same underlying revision), the tag is fetched only once and subsequently the cached version is used.In our larger dependency file, this also ends up fetching the crates.io index repeatedly as well, causing undue load on the servers. I have not pinned down where this happens, as replacing the tags in the larger file also fixes the problem.
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: