chore: migrate to the new moon project format#11
Merged
Conversation
Recent moon toolchains (with rr_moon_mod / rr_moon_pkg) migrate the project layout automatically on `moon info` / `moon fmt`, which turns every contributor run into unrelated noise. Commit the migration once: - moon.mod.json -> moon.mod (all metadata preserved) - src/codegen/moon.pkg.json -> moon.pkg; import aliases dropped where they match the last path segment - commit the generated pkg.generated.mbti interface files - scripts/sync-version.js: read/write the new moon.mod format - AGENTS.md / CONTRIBUTING(-ja).md: update file references Verified: moon test (318 passed), moon build --target js, scripts build + sync-version, and the pkg API all work with the new layout. CI installs the latest moon, so it uses the same toolchain. Note: .mbt sources are intentionally untouched to avoid conflicts with open PRs; a follow-up `moon fmt` pass can land after those merge.
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
Recent moon toolchains (feature flags
rr_moon_mod/rr_moon_pkg) auto-migrate the project layout onmoon info/moon fmt, so every contributor run currently produces unrelated migration noise. This PR commits the migration once:moon.mod.json→moon.mod(all metadata — name, version, deps, license, keywords — preserved)src/codegen/moon.pkg.json→moon.pkg; import aliases dropped where they match the last path segmentpkg.generated.mbtiinterface files (per AGENTS.md convention)scripts/sync-version.js: read/write the newmoon.modformat (regex on theversion = "..."line instead of JSON.parse)AGENTS.md/CONTRIBUTING(-ja).md: update file referencesVerification
moon test --target js: 318 passedmoon build --target js+node scripts/build.js+ pkg API smoke test (compile('const x be 42')) all worknode scripts/sync-version.jsworks against the new formatMerge order
.mbtsources are intentionally untouched to avoid conflicts with #8 / #9 / #10 — this PR can merge before or after them in any order. A follow-upmoon fmtpass (which rewritesimpl ... with output→with fn outputetc.) and an.mbtirefresh should land after everything is merged.