Skip to content

[6.2] Expose BuildRecordInfo.computeHash #1937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: release/6.2
Choose a base branch
from

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Jun 19, 2025

SwiftPM will compute a hash of the arguments passed to swift build, swift test, etc to determine if a full rebuild is necessary. Currently, it doesn't take in to account whether
.doesNotAffectIncrementalBuild is set on swift compiler options and so any time any compiler option changes it will perform a full rebuild.

Expose the function that swift-driver uses to compute the argument hash which takes in to account .doesNotAffectIncrementalBuild so that SwiftPM can leverage it to reduce unnecessary rebuilds.

In order to keep BuildRecordInfo hidden behind _spi the function was moved out to the standalone BuildRecordArguments struct.

Original PR: #1922

SwiftPM will compute a hash of the arguments passed to `swift build`,
`swift test`, etc to determine if a full rebuild is necessary.
Currently, it doesn't take in to account whether
`.doesNotAffectIncrementalBuild` is set on swift compiler options and so
any time any compiler option changes it will perform a full rebuild.

Expose the function that swift-driver uses to compute the argument hash
which takes in to account `.doesNotAffectIncrementalBuild` so that
SwiftPM can leverage it to reduce unnecessary rebuilds.

In order to keep `BuildRecordInfo` hidden behind `_spi` the function was
moved out to the standalone `BuildRecordArguments` struct.
@plemarquand plemarquand requested a review from a team as a code owner June 19, 2025 15:14
@plemarquand
Copy link
Contributor Author

This is required by SwiftPM's release/6.2 branch, which builds with swift-driver's release/6.2 branch.

@plemarquand
Copy link
Contributor Author

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants