Skip to content

feat(config): support optional private module field - #204

Merged
hackwaly merged 1 commit into
masterfrom
yuxiang/private-module-config
Oct 9, 2026
Merged

hackwaly merged 1 commit into
masterfrom
yuxiang/private-module-config

Conversation

@hackwaly

@hackwaly hackwaly commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator
  • Related issues: None
  • PR kind: Feature

Summary

  • Support an optional boolean private field in moon.mod, both as a top-level assignment and through options(...), and preserve its value in legacy JSON output. Omission or false denotes public access; true denotes private access in a registry that supports it. No default field is inserted.
  • Diagnose non-boolean values and duplicate private declarations, including duplicates across top-level assignments and options.
  • Validate the field in both source parsing and validation of an already post-processed AST, without changing public API signatures.
  • Add focused regression tests and document the field's semantics.

This PR is limited to private configuration support. It does not add dependencies, change mq command behavior, add runtime entry points, or implement registry authorization or private publishing.

Verification

  • moon check --deny-warn
  • moon info --target all
  • moon fmt --check moon_config
  • moon test --target all moon_config: 64 tests passed on each of wasm, wasm-gc, JS, and native

Metadata

  • Tests added/updated for bug fixes or new features
  • Compatible with Windows/Linux/macOS (local validation on macOS; Windows/Linux not run locally)

@hackwaly
hackwaly marked this pull request as draft October 9, 2026 07:35
@hackwaly
hackwaly force-pushed the yuxiang/private-module-config branch from 44a27cc to a84787a Compare October 9, 2026 07:36
@hackwaly
hackwaly marked this pull request as ready for review October 9, 2026 08:02
@hackwaly
hackwaly merged commit fd72b61 into master Oct 9, 2026
3 checks passed
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.

1 participant