#Unsatisfiable dependency version constraints in new lustre project

1 messages · Page 1 of 1 (latest)

small swan
#

I'm new to both Gleam and Lustre (but I have experience with Elm and various other languages).

I started a new app and installed lustre. When I try to install lustre_ui, I get an error message. Here's a complete transcript:

spiral:~/src$ gleam new app
Your Gleam project app has been successfully created.
The project can be compiled and tested by running these commands:

    cd app
    gleam test

spiral:~/src$ cd app
spiral:~/src/app$ gleam add lustre
  Resolving versions
Downloading packages
 Downloaded 7 packages in 0.01s
      Added gleam_erlang v1.3.0
      Added gleam_json v3.1.0
      Added gleam_otp v1.2.0
      Added gleam_stdlib v0.67.1
      Added gleeunit v1.9.0
      Added houdini v1.2.0
      Added lustre v5.4.0
spiral:~/src/app$ gleam add --dev lustre_dev_tools
  Resolving versions
Downloading packages
 Downloaded 31 packages in 0.03s
      Added argv v1.0.2
      Added booklet v1.1.0
      Added directories v1.2.0
      Added envoy v1.1.0
      Added exception v2.1.0
      Added filepath v1.1.2
      Added gleam_community_ansi v1.4.3
      Added gleam_community_colour v2.0.2
      Added gleam_crypto v1.5.1
      Added gleam_http v4.3.0
      Added gleam_httpc v5.0.0
      Added gleam_regexp v1.1.1
      Added gleam_time v1.6.0
      Added gleam_yielder v1.1.0
      Added glint v1.2.1
      Added glisten v8.0.1
      Added gramps v6.0.0
      Added group_registry v1.0.0
      Added hpack_erl v0.3.0
      Added justin v1.0.1
      Added logging v1.3.0
      Added lustre_dev_tools v2.3.1
      Added marceau v1.3.0
      Added mist v5.0.3
      Added platform v1.0.0
      Added polly v2.1.0
      Added simplifile v2.3.1
      Added snag v1.2.0
      Added telemetry v1.3.0
      Added tom v2.0.0
      Added wisp v2.1.1
spiral:~/src/app$ gleam add lustre_ui
  Resolving versions
error: Dependency resolution failed

There's no compatible version of `gleam_community_colour`:
  - You require lustre_ui >= 0.0.0
    - lustre_ui requires gleam_community_colour >= 1.1.0 and < 2.0.0
  - You require gleam_community_colour 2.0.2

There's no compatible version of `gleam_json`:
  - You require lustre_ui >= 0.0.0
    - lustre_ui requires gleam_json >= 2.0.0 and < 3.0.0
  - You require gleam_json 3.1.0

spiral:~/src/app$

I'm a little confused at the message "You require gleam_json 3.1.0" since I haven't intentionally imposed any such constraint. (I've never even heard of that package before now.)

How should I proceed?

(I wasn't sure where to ask about this, because it isn't obvious to me which package is "most" responsible for these unsatisfiable constraints. If there's a better place to ask, I'd be happy to go there!)

Thank you!

vagrant cargo
#

lustre_ui is currently quite out of date, and you'll run into a few dependency issues trying to use it currently (namely that it pins lustre v4 not v5)

Hayleigh had mentioned there would eventually be an updated version of lustre_ui released but you're probably better off not using it for the time being

As for that error itself, you can see the following line when you ran gleam add lustre

      Added gleam_json v3.1.0

because lustre v5 pins gleam_json v3, lustre_ui whose dependencies can be found in its gleam.toml, pins gleam_json v2

the line You require gleam_json 3.1.0 is telling you that you have that dependency pinned, it doesn't elaborate on whether or not you explicitly pinned it or if it was via a transitive dependency, but you can see in your manifest.toml that the version of that lib is stated

small swan
#

I see, thank you! That all makes sense.

vagrant cargo
#

happy to help! lucysparkles

#

some of these dependency conflict messages can be a bit overwhelming at first (though theyre way better than they used to be), it's something you get used to parsing over time

small swan
#

right on

#

i have to admit i'm pretty spoiled coming from go modules

vagrant cargo
#

go has had modules for almost 5 times as long as gleam has been v1 lucy we'll get there squirtle

small swan
#

oh totally, no shade!

vagrant cargo
#

none taken, go is/was my main language before gleam, youre in good company here 😄

small swan
#

nice 🤭

vagrant cargo
#

definitely some things to get adapted to

#

having an actual package registry and the way dep versions work is as youve seen a decently important one

small swan
#

yeah

#

go's dependency version resolution is pretty unusual, ive never seen another language that takes that approach

#

"MVS"

#

i like how it works but it's swimming against the current compared to most languages

mint reef
#

Personally I think Gleam’s approach is much better than Go’s