Skip to content

Commit e952244

Browse files
authored
[Commands] Initial implementation of swift package add-setting command (#8532)
### Motivation: Adds a way to programmatically insert new settings into a package manifest. Currently only some Swift settings are supported, namely: `enable{Upcoming, Experimental}Feature`, `swiftLanguageMode` and `strictMemorySafety`; but the command could be expanded to support more Swift (C, C++, linker) settings in the future. ### Modifications: - Add a new "package" sub-command named "add-setting" that accepts a target and a list of `--swift Name[=Value]?` pairs for each new swift setting to add. Each setting would make sure that manifest is new enough to support it. - Add new manifest refactoring action - AddSwiftSetting that would add `swiftSettings:` to a target or modify the existing one. - Expands existing way to check whether manifest is too old to support custom versions. This is doe to make sure that users don't add settings that are not supported by the manifest tools version i.e. `swiftLanguageMode` was introduced in 6.0 tools. ### Result: A new `swift package add-setting --target <name> [--swift Name[=Value]?]+` command that allows users to programmatically add new settings to package manifests.
1 parent bc074bd commit e952244

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)