Conversation
DzmingLi
force-pushed
the
fix/modernize-moonbit-tests
branch
from
September 22, 2026 14:01
3ae4e67 to
4f2d34e
Compare
DzmingLi
force-pushed
the
fix/modernize-moonbit-tests
branch
from
September 22, 2026 14:15
4f2d34e to
de60ed7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a breaking refactor.
Change the Public Pakcage Interface
In fact, the current model is inspired from
rust-overlay, butrust-overlaymirrors a real upstream rustup distribution model. A Rust toolchain is first fixed to a channel or version and a host platform. Within that release's manifest, rustup can then install a named profile, optional components such asrust-srcorclippy, and standard libraries for additional compilation targets. This is constrained composition within one published toolchain, not arbitrary mixing of component versions. Interfaces such asrust-bin.stable.latest.default.override { extensions = ...; targets = ...; }expose choices that rustup itself supports.However, MoonBit has no equivalent profile, component, or target-installation contract. Each published MoonBit version is a coherent SDK: its compiler, build tools, editor helpers, runtime files, and core library are expected to be used together. The platform and core archives used to assemble it are packaging inputs with matching versions, rather than independently supported toolchain components.
The old overlay copied rust-overlay's shape without inheriting those semantics. The extra
moonbit-bin.moonbit.*namespace did not identify a meaningful channel or component class; separately exposingtoolchains,core, and patchedmoonallowed unsupported combinations; and duplicating the same versions underpackagesandlegacyPackagesmade implementation details part of the compatibility surface. It also forced every internal packaging change to look like a user-facing API change.Dropping legacy interfaces and unsupported SDKs
Dropping pre-0.10 SDKs
Version 0.10.0 is the first MoonBit SDK generation with the native helper layout assumed by the redesigned package, including the current
moon-lspentry point. The public package now promises one coherent SDK with consistent executable names, helper discovery, environment wrapping, and editor integration. Earlier SDKs use different layouts and cannot satisfy that contract through the same bundling code.Supporting those releases would therefore require version-specific packaging branches and a separate compatibility test matrix. Considering MoonBit itself is still in beta stage, so just dropping the pre-0.10 would be a simple and clean solution.
Removing legacy interfaces
Breaking removals include
legacyPackages, separately exposed toolchain components, escaped version aliases, the patched Moon implementation. The README includes a migration table for the former names.Previously,
legacyPackagesexisted to retain the nestedmoonbit,toolchains, andcoresets whilepackagesflattened them into names such asmoonbit_latest. Once those internal component sets are removed, keepinglegacyPackageshas only two possible meanings: preserve the obsolete component-oriented interface, which defeats this redesign, or duplicate every complete SDK under a second flake path, which adds no capability.Some other changes
Nightly is now reproducible rather than a hash pinned to an upstream rolling URL. When its contents change, the sync workflow records
nightly-YYYY-MM-DD, uploads the Linux, Apple Silicon macOS, and core archives to an immutable GitHub prerelease, and advances thenightlyalias.Dropping the x86-64-darwin supports, because MoonBit officially no longer support it, so I find it no reason keep the support towards it and the old archives