Skip to content

Commit 86d057c

Browse files
committed
Auto merge of #7637 - ehuss:update-resolve-version, r=alexcrichton
Update comment about ResolveVersion default version.
2 parents c74ea1b + 036cb7d commit 86d057c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/cargo/core/resolver/resolve.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,20 @@ pub struct Resolve {
5252
version: ResolveVersion,
5353
}
5454

55-
/// A version to indicate how a `Cargo.lock` should be serialized. Currently V1
56-
/// is the default and dates back to the origins of Cargo. A V2 is currently
57-
/// being proposed which provides a much more compact representation of
58-
/// dependency edges and also moves checksums out of `[metadata]`.
55+
/// A version to indicate how a `Cargo.lock` should be serialized. Currently
56+
/// V2 is the default when creating a new lockfile. If a V1 lockfile already
57+
/// exists, it will stay as V1.
5958
///
6059
/// It's theorized that we can add more here over time to track larger changes
6160
/// to the `Cargo.lock` format, but we've yet to see how that strategy pans out.
6261
#[derive(PartialEq, Eq, Clone, Copy, Debug, PartialOrd, Ord)]
6362
pub enum ResolveVersion {
64-
// Historical baseline for when this abstraction was added.
63+
/// Historical baseline for when this abstraction was added.
6564
V1,
66-
// Update around 2019 where `dependencies` arrays got compressed and
67-
// checksums are listed inline.
65+
/// A more compact format, more amenable to avoiding source-control merge
66+
/// conflicts. The `dependencies` arrays are compressed and checksums are
67+
/// listed inline. Introduced in 2019 in version 1.38. New lockfiles use
68+
/// V2 by default starting in 1.41.
6869
V2,
6970
}
7071

0 commit comments

Comments
 (0)