Skip to content

feat(moonbit): add compact output filter for moon build/test/check#2862

Open
colmugx wants to merge 5 commits into
rtk-ai:developfrom
colmugx:develop
Open

feat(moonbit): add compact output filter for moon build/test/check#2862
colmugx wants to merge 5 commits into
rtk-ai:developfrom
colmugx:develop

Conversation

@colmugx

@colmugx colmugx commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • Add a new moon (MoonBit CLI) filter that auto-injects --output-json for build, test, and check, then parses the NDJSON diagnostics into compact Rust-compiler-style one-liners: path:line:col: level [code]: message.
  • Only build/test/check are matched; other subcommands (run, new, clean, fmt, ...) pass through raw via the fallback path.
  • Internal module is named moonbit (src/cmds/moonbit/moonbit_cmd.rs, Commands::Moonbit), while the proxied binary, CLI surface (rtk moon ...), and rewrite rule (^moon\s+(build|test|check)) all remain moon.

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test — clippy clean, 2309 passed / 8 ignored
  • Manual testing: rtk moon --help lists the subcommand; rtk rewrite moon build --target nativertk moon build --target native; --output-json is injected at execution time and NDJSON diagnostics reformat correctly against real fixtures (22 unit tests)

Important: All PRs must target the develop branch (not master).
See CONTRIBUTING.md for details.

@CLAassistant

CLAassistant commented Jul 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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