Skip to content

Fix wasm compilation after KT-63348 #4439

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged

Conversation

cypressious
Copy link
Contributor

@cypressious cypressious commented May 16, 2025

The suppressed warning was indicating something wrong with the code. After KT-63348 we get a compilation error

file:///C:/Users/Kirill/IdeaProjects/user-projects/kotlinx.coroutines/build/wasm/packages/kotlinx-coroutines-testWasm-test/kotlin/kotlinx-coroutines-testWasm-test.uninstantiated.mjs:269
        const wasmModule = new WebAssembly.Module(wasmBuffer);
                           ^
CompileError: WebAssembly.Module(): Compiling function #6810:"kotlinx.coroutines.test.createTestResult" failed: call[0] expected type (ref null 6), found call of type externref @+775164
    at instantiate (file:///C:/Users/Kirill/IdeaProjects/user-projects/kotlinx.coroutines/build/wasm/packages/kotlinx-coroutines-testWasm-test/kotlin/kotlinx-coroutines-testWasm-test.uninstantiated.mjs:269:28)
    at async file:///C:/Users/Kirill/IdeaProjects/user-projects/kotlinx.coroutines/build/wasm/packages/kotlinx-coroutines-testWasm-test/kotlin/kotlinx-coroutines-testWasm-test.mjs:6:18

This commit fixes the compilation and allows us to remove the warning suppression.

@dkhalanskyjb
Copy link
Collaborator

Please target the develop branch. See https://github.com/Kotlin/kotlinx.coroutines/blob/master/CONTRIBUTING.md

@cypressious cypressious changed the base branch from master to develop May 19, 2025 08:01
@cypressious cypressious force-pushed the fix-wasm-compilation branch from dc4af76 to b4cd571 Compare May 19, 2025 08:03
@cypressious
Copy link
Contributor Author

Please target the develop branch. See https://github.com/Kotlin/kotlinx.coroutines/blob/master/CONTRIBUTING.md

done

@dkhalanskyjb dkhalanskyjb merged commit f0feb8e into develop May 19, 2025
1 check passed
@dkhalanskyjb dkhalanskyjb deleted the fix-wasm-compilation branch May 19, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants