Skip to content

[Build] BuildPlan: Use Destination instead of BuildTriple to form… #7881

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
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion Sources/Build/BuildPlan/BuildPlan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ public class BuildPlan: SPMBuildCore.BuildPlan {
if let pluginConfiguration, !buildParameters.shouldSkipBuilding {
let pluginInvocationResults = try await Self.invokeBuildToolPlugins(
for: module,
destination: destination,
configuration: pluginConfiguration,
buildParameters: toolsBuildParameters,
modulesGraph: graph,
Expand Down Expand Up @@ -752,6 +753,7 @@ extension BuildPlan {
/// structures for later showing to the user, and not added directly to the diagnostics engine.
static func invokeBuildToolPlugins(
for module: ResolvedModule,
destination: BuildParameters.Destination,
configuration: PluginConfiguration,
buildParameters: BuildParameters,
modulesGraph: ModulesGraph,
Expand Down Expand Up @@ -786,7 +788,7 @@ extension BuildPlan {
components: [
package.identity.description,
module.name,
module.buildTriple.rawValue,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any remaining uses of buildTriple or can this property be removed now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we have a few more uses, mostly tests though. I'm planning to follow-up with SourceKitLSPAPI PR and then a PR to remove the rest.

destination == .host ? "tools" : "destination",
plugin.name,
]
)
Expand Down
1 change: 1 addition & 0 deletions Tests/SPMBuildCoreTests/PluginInvocationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,7 @@ final class PluginInvocationTests: XCTestCase {

let results = try await BuildPlan.invokeBuildToolPlugins(
for: module,
destination: .target,
configuration: pluginConfiguration,
buildParameters: buildParameters,
modulesGraph: graph,
Expand Down