Package.resolved versions

I know that the Swift tools version 5.6 introduced version 2 of the Package.resolved file. I recently noticed that apparently there is also a version 3, but I was unable to find when it was introduced. Is this documented/tracked anywhere?

I looks like version 3 was introduced 2023-08 in this pull request:

Take a look at the PinsStore.V3 struct (the current name for this is ResolvedPackagesStorage.V3). Search for "// v3 storage format" in the diff view.

1 Like

Version 3 was added in swift-package-manager#6698, merged on Aug 8, 2023:

The actual format change is pretty small: v3 is basically v2 plus an originHash field:

It gets written when toolsVersion > .v5_9, so effectively Swift tools version 5.10 and later:

1 Like