JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.24k stars 1.11k forks source link

Binaryen error on Windows machine #4866

Closed AzimMuradov closed 1 month ago

AzimMuradov commented 1 month ago

Describe the bug I have an issue on the newest Kotlin + Compose:

I've moved to Kotlin 2.0.0 and Compose 1.6.10. I had no problems building the project (./gradlew build -Dorg.gradle.jvmargs=-Xmx2048m) locally (Linux), but when I pushed the changes to the remote, I had an issue with Binaryen when building the project on a Windows machine (CI, windows-latest). On Linux (CI, ubuntu-latest) everything works fine. Binaryen is used for Web (Wasm) target.

The problem occurs on the compileProductionExecutableKotlinWasmJsOptimize task.

Part of the error message: "UNREACHABLE executed at D:\a\binaryen\binaryen\src\passes\Precompute.cpp:838!"

Versions

Windows Image: image

JDK: image

To Reproduce Steps to reproduce the behavior:

Currently, I have no small reproducible for the issue. I'll try to add one soon.

Expected behavior Should build fine.

Screenshots

image

Additional context

Link to CI job run: https://github.com/AzimMuradov/stardew-valley-designer/actions/runs/9225193475/job/25383277282

AzimMuradov commented 1 month ago

Logs: logs_24148234620.zip

mazunin-v-jb commented 1 month ago

Hello, @AzimMuradov! I'll pass it to the team, however, reproducer would be nice though. Could you please attach it once you've made it? It would be really helpful.

AzimMuradov commented 1 month ago

Could you please attach it once you've made it? It would be really helpful.

Currently, you can reproduce it on Windows using this branch https://github.com/AzimMuradov/stardew-valley-designer/tree/k2 of my project. Although this is quite a large project, I'll try create a smaller reproducible later.

P.S. Before this comment, I accidentally clicked "save" in my reply, thus sending an unfinished message, sorry :)

AzimMuradov commented 1 month ago

I also found related youtrack issue: https://youtrack.jetbrains.com/issue/KT-68088

eymar commented 1 month ago

Since the issue only happens on Windows AND with binaryen enabled, it's likely that the core cause is not in Compose.

Since the issue is already reported in Kotlin tracker, let's close this one.