Stream: bugs

Topic: Roc formatter bug


view this post on Zulip Ryan Barth (Dec 05 2024 at 10:20):

I opened issue 7308 for an edge case where roc format will remove parens around an alias and cause the program to become invalid.

view this post on Zulip Joshua Warner (Dec 11 2024 at 02:20):

Thanks for the report!

view this post on Zulip Joshua Warner (Dec 11 2024 at 02:21):

Sorry for taking so long to get to it - but should be fixed here: https://github.com/roc-lang/roc/pull/7329

view this post on Zulip Joshua Warner (Dec 11 2024 at 02:24):

This has me thinking - I wonder if it'd be useful to bundle the minimizer into the roc binary, and auto-minimize failures like this, right along side the compiler internal_error! output?

This one: https://github.com/roc-lang/roc/blob/main/crates/compiler/test_syntax/src/minimize.rs

view this post on Zulip Joshua Warner (Dec 11 2024 at 02:25):

Or maybe you have to run with --minimize-failure or something like that

view this post on Zulip Joshua Warner (Dec 11 2024 at 02:26):

Probably not an issue for folks reporting bugs with AOC-like (or generally, open-source) repro's, but if/when there are significant proprietary code bases, it could be really useful to easily have a repro that doesn't include unnecessary proprietary details.


Last updated: Jul 05 2025 at 12:14 UTC