Skip to content

Commit 8b6aca9

Browse files
committed
Dont run the build tool plugin on windows
1 parent 853edf2 commit 8b6aca9

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ 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) && !compiler(>=6.0)
9+
#if os(Windows)
1110
return []
1211
#endif
1312

assets/test/targets/Sources/BuildToolExecutableTarget/BuildToolExecutableTarget.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !(os(Windows) && swift(<6.1))
1+
#if !os(Windows)
22
import Foundation
33

44
@main
@@ -36,4 +36,10 @@ enum CodeGeneratorError: Error {
3636
case invalidArguments
3737
case invalidData
3838
}
39+
#else
40+
@main
41+
struct DummyMain {
42+
static func main() {
43+
}
44+
}
3945
#endif

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ suite("ProjectPanelProvider Test Suite", function () {
131131
});
132132

133133
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-
) {
134+
if (process.platform === "win32") {
138135
this.skip();
139136
}
140137

@@ -193,7 +190,13 @@ suite("ProjectPanelProvider Test Suite", function () {
193190
expect(dep).to.not.be.undefined;
194191
});
195192

196-
test("Executes a task", async () => {
193+
test("Executes a task", async function () {
194+
if (
195+
process.platform === "win32" &&
196+
workspaceContext.globalToolchain.swiftVersion.isLessThan(new Version(5, 10, 0))
197+
) {
198+
this.skip();
199+
}
197200
const task = await getBuildAllTask();
198201
expect(task).to.not.be.undefined;
199202
const treeItem = task?.toTreeItem();
@@ -223,7 +226,7 @@ suite("ProjectPanelProvider Test Suite", function () {
223226
if (
224227
process.platform === "win32" &&
225228
workspaceContext.globalToolchain.swiftVersion.isLessThanOrEqual(
226-
new Version(5, 9, 0)
229+
new Version(5, 10, 0)
227230
)
228231
) {
229232
this.skip();

0 commit comments

Comments
 (0)