Skip to content

Add support to PIF builder for executable product aliasing for plugin tools#10136

Merged
cmcgee1024 merged 2 commits into
swiftlang:release/6.4.xfrom
cmcgee1024:pif_builder_plugin_tool_product_64x
May 28, 2026
Merged

Add support to PIF builder for executable product aliasing for plugin tools#10136
cmcgee1024 merged 2 commits into
swiftlang:release/6.4.xfrom
cmcgee1024:pif_builder_plugin_tool_product_64x

Conversation

@cmcgee1024
Copy link
Copy Markdown
Member

Executable targets are automatically promoted as products with the same
name. They can also be named differently using an explicit product that
depends on the executable target.

When declaring a plugin in the same package as an executable used as a
plugin tool the package manifest requires that the dependency be on the
executable target and not a product of the package, and so the
dependency is always on the target.

In this case when the plugin gets the tool using PluginContext.tool it
generally uses the executable target name as the name of the tool, which is
logical given that the dependency is on that target.

Make the PIF builder take into account that the explicit product of the
executable target may not have the same name as the executable target
when doing the tool lookup. It should relate the executable target's name
to an executable product that builds and runs on the host to make the
dependency from the custom task in the PIF, and also calculate the tool's
URL when invoking the plugin on a particular target.

… tools (swiftlang#10107)

Executable targets are automatically promoted as products with the same
name. They can also be named differently using an explicit product that
depends on the executable target.

When declaring a plugin in the same package as an executable used as a
plugin tool the package manifest requires that the dependency be on the
executable target and not a product of the package, and so the
dependency is always on the target.

In this case when the plugin gets the tool using `PluginContext.tool` it
generally uses the executable target name as the name of the tool, which is
logical given that the dependency is on that target.

Make the PIF builder take into account that the explicit product of the
executable target may not have the same name as the executable target
when doing the tool lookup. It should relate the executable target's name
to an executable product that builds and runs on the host to make the
dependency from the custom task in the PIF, and also calculate the tool's
URL when invoking the plugin on a particular target.
@cmcgee1024 cmcgee1024 changed the base branch from main to release/6.4.x May 27, 2026 17:48
@cmcgee1024
Copy link
Copy Markdown
Member Author

@swift-ci please test

@cmcgee1024
Copy link
Copy Markdown
Member Author

@swift-ci test Linux

@cmcgee1024
Copy link
Copy Markdown
Member Author

@swift-ci please test

@bkhouri
Copy link
Copy Markdown
Contributor

bkhouri commented May 28, 2026

The Swift Test Windows Platform build results were not reported, like encountered #9593 Re-triggering.

@swift-ci test windows

@cmcgee1024 cmcgee1024 enabled auto-merge (squash) May 28, 2026 15:52
@cmcgee1024 cmcgee1024 merged commit f26f9af into swiftlang:release/6.4.x May 28, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants