You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Commands] Migrate: Avoid injecting feature settings into every Swift… (#8700)
… module
### Motivation:
Previously the feature flags in `:migrate` mode were injected globally
into "destination" parameter and affected every module in the graph,
this is technically harmless but creates a lot of noise and precludes
some of the future optimizations i.e. avoid injecting `@concurrent` into
some closure literals when context is already `@concurrent`.
Instead of using build parameters, let's make the `Module.buildSettings`
mutable in SwiftPM package and inject feature settings directly into
`buildSettings` of the user-requested or all root package modules
instead.
### Modifications:
- Make `Module.buildSettings` to be a `package(set) var` instead of a
`let` to allow for mutation my migration command.
- Update `Migrate` command to inject the requested upcoming/experimental
features in `:migrate` mode only into request targets or all non-plugin
modules of root packages.
### Result:
No more global build flags and extraneous warnings from dependency
modules that shouldn't have migration enabled.
0 commit comments