Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency version constraint from path dependency not respected #3890

Open
JonasGruenwald opened this issue Nov 25, 2024 · 1 comment
Open
Labels
bug Something isn't working help wanted Contributions encouraged priority:high

Comments

@JonasGruenwald
Copy link

Version: [email protected] (OTP26)

Steps

Clone this version of lustre and try to build one of the test projects

git clone https://github.com/lustre-labs/lustre.git
cd lustre
git checkout 969f77de72ca9502aa160e637d2f4fce86f94053
cd test-apps/vdom-test-templates
gleam build

The following error appears:

error: Unknown module
   ┌─ /Users/jonas/Projects/lustre/src/lustre/internals/vdom.gleam:10:1
   │
10 │ import gleam/string_tree.{type StringTree}
   │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

No module has been found with the name `gleam/string_tree`.

error: Unknown type
    ┌─ /Users/jonas/Projects/lustre/src/lustre/internals/vdom.gleam:184:60
    │
184 │ pub fn element_to_string_builder(element: Element(msg)) -> StringTree {
    │                                                            ^^^^^^^^^^ Did you mean `String`?

The type `StringTree` is not defined or imported in this module.

Indicating that a pre-0.43 version of the gleam_stdlib is pulled into that project, but lustre, has this constraint:

https://github.com/lustre-labs/lustre/blob/969f77de72ca9502aa160e637d2f4fce86f94053/gleam.toml#L40-L40

And is referenced as a path dependency like so:

https://github.com/lustre-labs/lustre/blob/969f77de72ca9502aa160e637d2f4fce86f94053/test-apps/vdom-test-templates/gleam.toml#L6-L7

So I would have expected it to either respect the version constraint given by lustre, or throw a dependency resolution error if that's not possible, rather than compiling and erroring since the stdlib version is too old

@JonasGruenwald JonasGruenwald added the bug Something isn't working label Nov 25, 2024
@lpil
Copy link
Member

lpil commented Nov 25, 2024

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Contributions encouraged priority:high
Projects
None yet
Development

No branches or pull requests

2 participants