swiftwasm / JavaScriptKit

Swift framework to interact with JavaScript through WebAssembly.
https://swiftpackageindex.com/swiftwasm/JavaScriptKit/main/documentation/javascriptkit
MIT License
664 stars 44 forks source link

Fix availability marker for Swift 5.9 compiler targeting host machine #232

Closed kateinoigakukun closed 7 months ago

kateinoigakukun commented 7 months ago

When building JavaScriptKit with Xcode, targeting host machine, the func enqueue(_: ExecutorJob) must be guarded by @available attribute explicitly. And due to the 5.9 compiler issue, it emit some migration warnings too consevatively. This commit suppress the warning by updating minimum available OS versions. Those versions should not be a problem when building for Wasm.

github-actions[bot] commented 7 months ago

Time Change: +313ms (3%)

Total Time: 9,511ms

Test name Duration Change
Serialization/JavaScript function call through Wasm import with int 13ms -1ms
Serialization/JavaScript Number to Swift Int 329ms +18ms (5%) 🔍
Serialization/JavaScript String to Swift String 3,708ms +201ms (5%) 🔍
View Unchanged | Test name | Duration | Change | | :--- | :---: | :---: | | Serialization/JavaScript function call through Wasm import | 18ms | -0ms | | Serialization/JavaScript function call from Swift | 141ms | -3ms (2%) | | Serialization/Swift Int to JavaScript with assignment | 311ms | -1ms | | Serialization/Swift Int to JavaScript with call | 942ms | +22ms (2%) | | Serialization/Swift String to JavaScript with assignment | 391ms | +14ms (3%) | | Serialization/Swift String to JavaScript with call | 1,007ms | +37ms (3%) | | Object heap/Increment and decrement RC | 2,637ms | +28ms (1%) |
View Baselines | Test name | Duration | | :--- | :---: | | Serialization/Call JavaScript function directly | 3ms | | Serialization/Assign JavaScript number directly | 2ms | | Serialization/Call with JavaScript number directly | 3ms | | Serialization/Write JavaScript string directly | 2ms | | Serialization/Call with JavaScript string directly | 2ms |