From c30e65f569dfd59c14fb0f1d2429978a66385cec Mon Sep 17 00:00:00 2001 From: Cameron Pickett Date: Wed, 18 Dec 2024 23:37:11 -0800 Subject: [PATCH] Update reindeer to look for cargo lock version 4 Summary: 1.83.0 uses version 4 for cargo lockfile. Lockfile v4 was stabilized in 1.78.0. https://github.com/rust-lang/cargo/blob/master/src/cargo/core/resolver/resolve.rs#L89-L95 Adds awareness of url encoding to SourceId, which AFAICT does not impact any Meta-internal usages of rust today? Reviewed By: dtolnay Differential Revision: D67436425 fbshipit-source-id: 3a6d21f7f306438c209c21698d31324c07c93afd --- src/lockfile.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lockfile.rs b/src/lockfile.rs index 7fb9bde2..8d4885b4 100644 --- a/src/lockfile.rs +++ b/src/lockfile.rs @@ -18,7 +18,7 @@ use crate::Paths; #[derive(Deserialize, Debug)] pub struct Lockfile { #[allow(dead_code)] - pub version: Hopefully3, + pub version: Hopefully4, #[serde(rename = "package")] pub packages: Vec, } @@ -53,7 +53,7 @@ impl Lockfile { } #[derive(Debug)] -pub struct Hopefully3; +pub struct Hopefully4; #[derive(Deserialize, Debug)] pub struct LockfilePackage { @@ -63,15 +63,15 @@ pub struct LockfilePackage { pub checksum: Option, } -impl<'de> Deserialize<'de> for Hopefully3 { +impl<'de> Deserialize<'de> for Hopefully4 { fn deserialize(deserializer: D) -> Result where D: Deserializer<'de>, { let version = usize::deserialize(deserializer)?; - if version != 3 { + if version != 4 { log::warn!("Unrecognized Cargo.lock format version: {}", version); } - Ok(Hopefully3) + Ok(Hopefully4) } }