gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
17.5k stars 726 forks source link

Crash when adding cyclic import #3376

Closed Nicd closed 2 months ago

Nicd commented 2 months ago
  1. Get this repo and this specific commit: https://git.ahlcode.fi/nicd/aurinko/src/commit/6ac6e4bd7f5b7391b9cc23c78e01f94336e31ccb
  2. Open file src/aurinko/web/components/main.gleam.
  3. Add import aurinko at the top of the file.
error: Fatal compiler bug!

[...]

Panic: /Users/runner/work/gleam/gleam/compiler-core/src/build/package_loader.rs:298
    import must exist for there to be a cycle
Gleam version: 1.3.0
Operating system: macos

I tried running with GLEAM_LOG=trace open . -a Visual\ Studio\ Code.app but it didn't seem to alter the output, even though the env var value was shown in the VSCode builtin terminal.

lpil commented 2 months ago

Thank you