gleam-lang / gleam

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

Gleam compiler crash when removing a dependency #3123

Open mooreryan opened 1 month ago

mooreryan commented 1 month ago

This may be sort of a duplicate of https://github.com/gleam-lang/gleam/issues/2673 or https://github.com/gleam-lang/gleam/issues/2618.

Steps to reproduce

gleam new my_project
cd my_project
gleam add --dev startest
rg -F 'gleeunit/should' -l test/ -0 | xargs -0 sed -i 's|gleeunit/should|startest/expect|'
rg -F 'should.equal' -l test/ -0 | xargs -0 sed -i 's|should.equal|expect.to_equal|'
gleam remove gleeunit

The last command gives

error: Fatal compiler bug!

This is a bug in the Gleam compiler, sorry!

Please report this crash to https://github.com/gleam-lang/gleam/issues/new
and include this error message with your report.

Panic: /cargo/registry/src/index.crates.io-6f17d22bba15001f/pubgrub-0.2.1/src/internal/partial_solution.rs:131
        add_derivation should not be called after a decision
Gleam version: 1.1.0
Operating system: linux

If you can also share your code and say what file you were editing or any
steps to reproduce the crash that would be a great help.

You may also want to try again with the `GLEAM_LOG=trace` environment
variable set.

Here is the trace when running GLEAM_LOG=trace gleam remove gleeunit: compiler_trace.txt

Context

Following the migrating from gleeunit guide.

lpil commented 1 month ago

Thank you