Stream: bugs

Topic: Extra `}` do not cuase error in new compiler


view this post on Zulip Jamie (Dec 07 2025 at 14:13):

The new compiler does not seem to error when there are extra }, for example in the code:

app [main!] {
    pf: platform "https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/download/0.4/6XA8JLWhmG1FSgb8GxPjBs9cGrtRqopohR3KAHYo722z.tar.zst",
}
import pf.Stdout
main! = |_args| {
    Stdout.line!("Hello world")
    Ok({})
}}

view this post on Zulip Fabian Schmalzried (Dec 07 2025 at 14:37):

It's not a bug, it's a feature :smile:. To be fair this should be some kind of error message, but with "inform, don't block" it's ok that it runs.

view this post on Zulip Richard Feldman (Dec 07 2025 at 14:40):

yeah we definitely should report this at compile time though! Can you open a GitHub issue for it @Jamie?

view this post on Zulip Jamie (Dec 07 2025 at 15:09):

https://github.com/roc-lang/roc/issues/8584

view this post on Zulip Jamie (Dec 07 2025 at 15:10):

@Richard Feldman

view this post on Zulip Ameen (Dec 07 2025 at 15:50):

Would this be a good first issue to work on? It looks like we already do similar logic for type errors during roc run so we could follow that same idea here and exit early depending on if allow-errors is passed


Last updated: Dec 21 2025 at 12:15 UTC