Skip to content

Commit 0c7ebf2

Browse files
authored
SwiftBuild: Enable traits support (#8873)
When Creasting the SwiftBuildSystem Factory, the traits configuration was not passed when loading the package graph. Update the factory to pass the traits configuration during package resolution, and remove the `withKnownIssues` in TraitTests as it relates to SwiftBuild. There are some know issues, which are tracked via the automated tests.
1 parent 201198a commit 0c7ebf2

File tree

2 files changed

+186
-64
lines changed

2 files changed

+186
-64
lines changed

Sources/CoreCommands/BuildSystemSupport.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ private struct SwiftBuildSystemFactory: BuildSystemFactory {
120120
buildParameters: productsBuildParameters ?? self.swiftCommandState.productsBuildParameters,
121121
packageGraphLoader: packageGraphLoader ?? {
122122
try await self.swiftCommandState.loadPackageGraph(
123-
explicitProduct: explicitProduct
123+
explicitProduct: explicitProduct,
124+
traitConfiguration: traitConfiguration,
124125
)
125126
},
126127
packageManagerResourcesDirectory: swiftCommandState.packageManagerResourcesDirectory,

0 commit comments

Comments
 (0)