Skip to content

build: remove legacy Java 9+ sbt plugin references#1070

Closed
He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:build/cleanup-jdk9-refs
Closed

build: remove legacy Java 9+ sbt plugin references#1070
He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:build/cleanup-jdk9-refs

Conversation

@He-Pin

@He-Pin He-Pin commented Jun 15, 2026

Copy link
Copy Markdown
Member

Motivation

Following apache/pekko#3075 which renamed the Jdk9 sbt plugin to Jdk21 (since Java 17 is now the project baseline and JDK 9 features are part of the standard build), the AutomaticModuleName sbt helper and --add-opens JVM options inherited from the Java 9 module-system era are stale references in this project. They add noise to the build and mislead developers about the actual Java baseline.

Modification

  • Delete project/AutomaticModuleName.scala (JPMS Automatic-Module-Name manifest helper).
  • Remove AutomaticModuleName.settings(...) calls and the inline "Automatic-Module-Name" -> "..." manifest entry from build.sbt.
  • Remove --add-opens=java.base/...=ALL-UNNAMED JVM options (both the single += form and the Seq(...) form) from build.sbt.
  • Update stale // JDK 11: ... comments to // project baseline is Java 17: ... (aligned with refactor: rename Jdk9 sbt plugin to Jdk21 pekko#3075).

Result

Build definitions no longer reference legacy Java 9+ module-system helpers or JVM options. Project baseline remains Java 17; no runtime behavior change for end users. Downstream consumers relying on the previous Automatic-Module-Name manifest entries or on --add-opens to access jdk.internal.misc from test code should note the removal.

Tests

  • sbt "show name" — success (build.sbt parses and loads cleanly for all modules).
  • Parenthesis balance check — passes (open == close in stripped AST).
  • git diff --check — clean.

References

Motivation:
Following apache/pekko#3075 which renamed Jdk9 → Jdk21 (since Java 17 is
now the project baseline and JDK 9 features are part of the standard build),
the AutomaticModuleName sbt plugin and `--add-opens` JVM options inherited
from the Java 9 module-system era are stale references in the satellite
Pekko projects. They add noise to the build and mislead developers about
the actual Java baseline.

Modification:
- Delete project/AutomaticModuleName.scala (JPMS Automatic-Module-Name
  manifest helper) where it exists.
- Remove `AutomaticModuleName.settings(...)` calls and inline
  `"Automatic-Module-Name" -> "..."` manifest entries from build.sbt.
- Remove `--add-opens=java.base/...=ALL-UNNAMED` JVM options (both the
  single `+=` form and the `Seq(...)` form) from build.sbt.
- Update stale `// JDK 11: ...` comments to
  `// project baseline is Java 17: ...` (aligned with apache/pekko#3075).

Result:
Build definitions no longer reference legacy Java 9+ module-system helpers
or JVM options. Project baseline remains Java 17; no runtime behavior
change for end users.
@He-Pin

He-Pin commented Jun 15, 2026

Copy link
Copy Markdown
Member Author

Closing — the PR scope was incorrect. AutomaticModuleName (JPMS manifest) and --add-opens (reflective library support) are functional Java 9+ features, not stale references. A correct cleanup aligned with apache/pekko#3075 should be limited to the Jdk9 sbt plugin naming (which this project doesn't have) and stale jdk9 comments. Apologies for the noise.

@He-Pin He-Pin closed this Jun 15, 2026
@He-Pin He-Pin deleted the build/cleanup-jdk9-refs branch June 15, 2026 17:51
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