Skip to content

Commit 7d0c068

Browse files
committed
Bump index cache version.
1 parent 5c45513 commit 7d0c068

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/cargo/sources/registry/index.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,16 @@ impl Summaries {
692692
// * `2`: Added the "index format version" field so that if the index format
693693
// changes, different versions of cargo won't get confused reading each
694694
// other's caches.
695-
696-
const CURRENT_CACHE_VERSION: u8 = 2;
695+
// * `3`: Bumped the version to work around a issue where multiple versions of
696+
// a package were published that differ only by semver metadata. For
697+
// example, openssl-src 110.0.0 and 110.0.0+1.1.0f. Previously, the cache
698+
// would be incorrectly populated with two entries, both 110.0.0. After
699+
// this, the metadata will be correctly included. This isn't really a format
700+
// change, just a version bump to clear the incorrect cache entries. Note:
701+
// the index shouldn't allow these, but unfortunately crates.io doesn't
702+
// check it.
703+
704+
const CURRENT_CACHE_VERSION: u8 = 3;
697705

698706
impl<'a> SummariesCache<'a> {
699707
fn parse(data: &'a [u8], last_index_update: &str) -> CargoResult<SummariesCache<'a>> {

0 commit comments

Comments
 (0)