From: bors Date: Mon, 10 May 2021 23:04:32 +0000 (+0000) Subject: Auto merge of #9476 - ehuss:index-cache-bump, r=alexcrichton X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=253fab11c32178ef159f2f2f1f52baab438f63a7;p=cargo.git Auto merge of #9476 - ehuss:index-cache-bump, r=alexcrichton Bump index cache version to deal with semver metadata version mismatch. #9467 has uncovered an issue with how versions are handled in the index cache. When using a debug build of Cargo, it may panic due to the [cache contents changing](https://github.com/rust-lang/cargo/blob/5c455130b6001c7f54e872e161c27f6e996aff1f/src/cargo/sources/registry/index.rs#L606-L619). The particular problem I am running into is that the index has an entry for `openssl-src 110.0.0` and `110.0.0+1.1.0f`. This is due to an issue with crates.io where it allows publishing multiple versions with the same metadata (https://github.com/rust-lang/crates.io/issues/1059). Cargos before #9467 would populate the index cache with two entries, both with version `110.0.0`. Afterwards, there are two separate entries (`110.0.0` and `110.0.0+1.1.0f`). The change here is to bump the index cache version so that new versions of cargo will clear the cache, and won't trigger the assertion. This may be a bit of a heavy-handed solution, as I think this only affects debug builds of cargo. However, I instantly started running into this problem, so I suspect it will be a real annoyance for anyone developing cargo. Happy to discuss other possible solutions. --- 253fab11c32178ef159f2f2f1f52baab438f63a7