[Package/Build] Remove SwiftTarget.toolsSwiftVersion
in favor of a build setting
#7557
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.
Follow-up to #7544 and associated discussion related to how tools version doesn't mean what it used to with introduction of per-target swift version settings.
Motivation:
Unify handling of swift language version setting to make it harder for users to make mistakes when selected one.
Modifications:
Add a way to specify a default setting assignment
This setting is going to be used if there are no non-default
assignments that match build environment conditions.
Remove
toolsSwiftVersion
from SwiftTarget in favor of a build settingStart using "default" assignments to represent tools version
based swift language version setting that is going to be produced
by
BuildSettings.Scope
if no other assignments match buildenvironment conditions.
This removes ambiguity from
-swift-version
selection fordownstream clients.
[PIF] Re-implement swift language version handling
Since
toolSwiftVersion
is gone and swift language version isnow handled by the build settings we need to adjust
PIFBuilder
to handle that properly.
PIF build settings can handle per-target platform specific settings
which are now expressible in SwiftPM via
.swiftLanguageVersion
build setting, handling of such settings is implemented in this commit
Result:
Swift language version is handled uniformly as a build setting.