Skip to content

Commit 721d213

Browse files
committed
Build tool plugins arent called on windows < 6.0
1 parent 509913f commit 721d213

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

assets/test/targets/Plugins/BuildToolPlugin/BuildToolPlugin.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ struct SimpleBuildToolPlugin: BuildToolPlugin {
66
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] {
77
guard let sourceFiles = target.sourceModule?.sourceFiles else { return [] }
88

9+
// Build tool plugins are not being called on Windows with Swift < 6.0.
10+
#if os(Windows) && swift(<6.0)
11+
return []
12+
#endif
13+
914
let generatorTool = try context.tool(named: "ExecutableTarget")
1015

1116
// Construct a build command for each source file with a particular suffix.

test/integration-tests/ui/ProjectPanelProvider.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,14 @@ suite("ProjectPanelProvider Test Suite", function () {
130130
);
131131
});
132132

133-
test("Shows files generated by build tool plugin", async () => {
133+
test("Shows files generated by build tool plugin", async function () {
134+
if (
135+
process.platform === "win32" &&
136+
workspaceContext.globalToolchain.swiftVersion.isLessThan(new Version(6, 0, 0))
137+
) {
138+
this.skip();
139+
}
140+
134141
const children = await getHeaderChildren("Targets");
135142
const target = children.find(n => n.name === "LibraryTarget") as PackageNode;
136143
expect(

0 commit comments

Comments
 (0)