Skip to content

Support "Custom Main and Global Executors" Proposal #350

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
kateinoigakukun opened this issue Apr 24, 2025 · 0 comments · Fixed by #353
Closed

Support "Custom Main and Global Executors" Proposal #350

kateinoigakukun opened this issue Apr 24, 2025 · 0 comments · Fixed by #353

Comments

@kateinoigakukun
Copy link
Member

kateinoigakukun commented Apr 24, 2025

make unittest started failing after DEVELOPMENT-SNAPSHOT-2025-04-03-a because it introduced "Custom Main and Global Executors" implementation swiftlang/swift#80266, and it introduced a slight incompatibility for the legacy hook API. As far as I checked, swift_task_enqueueMainExecutor_hook seems not called with the new implementation.

I think we should migrate our executor to use the new Swift-based APIs instead of the legacy hook.

make unittest log
make unittest SWIFT_SDK_ID=$SWIFT_SDK_ID
Running unit tests
env JAVASCRIPTKIT_EXPERIMENTAL_BRIDGEJS=1 swift package --swift-sdk "DEVELOPMENT-SNAPSHOT-2025-04-03-a-wasm32-unknown-wasi" \
    --disable-sandbox \
    -Xlinker --stack-first \
    -Xlinker --global-base=524288 \
    -Xlinker -z \
    -Xlinker stack-size=524288 \
    js test --prelude ./Tests/prelude.mjs
Building for debugging...
[0/2] Write swift-version-7923261AABE13AEE.txt
Build of product 'JavaScriptKitPackageTests' complete! (1.87s)
Packaging tests...
[1/21] .build/plugins/PackageToJS/outputs/PackageTests/package.json: skipped
[2/21] .build/plugins/PackageToJS/outputs/PackageTests.tmp/npm-install.stamp: skipped
[3/21] .build/plugins/PackageToJS/outputs/PackageTests/JavaScriptKitPackageTests.xctest.wasm: skipped
[4/21] .build/plugins/PackageToJS/outputs/PackageTests.tmp/wasm-imports.json: skipped
[5/21] .build/plugins/PackageToJS/outputs/PackageTests/bin: skipped
[6/21] .build/plugins/PackageToJS/outputs/PackageTests/bin/test.js: skipped
[7/21] .build/plugins/PackageToJS/outputs/PackageTests/bridge.js: skipped
[8/21] .build/plugins/PackageToJS/outputs/PackageTests/index.d.ts: skipped
[9/21] .build/plugins/PackageToJS/outputs/PackageTests/index.js: skipped
[10/21] .build/plugins/PackageToJS/outputs/PackageTests/instantiate.d.ts: skipped
[11/21] .build/plugins/PackageToJS/outputs/PackageTests/instantiate.js: skipped
[12/21] .build/plugins/PackageToJS/outputs/PackageTests/platforms/browser.d.ts: skipped
[13/21] .build/plugins/PackageToJS/outputs/PackageTests/platforms/browser.js: skipped
[14/21] .build/plugins/PackageToJS/outputs/PackageTests/platforms/browser.worker.js: skipped
[15/21] .build/plugins/PackageToJS/outputs/PackageTests/platforms/node.d.ts: skipped
[16/21] .build/plugins/PackageToJS/outputs/PackageTests/platforms/node.js: skipped
[17/21] .build/plugins/PackageToJS/outputs/PackageTests/runtime.d.ts: skipped
[18/21] .build/plugins/PackageToJS/outputs/PackageTests/runtime.js: skipped
[19/21] .build/plugins/PackageToJS/outputs/PackageTests/test.browser.html: skipped
[20/21] .build/plugins/PackageToJS/outputs/PackageTests/test.d.ts: skipped
[21/21] .build/plugins/PackageToJS/outputs/PackageTests/test.js: skipped
Packaging tests finished
Running test...
$ "/home/katei/.config/nvm/versions/node/v20.14.0/bin/node" "--experimental-wasi-unstable-preview1" "/home/katei/ghq/github.com/swiftwasm/JavaScriptKit/.build/plugins/PackageToJS/outputs/PackageTests/bin/test.js" "--prelude" "/home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Tests/prelude.mjs" "--"

Test Suites: 1 unknown, 1 total
Tests:       1 unknown, 1 total
Ran all test suites.

Failed test cases:
  ? JSObjectTests.testEmptyObject
@kateinoigakukun kateinoigakukun transferred this issue from swiftwasm/swift Apr 27, 2025
@kateinoigakukun kateinoigakukun changed the title make unittest fails with swift-DEVELOPMENT-SNAPSHOT-2025-04-03-a and later Support "Custom Main and Global Executors" Proposal Apr 27, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant