You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new v3 pin file format for Package.resolved introduced a new key originHash, which appears to be a SHA-256 checksum of local package files (often just shasum -a 256 Package.swift). The hash is recomputed whenever calling swift package update [...], however the new value is only written to disk when the dependency graph was changed as a result.
Often when editing the package file or when merging changes from branches which do so, the originHash value is left in a state not reflecting the merged result, and by surprise the pin file only changes at a later time.
I think it would be ideal if swift package update [...] made sure to update the originHash even if no package dependency got changed.
(It would also be nice if the package resolution automatic triggered by Xcode made sure to keep originHash up to date. I don't know which precise SwiftPM command it corresponds to; swift package resolve maybe? See related thread in Developer Forums.)
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version && uname -a)
No response
The text was updated successfully, but these errors were encountered:
Description
The new
v3
pin file format forPackage.resolved
introduced a new keyoriginHash
, which appears to be a SHA-256 checksum of local package files (often justshasum -a 256 Package.swift
). The hash is recomputed whenever callingswift package update [...]
, however the new value is only written to disk when the dependency graph was changed as a result.Often when editing the package file or when merging changes from branches which do so, the
originHash
value is left in a state not reflecting the merged result, and by surprise the pin file only changes at a later time.I think it would be ideal if
swift package update [...]
made sure to update theoriginHash
even if no package dependency got changed.(It would also be nice if the package resolution automatic triggered by Xcode made sure to keep
originHash
up to date. I don't know which precise SwiftPM command it corresponds to;swift package resolve
maybe? See related thread in Developer Forums.)Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of
swift --version && uname -a
)No response
The text was updated successfully, but these errors were encountered: