Skip to content

ci: add a nightly toolchain canary - #169

Merged
bobzhang merged 1 commit into
mainfrom
nightly-toolchain
Sep 5, 2026
Merged

ci: add a nightly toolchain canary#169
bobzhang merged 1 commit into
mainfrom
nightly-toolchain

Conversation

@bobzhang

@bobzhang bobzhang commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

moonbitlang/core 0.10.12 removed moonbitlang/core/strconv. The dead import in rabbita/url/moon.pkg was harmless until then, and when it stopped being harmless it broke consumers — any module depending on rabbita failed package solving before a file was compiled. check.yml pins the stable toolchain, so nothing in CI saw it coming (#168 was the fix, found the hard way).

This adds a scheduled canary against the nightly toolchain.

What it runs

Daily at 04:00 UTC, plus workflow_dispatch, plus pull_request on the workflow file itself so changes to it get exercised. It installs nightly via install/unix.sh | bash -s nightly and runs moon check for js, native, and wasm at the workspace root — which covers every moon.work member, so a package a nightly core release drops is caught while resolving imports.

What it deliberately does not run

No --deny-warn, moon fmt, or moon info. Nightly deprecates ahead of stable and formats differently, so all three would fail for reasons that aren't regressions and the job would be permanently red. check.yml stays the gate for those. Warnings go into $GITHUB_STEP_SUMMARY as a count-by-kind table instead.

Verification

Ran against nightly locally (moonc v0.10.11+9de356786-nightly, installed into a scratch MOON_HOME):

  • nightly core really has no strconv — absent from lib/core, present in stable
  • the workspace is clean on nightly: 0 errors on all three targets
  • warnings are 474 implicit_impl_as_method (nightly deprecating implicit trait-impl promotion — this will need pub extend T with Trait::{...} eventually), 2 unused_errdefer, 1 deprecated (Array::new()). All pre-existing, none blocking.
  • the canary catches the regression: re-adding "moonbitlang/core/strconv" to rabbita/url/moon.pkg and running this workflow's exact step script under bash -e exits non-zero with Cannot find import 'moonbitlang/core/strconv', and aborts on the first failing target rather than running all three.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AmoyPMELemz5hdNNdXyAkm

`moonbitlang/core` 0.10.12 removed `moonbitlang/core/strconv`, and the dead
import in `rabbita/url/moon.pkg` only surfaced when a user's build failed
package solving — `check.yml` pins the stable toolchain, so nothing in CI
saw it coming.

Run `moon check` for js, native, and wasm at the workspace root, so every
`moon.work` member is covered and a package a nightly `core` release drops
is caught while resolving imports, before anything compiles. Verified
against nightly (moonc v0.10.11+9de356786-nightly): the workspace is clean,
and re-adding the `strconv` import fails the step with "Cannot find import
'moonbitlang/core/strconv'".

Deliberately no `--deny-warn`, `moon fmt`, or `moon info` here. Nightly
deprecates ahead of stable and formats differently, so those would fail for
reasons that are not regressions; the stable job stays the gate for them.
Warnings land in the step summary instead — currently 474
`implicit_impl_as_method` (the deprecation of implicit trait-impl
promotion), 2 `unused_errdefer`, and 1 `deprecated`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmoyPMELemz5hdNNdXyAkm
@bobzhang
bobzhang merged commit b68f9a2 into main Sep 5, 2026
5 of 6 checks passed
@bobzhang

bobzhang commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

The check job on this PR failed — and it should have. The canary works; it caught a real nightly incompatibility on main on its very first run:

Cannot find import 'moonbitlang/core/strconv' in oboard/mocket@0.7.7

oboard/mocket — the dependency of examples/document — has the same dead strconv import that #168 removed from rabbita/url. Nightly core dropped that package, so mocket can no longer be resolved at all, and package solving fails before anything compiles. This is exactly the failure mode this workflow exists to surface, one release ahead of stable.

This PR is therefore blocked on #170, which replaces mocket with hackwaly/moonback and removes the last mocket reference from the workspace (git grep mocket on that branch returns nothing).

Verified both directions locally against nightly (moonc v0.10.11+9de356786-nightly), running this workflow's exact step script under bash -e:

tree result
origin/main (mocket present) exit 255, Cannot find import 'moonbitlang/core/strconv', aborts on the first target
origin/main + #170 exit 0 — 0 errors on js, native, and wasm

So: merge #170 first, then this goes green with no change needed here. Happy to rebase this onto #170 instead if you'd rather see it passing before merging either.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AmoyPMELemz5hdNNdXyAkm

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.

1 participant