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
This changeset introduces support for the Java Platform Module System, or JPMS, within the ANTLR v4 runtime and annotations packages.
The runtime package can now be depended on in downstream modules with a
requires antlr.runtime
directive.To facilitate this functionality, a breaking change had to be made with regard to packages used for annotations. The following package changes were made:
o.a.v.misc.NotNull
→org.antlr.v4.annotations.NotNull
o.a.v.misc.Nullable
→org.antlr.v4.annotations.Nullable
o.a.v.r.NullUsageProcessor
→...processors.NullUsageProcessor
Code generators, service definitions, and other references to these classes were updated accordingly. This change was made to fix split package issues between the ANTLR runtime and annotations modules, which is banned under JPMS.
The JVM target was updated to JVM 11, which allows cleanup of older JDK 1.6 and JDK 1.8 related build wiring. Reasoning: users of 1.6 and 1.8 do not need libs that support JPMS; building multi-release JARs in Maven is hard and error-prone. There isn't much sense in setting a JVM target of 9 or 10, so 11 is the new standard.
Additionally, the codebase now uses a bootstrap JAR to facilitate code-gen in
antlr4-runtime
; this bootstrap JAR is located in thelib/
folder and automatically installed for the developer if they use either./mvnw
(also added) or./bootstrap.sh
.This bootstrap JAR will allow iteration on the code generator without needing to release a new plugin version.
Changelog
module-info.java
descriptoro.a.v.annotations.*
11
cc / @sharwell