You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
16:07:23 ~/Documents/GitHub/plume bug-1 $ ../roc/target/debug/roc examples/bar-chart.roc
thread 'main' panicked at crates/compiler/mono/src/reset_reuse.rs:1244:42:
Expected symbol `plume.Scatter.56` to have a layout. It should have been inserted in the environment already.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This is a strange bug that I haven't been able to understand... 🤷♂️ 😕
The text was updated successfully, but these errors were encountered:
This repro's on current main commit c85c864b5fe29e2114c0e02d00388b731d99b70a for me still
$ cargo run -- test bug.roc
Finished dev [unoptimized + debuginfo] target(s) in 0.46s
Running `target/debug/roc test bug.roc`
thread 'main' panicked at crates/compiler/mono/src/reset_reuse.rs:1244:42:
Expected symbol to have a layout. It should have been inserted in the environment already.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
module []
expect_ =
when new_scatter { data : []} isOk asdf -> scatter_to_str asdf
Err_ -> crash ""1==2Trace x y := {
data : List { x : x, y : y },
orientation : [Vertical, Horizontal],
name : Str,
marker : Marker,
}
implements [Inspect]
new_scatter :
{
data : List { x : x, y : y },
orientation ? [Vertical, Horizontal],
name ? Str,
}
-> Result (Trace x y) _new_scatter = \{ data, orientation ? Vertical, name ? ""} ->
Ok
(
@Trace {
data,
orientation,
name,
marker: new_marker? {},
}
)
# CHANING ANYHTING IN HERE SEEMS TO "FIX" ITscatter_to_str : Trace x y -> Str where x implements Inspect, y implements Inspectscatter_to_str = \@Trace inner ->
# NOT USED ... BUT WE CAN"T REMOVE, OR BUG GOES AWAY??
data2 = List.walk inner.data ([], []) \(xs, ys), { x, y } -> (List.append xs x, List.append ys y)
# NOT USED ... BUT WE CAN"T REMOVE, OR BUG GOES AWAY??
orientation_str = if inner.orientation==Verticalthen "\"orientation\":\"v\""else "\"orientation\":\"h\""# NOT USED ... BUT WE CAN"T REMOVE, OR BUG GOES AWAY??
name_str = if Str.isEmpty inner.namethen ""else "\"name\":\"$(inner.name)\""# NOT USED ... BUT WE CAN"T REMOVE, OR BUG GOES AWAY??
marker_str = marker_to_str inner.marker""Marker := {}
implements [Inspect]
new_marker : {} -> ResultMarker_new_marker = \{} -> Ok (@Marker {})
marker_to_str : Marker -> Strmarker_to_str = \_ -> ""
I've removed all extraneous code that I think I can, and pushed to a minimal branch https://github.com/lukewilliamboswell/plume/tree/bug-1
This is a strange bug that I haven't been able to understand... 🤷♂️ 😕
The text was updated successfully, but these errors were encountered: