Skip to content

Drop redundant open tag unions in return position; pin nightly-2026-09-27 - #237

Merged
lukewilliamboswell merged 3 commits into
roc-lang:mainfrom
eschizoid:implicit-open-unions
Oct 1, 2026
Merged

lukewilliamboswell merged 3 commits into
roc-lang:mainfrom
eschizoid:implicit-open-unions

Conversation

@eschizoid

@eschizoid eschizoid commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

The pinned Roc compiler implicitly opens return-position tag unions and rejects redundant explicit .. unions. Remove those unions from platform sources, examples, the performance harness, and the README quick-start; pin nightly-2026-09-27-a3ce7f1 and regenerate its matching Rust ABI glue.

Six examples depend on roc-gregorian 1.0.0-rc.3, whose five redundant unions in Util.roc prevent checking and building with this pin. Move command, echo, error-handling, file-accessed-modified-created-time, hello-web, and init-basic to the existing .todoroc backlog. Each file has a TODO to restore the application and its HTTP specification cases after a compatible dependency release. Remove only those six spec entries and point contributor commands and the optimization-default harness test at the active health.roc example.

roc-time 0.1.0 also has this blocker: a probe importing PosixBoundary reports six redundant-union warnings on the pin. A migration needs a compatible published release first.

Validation with the pinned nightly:

  • Full local suite: 22 active applications, all 40 HTTP runtime cases passed.
  • Memcheck: all 40 runtime cases passed.
  • Rust unit tests: 198 passed; Rust formatting passed.
  • Harness unit tests: 39 passed.
  • Substituted-transport server invariants passed.
  • Matching-revision Rust glue regeneration check, compiler pin check, and diff whitespace check passed.

The platform design and host runtime behavior are unchanged. The six deferred applications retain their original source beneath the restoration TODOs; their test cases remain recoverable from git history.

…9-27

Since nightly-2026-09-23 the compiler opens a tag union in return
position on its own and warns on an explicit `..` there ("redundant
open tag union"). roc build exits non-zero on any warning, so an
application on basic-webserver cannot build against the current
nightlies: the platform's own sources raise sixty of them.

This removes every explicit `..` in return position in platform/ (60
sites in nine files, driven by the compiler's warning list) and in the
examples' own code, and moves the pinned nightly to
nightly-2026-09-27-a3ce7f1 in .roc-version and every example manifest.
No signature widens and no behaviour changes: the compiler now opens
those unions itself. platform/main.roc checks with zero warnings on the
new pin; the examples still see warnings from the released platform
tarball and packages they pin by URL, which the next release resolves.
@eschizoid

Copy link
Copy Markdown
Contributor Author

@lukewilliamboswell, any chance you could merge this little guy now that it is green?

@lukewilliamboswell

Copy link
Copy Markdown
Collaborator

I can, I had another commit I thought I pushed which restored those. I can make another PR no issue

@lukewilliamboswell
lukewilliamboswell merged commit 2de450c into roc-lang:main Oct 1, 2026
20 checks passed
@eschizoid

eschizoid commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

looking forward to the next release 🙇

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants