Semantic compatibility analysis for MoonBit public interfaces
git clone https://github.com/hmc11234/123214.git
cd 123214
moon test --target js
moon run --target js cmd/mooncompat -- compare examples/v1.mbti examples/v2.mbtimoon run --target js cmd/mooncompat -- compare \
examples/v1.mbti examples/v2.mbti \
--fail-on none --current-version 0.1.0mooncompat compare <OLD.mbti> <NEW.mbti> [OPTIONS]
mooncompat explain <RULE>
mooncompat rules| Option | Purpose |
|---|---|
| --format terminal | Human-readable console report (default) |
| --format json | Stable machine-readable schema |
| --format markdown | Pull-request friendly report |
| --format sarif | SARIF 2.1.0 for code-scanning systems |
| --output FILE | Write output instead of printing it |
| --current-version X.Y.Z | Recommend the next release version |
| --fail-on breaking | Fail only on breaking changes (default) |
| --fail-on feature | Fail on breaking changes and additions |
| --fail-on none | Always return success after analysis |
| --ignore-rule ID | Suppress a stable rule identifier |
| --ignore-symbol PATTERN | Suppress a symbol; trailing * is supported |
| --no-info | Hide documentation and import-only changes |
moon run --target js cmd/mooncompat -- compare \
examples/v1.mbti examples/v2.mbti \
--format markdown --output api-report.md --fail-on nonemoon run --target js cmd/mooncompat -- explain MC401moon info
moon run --target js cmd/mooncompat -- compare baseline.mbti current.mbtilet report = @compat.compare_text(old_mbti, new_mbti)
println(@compat.render_terminal(report))
println(@compat.render_json(report))src/
lexer.mbt .mbti tokenization with source spans
parser.mbt recoverable public-interface parser
model.mbt semantic API model
diff.mbt compatibility classification engine
change_model.mbt report and severity model
policy.mbt filtering and CI decisions
report.mbt terminal/JSON/Markdown/SARIF renderers
semver.mbt strict SemVer parsing and recommendations
rules.mbt documented stable rule catalog
cmd/mooncompat/
main.mbt Node.js command-line frontend
examples/
v1.mbti, v2.mbti executable comparison demonstrationmoon fmt --check
moon check --target js
moon test --target js
moon build --target jsSemantic compatibility analysis for MoonBit public interfaces