[build-script] Clean submodules where applicable #4553
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When updating the project with the clean option, ensure that sub modules are cleaned as well. This issue can be tested by adding a line to swift-corelibs-libdispatch/libkqueue/README.md - if this file is changed then the reset hard on the libdispatch project will fail silently before this fix. As a result the libdispatch project checkout can become out of date.
Resolves SR-2524.
When building Swift from a non-clean checkout, the
git reset
thatoccurs on subprojects that include submodules may fail if the submodule
is deemed to have been changed (for example, by running the autoconf
scripts).
When cleaning the projects, ensure that
git submodule
is used to cleansubmodules and reset them to their original state as well, so that the
project can be reset successfully.
Issue: SR-2524