-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Expected symbol plume.Scatter.56
to have a layout.
#7461
Comments
This repro's on current main
module []
expect
_ =
when new_scatter { data : []} is
Ok asdf -> scatter_to_str asdf
Err _ -> crash ""
1 == 2
Trace 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" IT
scatter_to_str : Trace x y -> Str where x implements Inspect, y implements Inspect
scatter_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 == Vertical then "\"orientation\":\"v\"" else "\"orientation\":\"h\""
# NOT USED ... BUT WE CAN"T REMOVE, OR BUG GOES AWAY??
name_str = if Str.isEmpty inner.name then "" 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 : {} -> Result Marker _
new_marker = \{} -> Ok (@Marker {})
marker_to_str : Marker -> Str
marker_to_str = \_ -> ""
|
I'm also hitting this on the weaver snake_case branch smores56/weaver@0059085 with roc version:
|
It's in wasm4 too: lukewilliamboswell/roc-wasm4#32 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: