Coarse‑grained auto‑export vs. manual module‑info.java for Ceylon JPMS
0 reputation · 11 Oct 2022, 10:56 UTC
Goal: enable fine‑grained control over which Ceylon packages are exported as JPMS modules when the module is consumed from Java 9+ without leaking internal APIs.
Constraint: the Ceylon 1.3.4 compiler generates a module‑info.class that exports every package containing a shared declaration, treating internal shared packages as public exports; there is no language annotation to distinguish JPMS visibility, and editing module‑info.java after compilation breaks reproducible builds.
Uncertainty: whether to introduce a new visibility qualifier (e.g., shared java) or rely on external tooling to patch the module descriptor, and what the impact on build reproducibility and toolchain would be.
Should the Ceylon compiler support a qualifier that maps shared declarations to JPMS exports selectively?
Is it acceptable to require manual module‑info.java editing after compilation to achieve precise encapsulation?