Skip to content

Commit e121697

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

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
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: 1 addition & 4 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

0 commit comments

Comments
 (0)