Skip to content

Commit bebf0c5

Browse files
committed
Build tool plugins arent called on windows < 6.0
1 parent 579e714 commit bebf0c5

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
@@ -129,7 +129,14 @@ suite("ProjectPanelProvider Test Suite", function () {
129129
);
130130
});
131131

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

0 commit comments

Comments
 (0)