Stream: ideas

Topic: ✔ package warning reporting


view this post on Zulip Anton (Jun 28 2024 at 16:45):

If a package imported using a URL has a warning on its internal Roc code, we currently report it and exit with code 2, but it seems like we should not do that, because it would cause CI to fail for any users of the package.
This came up today in this example for the parser package:

── UNUSED DEFINITION in ...PjwfQQ1QeSL3CfmWr2Pr9DESdDIXy97pwpuq84Ck/String.roc ─

rest is not used in this when branch.

126│              [first, .. as rest] ->
                                ^^^^

If you don't need to use rest, prefix it with an underscore, like
"_rest", or replace it with just an "_".

────────────────────────────────────────────────────────────────────────────────

0 errors and 1 warning found in 124 ms

view this post on Zulip Agus Zubiaga (Jun 28 2024 at 16:57):

Yeah, I made an issue for this a while back. Let me find it.

view this post on Zulip Agus Zubiaga (Jun 28 2024 at 16:58):

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

view this post on Zulip Notification Bot (Jun 28 2024 at 17:42):

Anton has marked this topic as resolved.

view this post on Zulip Luke Boswell (Jun 28 2024 at 20:47):

Another option, should we make roc build --bundle fail if there are errors or warnings? Then the original package wont be bunlded and released with issues in it?

view this post on Zulip Richard Feldman (Jun 28 2024 at 21:23):

I think it should report them and exit nonzero but build the bundle anyway

view this post on Zulip Luke Boswell (Jun 28 2024 at 21:25):

I guess that would fail in CI, but could still be used manually.

view this post on Zulip Richard Feldman (Jun 28 2024 at 21:26):

yeah exactly!

view this post on Zulip Agus Zubiaga (Jun 28 2024 at 23:39):

I think we still want to hide warnings for remote packages, because future versions of the compiler might introduce new ones

view this post on Zulip Luke Boswell (Jun 29 2024 at 01:21):

Yeah, I was thinking in addition to.

view this post on Zulip Luke Boswell (Jun 29 2024 at 01:22):

Also, I haven't checked what the current actual behaviour of roc build --bundle is. Just clarifying what it should do.

view this post on Zulip Luke Boswell (Jun 29 2024 at 01:23):

If there are bundles already out there that have issues, this wouldn't stop those from being used and causing this issue


Last updated: Jun 16 2026 at 16:19 UTC