Skip to content
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

error: failed when testing. moonc version: v0.1.20241223+62b9a1a85 #381

Open
FlyCloudC opened this issue Dec 24, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@FlyCloudC
Copy link

FlyCloudC commented Dec 24, 2024

create project:

moon new --lib project1
cd ./project1

edit ./src/top.mbt :

test {
  fn f(_x) {
    ignore(f)
  }

  f(1)
}

run test command:

moon test

output :

failed: moonc link-core C:\Users\FlyCloudC\.moon\lib\core\target\wasm-gc\release\bundle\core.core D:\Code\moonbit\bug\project1\target\wasm-gc\debug\test\hello.internal_test.core -main username/hello -o D:\Code\moonbit\bug\project1\target\wasm-gc\debug\test\hello.internal_test.wasm -test-mode -pkg-config-path D:\Code\moonbit\bug\project1\src\moon.pkg.json -pkg-sources username/hello:D:\Code\moonbit\bug\project1\src -pkg-sources moonbitlang/core:C:\Users\FlyCloudC\.moon\lib\core -exported_functions moonbit_test_driver_internal_execute,moonbit_test_driver_finish -target wasm-gc -g -O0

         --  --
       /  //  / __--------_
      /  //  /_/            \
   ---      -                \ __
  / X        /        ____   /   )
  *_________/__/_____/______/ `--

Oops, the compiler has encountered an unexpected situation.
This is a bug in the compiler.

A bug report containing the error description and relevant code would be
greatly appreciated. You can submit the bug report here:

  https://github.com/moonbitlang/moonbit-docs/issues/new?labels=bug,ICE

Error: Moonc.Basic_hash_string.Key_not_found("$$username/hello.__test_746f702e6d6274_0.f.fn/1-cap")

Compiler args: moonc link-core "C:\\Users\\FlyCloudC\\.moon\\lib\\core\\target\\wasm-gc\\release\\bundle\\core.core" "D:\\Code\\moonbit\\bug\\project1\\target\\wasm-gc\\debug\\test\\hello.internal_test.core" -main username/hello -o "D:\\Code\\moonbit\\bug\\project1\\target\\wasm-gc\\debug\\test\\hello.internal_test.wasm" -test-mode -pkg-config-path "D:\\Code\\moonbit\\bug\\project1\\src\\moon.pkg.json" -pkg-sources "username/hello:D:\\Code\\moonbit\\bug\\project1\\src" -pkg-sources "moonbitlang/core:C:\\Users\\FlyCloudC\\.moon\\lib\\core" -exported_functions moonbit_test_driver_internal_execute,moonbit_test_driver_finish -target wasm-gc -g -O0   

moonc version: v0.1.20241223+62b9a1a85
error: failed when testing
@peter-jerry-ye peter-jerry-ye added the bug Something isn't working label Dec 24, 2024
@Yu-zh
Copy link
Collaborator

Yu-zh commented Dec 24, 2024

Thanks for reporting this bug. It will be fixed in the next release.

@Yu-zh
Copy link
Collaborator

Yu-zh commented Dec 24, 2024

Btw, this is a bug only in the debug mode, you can use moon test --release to workaround this bug for now.

@peter-jerry-ye peter-jerry-ye added this to the Readthedocs 2024/12/30 milestone Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants