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] AddSetting: Searching for a target in the manifest shouldn… (#8699)
…'t walk targets recursively
### Motivation:
Otherwise in situations like:
```swift
let package = Package(
name: "packages",
targets: [
.target(
name: "MyTest",
dependencies: [
.byName(name: "Dependency")
]
),
.target(
name: "Dependency"
)
]
)
```
When adding settings to `Dependency` we'd find `.byName(name:
"Dependency")`
instead of `.target(name: "Dependency", ...)`.
### Modifications:
- Replace use of `findFirst` in `AddSwiftSetting.addToTarget` with a
custom walk over the targets array.
### Result:
Find correct element in the manifest "targets" array.
swiftCommandState.observabilityScope.emit(error:"Could not update manifest for '\(target)' (\(error)). Please enable '\(features.map(\.name).joined(separator:", "))' features manually.")
0 commit comments