Stream: announcements

Topic: Breaking change with `import Foo exposing [Foo]`


view this post on Zulip Aurélien Geron (Oct 04 2026 at 21:49):

Since the 2026-10-02 nightly, the following code causes a compilation error:

import Foo exposing [Foo]

You must now write this instead:

import Foo

The error is pretty clear:

── ✗ redundant expose ───────────────────────────────────── break.roc:1:22

Redundantly exposing Foo when importing Foo.

import Foo exposing [Foo]
                     ^^^

The type Foo is automatically exposed when importing a type module.

Remove Foo from the exposing clause.

Several platforms and packages need to be updated. I've submitted PRs for these:

Side-note: explicitly making a union open (using ..) in an output position now triggers a warning, since unions are automatically open in output positions now. So instead of writing U64 -> Try(U64, [A, B, ..]), you must write U64 -> Try(U64, [A, B]). The good news is that roc fmt will fix that for you (unfortunately, it doesn't fix the import error described above).

view this post on Zulip Luke Boswell (Oct 04 2026 at 21:54):

Thank you, I forgot I merged that and didn't connect the dots that this would be a breaking change


Last updated: Oct 15 2026 at 17:56 UTC