Skip to content

[SwiftBuild] Use hostBuildTool product type for build plugin targets #8936

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extension PackagePIFProjectBuilder {
let pluginTargetKeyPath = try self.project.addTarget { _ in
ProjectModel.Target(
id: pluginModule.pifTargetGUID,
productType: .executable,
productType: .hostBuildTool,
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 an automated tests to ensure we don't regress in the future?

Copy link
Author

Choose a reason for hiding this comment

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

As far as I could tell, we don't really have any existing unit tests for this logic, only integration tests, unless I'm overlooking something?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree adding more test coverage would be beneficial.

@pmattos Did you add any tests for the PIF generation in libSwiftPM?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I didn't... only those on the Xcode side of things.

We do have XCBuild PIF tests that we plan to port over eventually.

name: pluginModule.name,
productName: pluginModule.name
)
Expand Down