We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I get build errors in my app on gleam run -m lustre/dev build after updating tardis to 0.2.
gleam run -m lustre/dev build
Compiling tardis error: Type mismatch ┌─ /client/build/packages/tardis/src/tardis.gleam:134:17 │ 134 │ |> result.try(start_lustre(lustre_root, _)) │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected type: fn(App(Nil, Model, Msg)) -> Result(fn(Action(Msg, ClientSpa)) -> Nil, SketchError) Found type: fn(App(Nil, Model, Msg)) -> Result(fn(Action(Msg, ClientSpa)) -> Nil, Error)
It looks like gleam's type checker infers different types for sketch.cache depending on the target.
sketch.cache
This returns a Result(Cache, a) https://github.com/ghivert/sketch/blob/main/sketch/src/sketch.gleam#L77
Result(Cache, a)
While this returns a Result(Cache, SketchError) https://github.com/ghivert/sketch/blob/main/sketch/src/sketch.gleam#L88
Result(Cache, SketchError)
The text was updated successfully, but these errors were encountered:
Hi! Could you show your start_lustre function?
start_lustre
Sorry, something went wrong.
I'm seeing the same error:
error: Type mismatch ┌─ /home/brett/Repositories/brettcannon/choose-a-font.dev/build/packages/tardis/src/tardis.gleam:134:17 │ 134 │ |> result.try(start_lustre(lustre_root, _)) │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected type: fn(App(Nil, Model, Msg)) -> Result(fn(Action(Msg, lustre.ClientSpa)) -> Nil, error.SketchError) Found type: fn(App(Nil, Model, Msg)) -> Result(fn(Action(Msg, lustre.ClientSpa)) -> Nil, error.Error)
I'm using lustre.simple() and launching using gleam run -m lustre/dev start.
lustre.simple()
gleam run -m lustre/dev start
And my start_lustre function from tardis.gleam is:
tardis.gleam
fn start_lustre(lustre_root, application) { application |> lustre.start(lustre_root, Nil) |> result.map_error(error.LustreError) }
This is with:
No branches or pull requests
I get build errors in my app on
gleam run -m lustre/dev build
after updating tardis to 0.2.It looks like gleam's type checker infers different types for
sketch.cache
depending on the target.This returns a
Result(Cache, a)
https://github.com/ghivert/sketch/blob/main/sketch/src/sketch.gleam#L77
While this returns a
Result(Cache, SketchError)
https://github.com/ghivert/sketch/blob/main/sketch/src/sketch.gleam#L88
The text was updated successfully, but these errors were encountered: