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

Add Java 17 to GHA setup #4659

Merged
merged 12 commits into from
Feb 10, 2023
Merged

Add Java 17 to GHA setup #4659

merged 12 commits into from
Feb 10, 2023

Conversation

clairemcginty
Copy link
Contributor

@clairemcginty clairemcginty commented Jan 19, 2023

(fix #4597) testing GHA setup w/ Java 17.

See linked ticket for more info on why the JVM opts were added to both .jvmopts and to build.sbt: basically, the build.sbt options are ignored for tests where fork := false:

[warn] javaOptions will be ignored, fork is set to false

Instead, opts are picked up from .jvmopts. Conversely, for forked tests, the JVM options don't seem to get passed from .jvmopts to the forked process 🤷‍♀️ so it seems like we need both to support both forked and non-forked tests.

Another option is just setting fork := true for all tests

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Merging #4659 (8ea222d) into main (96c9379) will not change coverage.
The diff coverage is n/a.

❗ Current head 8ea222d differs from pull request most recent head 1a2696d. Consider uploading reports for the commit 1a2696d to get more accurate results

@@           Coverage Diff           @@
##             main    #4659   +/-   ##
=======================================
  Coverage   60.91%   60.91%           
=======================================
  Files         286      286           
  Lines       10457    10457           
  Branches      667      667           
=======================================
  Hits         6370     6370           
  Misses       4087     4087           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

// In this case outer field is called "$cw" and it is hard to wrap it with proper exception
// so we allow it to fail with NullPointerException
e.getMessage should be(null)
case _: NullPointerException =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interestingly in Java 17, this now throws an NPE with the message Cannot throw exception because "null" is null. cc @shnapz @RustedBones

Copy link
Contributor

@shnapz shnapz Jan 23, 2023

Choose a reason for hiding this comment

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

@clairemcginty will take a look. I think it's fine to skip this assertion, it wasn't really useful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good!

@clairemcginty clairemcginty changed the title [not ready for merge] fix #4597 Add Java 17 to GHA setup Add Java 17 to GHA setup Jan 31, 2023
@@ -12,11 +12,11 @@ jobs:
fetch-depth: 0
- name: cache SBT
uses: coursier/cache-action@v6
- name: Java 11 setup
- name: Java 17 setup
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can also save this for 0.13 milestone

Copy link
Contributor

@regadas regadas left a comment

Choose a reason for hiding this comment

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

@regadas regadas merged commit 37ef0d5 into main Feb 10, 2023
@regadas regadas deleted the java_17 branch February 10, 2023 15:26
farzad-sedghi pushed a commit to farzad-sedghi/scio that referenced this pull request Mar 6, 2023
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.

Java 17 support
3 participants