Skip to content

Fix wasm compilation in user project branch #4438

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

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.

PR to master: #4439

@cypressious cypressious force-pushed the fix-wasm-compilation-k2-dev branch from 3e5b673 to fc187da Compare May 16, 2025 12:20
@tbogdanova tbogdanova merged commit 8c3415e into kotlin-community/k2/dev May 19, 2025
1 check passed
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