Open edman opened 1 month ago
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)
Hi! Could you show your start_lustre function?
start_lustre
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#L77While this returns a
Result(Cache, SketchError)
https://github.com/ghivert/sketch/blob/main/sketch/src/sketch.gleam#L88