Skip to content

[build-script] Add a default-enabled "clean" step for swift-driver and swiftpm products #33563

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

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Aug 20, 2020

Along with options to disable the mandatory clean using: --skip-clean-swift-driver and --skip-clean-swiftpm.

This change will ensure that every invocation of build-script will, by default, clean up all build artifacts of these projects and re-build them from scratch.
This is needed for all builds because today arbitrary changes to the compiler can lead to being unable to incrementally build components that are themselves written in Swift (e.g. SwiftPM and swift-driver). This causes now-frequent failures in incremental build bots, and is a scenario that is encountered by developers (For example, see: rdar://65006593).

The proper long-term solution is to enable library evolution for these projects.
Until this is done, the only safe thing to do is to always rebuild them.

Resolves rdar://65006593

…d swiftpm

Along with options to disable the mandatory clean using: `--skip-clean-swift-driver` and `--skip-clean-swiftpm`.

This will ensure that every invocation of build-script will, by default, clean up all build artifacts of these projects and re-build them from scratch.
This is needed for all builds because today arbitrary changes to the compiler can lead to us being unable to incrementally build components that are themselves written in Swift. This causes now-frequent failures in incremental build bots, and is a scenario that is encountered by developers. (For example see: rdar://65006593)

The proper long-term solution is to enable library evolution for these projects. Until this is done, the only safe thing to do is to always rebuild them.

Resolves rdar://65006593
@artemcm
Copy link
Contributor Author

artemcm commented Aug 20, 2020

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Aug 20, 2020

@swift-ci please test

@artemcm artemcm requested a review from gottesmm August 20, 2020 20:41
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - fc4ef19

@artemcm
Copy link
Contributor Author

artemcm commented Aug 20, 2020

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Aug 20, 2020

@swift-ci please smoke test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - fc4ef19

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - fc4ef19

@artemcm
Copy link
Contributor Author

artemcm commented Aug 21, 2020

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Aug 21, 2020

@swift-ci please smoke test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - fc4ef19

@artemcm
Copy link
Contributor Author

artemcm commented Aug 21, 2020

@swift-ci please test OS X platform

@artemcm
Copy link
Contributor Author

artemcm commented Aug 21, 2020

@swift-ci please smoke test OS X platform

@artemcm artemcm requested a review from shahmishal August 21, 2020 20:50
Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any other products that should have this set? I imagine it is anything that uses a notion of a shared workspace. I have seen this same error before btw and it was on my list of things to fix. Thanks for taking the initiative here!

@artemcm
Copy link
Contributor Author

artemcm commented Aug 24, 2020

Are there any other products that should have this set? I imagine it is anything that uses a notion of a shared workspace. I have seen this same error before btw and it was on my list of things to fix. Thanks for taking the initiative here!

I imagine so. So far these are the only two projects that have caused a problem. I will look over the other products to see if they could potentially run into this.

@artemcm artemcm merged commit faea5f0 into swiftlang:master Aug 24, 2020
edymtt added a commit to edymtt/swift that referenced this pull request Mar 31, 2021
Introduce a new parameter `--skip-llbuild-clean` to prevent this from
happening.

This mimicks similar logic in place for `swiftpm`, `swift-driver`
(swiftlang#33563)  and `xctest` (swiftlang#19512)

Addresses rdar://75057069
edymtt added a commit that referenced this pull request Apr 5, 2021
Introduce a new parameter `--skip-llbuild-clean` to prevent this from
happening.

This mimicks similar logic in place for `swiftpm`, `swift-driver`
(#33563)  and `xctest` (#19512)

Addresses rdar://75057069
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.

3 participants