Skip to content

Commit 42d42e8

Browse files
Build fix with 6.0
1 parent e7b9d23 commit 42d42e8

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Plugins/PackageToJS/Sources/PackageToJS.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct PackagingPlanner {
142142
var packageInputs: [MiniMake.TaskKey] = []
143143

144144
// Guess the build configuration from the parent directory name of .wasm file
145-
let (buildConfiguration, triple) = deriveBuildConfiguration()
145+
let (buildConfiguration, _) = deriveBuildConfiguration()
146146
let wasm: MiniMake.TaskKey
147147

148148
let shouldOptimize: Bool
@@ -215,7 +215,7 @@ struct PackagingPlanner {
215215

216216
/// Construct the test build plan and return the root task key
217217
func planTestBuild(
218-
make: inout MiniMake,
218+
make: inout MiniMake
219219
) throws -> (rootTask: MiniMake.TaskKey, binDir: URL) {
220220
var (allTasks, outputDirTask) = try planBuildInternal(
221221
make: &make, splitDebug: false
@@ -259,7 +259,7 @@ struct PackagingPlanner {
259259
"PACKAGE_TO_JS_MODULE_PATH": wasmFilename,
260260
"PACKAGE_TO_JS_PACKAGE_NAME": options.packageName ?? packageId.lowercased(),
261261
]
262-
let (buildConfiguration, triple) = deriveBuildConfiguration()
262+
let (_, triple) = deriveBuildConfiguration()
263263
let conditions = [
264264
"USE_SHARED_MEMORY": triple == "wasm32-unknown-wasip1-threads",
265265
"IS_WASI": triple.hasPrefix("wasm32-unknown-wasi"),
@@ -299,4 +299,4 @@ func logCommandExecution(_ command: String, _ arguments: [String]) {
299299
var fullArguments = [command]
300300
fullArguments.append(contentsOf: arguments)
301301
print("$ \(fullArguments.map { "\"\($0)\"" }.joined(separator: " "))")
302-
}
302+
}

Plugins/PackageToJS/Sources/PackageToJSPlugin.swift

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#if canImport(PackagePlugin)
2-
import struct Foundation.URL
3-
import struct Foundation.Data
4-
import class Foundation.Process
5-
import class Foundation.ProcessInfo
6-
import class Foundation.FileManager
7-
import func Foundation.fputs
8-
import func Foundation.exit
2+
// Import minimal Foundation APIs to speed up overload resolution
3+
@preconcurrency import struct Foundation.URL
4+
@preconcurrency import struct Foundation.Data
5+
@preconcurrency import class Foundation.Process
6+
@preconcurrency import class Foundation.ProcessInfo
7+
@preconcurrency import class Foundation.FileManager
8+
@preconcurrency import func Foundation.fputs
9+
@preconcurrency import func Foundation.exit
910
@preconcurrency import var Foundation.stderr
1011
import PackagePlugin
1112

0 commit comments

Comments
 (0)