lustre-labs / dev-tools

Lustre's CLI and development tooling: zero-config dev server, bundling, and scaffolding.
45 stars 15 forks source link

dynamic.unsafe_coerce is not available #69

Closed ahankinson closed 3 weeks ago

ahankinson commented 3 weeks ago

Trying to run the "Getting Started" tutorial, I run:

$ gleam run -m lustre/dev start

And I get this message:

error: Unknown module field
   ┌─ /Users/ahankins/Documents/code/rism/learn/lustretest/build/packages/glisten/src/glisten/socket/options.gleam:58:40
   │
58 │   |> list.map(pair.map_first(_, dynamic.unsafe_coerce))
   │                                        ^^^^^^^^^^^^^^

The module `gleam/dynamic` does not have a `unsafe_coerce` value.

error: Unknown module field
   ┌─ /Users/ahankins/Documents/code/rism/learn/lustretest/build/packages/glisten/src/glisten/socket/options.gleam:80:22
   │
80 │   |> list.map(dynamic.unsafe_coerce)
   │                      ^^^^^^^^^^^^^^

The module `gleam/dynamic` does not have a `unsafe_coerce` value.

glisten has already removed this call, but somewhere in the dependencies for the dev tools it's pinned to an earlier version.

hayleigh-dot-dev commented 3 weeks ago

It's not a problem with dev tools it's a problem with wisp. When they release this PR we can update our dependencies.

Until then you can workaround the issue by fixing your stdlib to 0.39.0

hayleigh-dot-dev commented 3 weeks ago

I'll leave this open because I suspect more folks will come across this until wisp is updated!

ahankinson commented 3 weeks ago

Until then you can workaround the issue by fixing your stdlib to 0.39.0

Thanks! Do you have any idea how to do that? I set gleam_stdlib = "<= 0.39.0" in my gleam.toml, but I'm still getting the same error.

hayleigh-dot-dev commented 3 weeks ago

Yeah you just need to do gleam_stdlib = "0.39.0" ^.^ Because the stdlib is still v0 for the time being these kind of things happen from time to time. It'll just be a few days before everyone catches up so thanks for being patient!

hayleigh-dot-dev commented 3 weeks ago

Everything should be updated and good to go!

ahankinson commented 3 weeks ago

It works! Thank you so much.