Skip to content

Use only enabled traits when loading package #8970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Sources/Workspace/Workspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1262,8 +1262,7 @@ extension Workspace {
prebuilts: [:],
fileSystem: self.fileSystem,
observabilityScope: observabilityScope,
// For now we enable all traits
enabledTraits: Set(manifest.traits.map(\.name))
enabledTraits: try manifest.enabledTraits(using: .default)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: can we add one or more automated tests to ensure we don't regress the behaviour?

)
return try builder.construct()
}
Expand Down Expand Up @@ -1330,8 +1329,7 @@ extension Workspace {
createREPLProduct: self.configuration.createREPLProduct,
fileSystem: self.fileSystem,
observabilityScope: observabilityScope,
// For now we enable all traits
enabledTraits: Set(manifest.traits.map(\.name))
enabledTraits: try manifest.enabledTraits(using: .default)
)
return try builder.construct()
}
Expand Down