gleam icon indicating copy to clipboard operation
gleam copied to clipboard

Gleam compiler issue with lustre RC version specified

Open rawhat opened this issue 1 year ago • 5 comments

Hello!

I am trying to test out the latest lustre release candidate. I have set the version to this in my gleam.toml:

lustre = "4.0.0-rc1"

With both Gleam v0.34.1 and v1.0.0-rc2 I get similar output:

hooper ~/projects/spades/client (with-lustre*) δ gleam build
  Resolving versions
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
with this information and the code that produces the crash.

        /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

It works with a version without the rc1 specified, i.e. = "3.1.4" is okay.

Thank you 😄

rawhat avatar Feb 23 '24 21:02 rawhat

I've been unable to reproduce this. Could you share a reproduction please 🙏

I think @hayleigh-dot-dev may have one also

lpil avatar Feb 24 '24 16:02 lpil

Ahhh okay, I see where the issue is stemming from (I think).

It doesn't happen with just lustre = "4.0.0-rc1". However, it does happen with that and lustre_http. That package depends on lustre = "~> 3.0" so I suspect that's the problem? That it can't resolve those two versions in some fashion.

Seems like this would be expected, but I guess some condition is not being handled causing it to panic?

rawhat avatar Feb 24 '24 16:02 rawhat

I couldn't say, I don't know anything about how pubgrub works. We'll need to make a reproduction and share that with the https://github.com/pubgrub-rs/pubgrub team.

lpil avatar Feb 24 '24 16:02 lpil

https://github.com/rawhat/version_test this replicates the behavior. I'm not sure what they would like / prefer as a reproduction case in that repo.

rawhat avatar Feb 24 '24 16:02 rawhat

We'll need to add logging to the compiler so that we can see all the values fed to their library, and then make a reproduction that adds those values directly outside the context of the repo.

lpil avatar Feb 24 '24 16:02 lpil

We'll need to add logging to the compiler so that we can see all the values fed to their library, and then make a reproduction that adds those values directly outside the context of the repo.

I've been digging into this in https://github.com/gleam-lang/gleam/issues/3201.

I was able to create a reproduction outside of the Gleam compiler and have filed an issue with pubgrub: https://github.com/pubgrub-rs/pubgrub/issues/222

maxdeviant avatar May 27 '24 00:05 maxdeviant

@maxdeviant you hero!! Thank you so much!!

lpil avatar May 28 '24 09:05 lpil