chore: clear MoonBit v0.10.6 diagnostics and bump CI toolchain pin - #68
Merged
Conversation
Empty `{}` map literals now warn as ambiguous (E0082) and `try?` is
deprecated (E0020). Replace 31 `{}` literals with `Map([])` and rewrite the
two `try?` sites as `try ... catch ... noraise`, since neither bound
`Result` escaped its expression.
No public surface change: the only `.mbti` delta is a trailing blank line
dropped by the newer `moon info`.
The repo now builds against moonc v0.10.6; the pin was still on 0.10.5, so CI would verify against a compiler that predates the diagnostics this branch clears. SHA-256 digests recomputed for both archives. Verified by running the pinned installer plus the full CI matrix (check and test on native/js/wasm-gc, and the fmt check) against the resulting isolated MOON_HOME.
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.
Housekeeping for the
moonc v0.10.5 → v0.10.6jump. No public surface change — the only.mbtidelta is a trailing blank line dropped by the newermoon info(all 10 files show0 1ingit diff --numstat).Changes
E0082
ambiguous_braces— 31 sitesEmpty
{}now warns because it could be an empty map, block, struct literal, or JSON object. Every site waslet x : Map[K, V] = {}→Map([]), inotlp/types.mbt,otlp/convert.mbt,flame/flame.mbt,event.mbt,field.mbt,field_show.mbt,env_filter.mbt,span_json.mbt,span_observer.mbt, andid_test.mbt.Left
context.mbt:21andfilter.mbt:20(ref.val = {}) alone — assignments to an already-typedRef, not ambiguous, not flagged.E0020 deprecated
try?— 2 sitesBoth were
let result : Result[_, _] = try? f()immediately followed byguard result is Err(_) else { abort(…) }. TheResultnever escaped its expression, which is exactly the case the compiler says to rewrite:CI toolchain pin
.github/scripts/setup-moonbit.shwas pinned to0.10.5+5e7afb0c0, so CI would have verified this branch against a compiler predating the diagnostics it clears. Bumped to0.10.6+80dc50f24with recomputed SHA-256 digests for both the toolchain and core archives.Verification
Ran the pinned installer locally, then the full CI matrix against the resulting isolated
MOON_HOME(moonc v0.10.6+80dc50f24):moon checknative / js / wasm-gcmoon test --target nativemoon test --target jsmoon test --target wasm-gcmoon fmtthengit diffAlso confirmed the 0.10.6 tarball still ships
bin/internal/tccand still does not shipbin/moonx, so the script'schmodandln -s moon bin/moonxlines remain correct.