refactor(codegen): distribute generator through moonx - #115
Merged
Conversation
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.
Summary
proton_cliinto the independently publishedmoonbit-community/proton_codegenmoduleproton_codegenas a WASM executable and invoke it through a pinnedmoonxcoordinate from generated Moon prebuild rulesWhy
Code generation is a build dependency of MoonBit packages, not an implicit responsibility of
proton_cli build,dev, orpackage. Making it an explicitdev_buildrule gives Moon the real input/output graph, regenerates output for every normal Moon build path, and avoids directory scanning or CLI lifecycle coupling.Validation
moon fmtmoon infomoon -C codegen check --target wasm --deny-warnmoon -C codegen test lib --target wasm --diagnostic-limit 80moon -C cli test new --target native --diagnostic-limit 80node scripts/verify_generated.mjs --skip-prebuilt-abimoon check --target native --deny-warnPROTON_NATIVE_DIST=$PWD/native/dist node scripts/e2e_scaffold_source_smoke.mjsmoon -C codegen publish --dry-runcompleted package creation and extracted-package validation; registry upload was denied because the local account is not themoonbit-communitypublisher