Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build to set the release to Java 8 #3648

Merged
merged 1 commit into from Apr 14, 2022
Merged

Fix build to set the release to Java 8 #3648

merged 1 commit into from Apr 14, 2022

Conversation

tkvangorder
Copy link
Contributor

The 4.10.0 runtime of antlr correctly sets the source and target to 1.8, however, the compiler is still compiling against the Java 11 runtime classpath. This results in the runtime using a different method signature for java.nio.CharBuffer.flip()

This manifests as the following error when using antlr in a java8-based project:

Caused by:
        java.lang.NoSuchMethodError: java.nio.CharBuffer.flip()Ljava/nio/CharBuffer;

This PR sets the release (used by the maven compiler plugin) to 8, thus forcing it to use the java 8 runtime when compiling.

Signed-off-by: Tyler Van Gorder <tkvangorder@users.noreply.github.com>
@tkvangorder
Copy link
Contributor Author

I was able to build locally with this change, install it into my maven local and verify things were working when using 4.10.1-SNAPSHOT and running on Java 8.

@ericvergnaud
Copy link
Contributor

@parrt if you haven't released yet, you probably want to include this PR in 4.10

@KvanTTT
Copy link
Member

KvanTTT commented Apr 12, 2022

Probably it makes sense of publishig RC (release candidate) before real release.

@jcking
Copy link
Collaborator

jcking commented Apr 14, 2022

This seems fine to me. Deferring to @parrt though.

@parrt
Copy link
Member

parrt commented Apr 14, 2022

Damn. what if I release with mvn as 4.10.0-1 ?

@parrt parrt merged commit 57e7fb2 into antlr:dev Apr 14, 2022
Copy link
Member

@parrt parrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@parrt
Copy link
Member

parrt commented Apr 14, 2022

@KvanTTT @ericvergnaud should i do 4.10-1 or 4.10.1? i suggest 4.10-1 (or 4.10.0-1) with mvn then update jars. don't change version in software.

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Apr 14, 2022 via email

@parrt
Copy link
Member

parrt commented Apr 14, 2022

oh man. now i gotta go thru release process again. haha.

@tkvangorder
Copy link
Contributor Author

trust me, I feel your pain. 8)

parrt added a commit that referenced this pull request Apr 15, 2022
* [C++] Remove reference to antlrcpp:s2ws (#3656)

Signed-off-by: Justin King <jcking@google.com>

* Fix build to set the release to Java 8 (#3648)

Signed-off-by: Tyler Van Gorder <tkvangorder@users.noreply.github.com>

Co-authored-by: Tyler Van Gorder <tkvangorder@users.noreply.github.com>

* prep for 4.10.1

Signed-off-by: Terence Parr <parrt@antlr.org>

* fix v numbers

Signed-off-by: Terence Parr <parrt@antlr.org>

Co-authored-by: Justin King <jcking@google.com>
Co-authored-by: Tyler Van Gorder <1878529+tkvangorder@users.noreply.github.com>
Co-authored-by: Tyler Van Gorder <tkvangorder@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants