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

Remove Gradle error from newer JDK versions #2392

Merged
merged 16 commits into from
Jul 14, 2021

Conversation

pablisco
Copy link
Contributor

@pablisco pablisco commented May 5, 2021

Closes #2391

This PR potentially removes the requirement to have JDK 8 installed in our machines 🤞

@pablisco pablisco requested review from rachelcarmena and a team May 5, 2021 10:52
@pablisco pablisco changed the title Remove crash from newer JDK versions Remove Gradle error from newer JDK versions May 5, 2021
@rachelcarmena
Copy link
Member

Thanks @pablisco !! It should be checked with newer JDK versions because it's being checked with JDK 8 here. I'll review it asap!

"Building with a JRE or JDK9 is currently not supported.")
testCompileOnly files(toolsJar)
if (toolsJar) {
testCompileOnly files(toolsJar)
Copy link
Member

Choose a reason for hiding this comment

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

Meanwhile you could check if it's possible to remove this dependency for testing to have the same behavior with JDK8 or higher.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just tested clean build with JDK 8 and it doesn't seem to need it :) Removing it: a353f73

Copy link
Member

Choose a reason for hiding this comment

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

Great, thanks @pablisco !! 👏 I'd miss 2 tasks:

  • Just JDK8 is checked here so I miss adding checks for other JDKs.
  • Update the documentation.

I'll help you asap!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rachelcarmena I've updated the documentation (with the JDK 16 caveat) and updated the build tests to test on multiple JDK versions

os: [ubuntu-latest, macos-latest]
java: [8, 8.0.192, 11, 11.0.2, 13, 13.0.4, 15, 16-ea]
os: [macos-latest]
java: [8, 11, 13, 15, 16-ea]
Copy link
Contributor

Choose a reason for hiding this comment

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

Java 16 is GA now IIRC, so I think this should be updated to remove the -ea part. Also, actions/setup-java@v2 is available now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good shout 🙇  Updating.

@@ -430,6 +430,7 @@ interface TypeElementEncoder : KotlinMetatadataEncoder, KotlinPoetEncoder, Proce
Modifier.SYNCHRONIZED -> null
Modifier.NATIVE -> null
Modifier.STRICTFP -> null
else -> null
Copy link
Contributor Author

@pablisco pablisco Jul 6, 2021

Choose a reason for hiding this comment

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

This could be handled move gracefully depending on the JDK version but it's out of the scope of this ticket. Happy to add a new one to look at ways to support newer modifiers.
cc: @raulraja

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is regarding SEALED and NON_SEALED modifiers introduced in JDK 15

Copy link
Member

Choose a reason for hiding this comment

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

whatever works, most of this code in the old meta part is going away soon and the new meta does not depend on the TypeeElement java apis.

@pablisco pablisco mentioned this pull request Jul 6, 2021
@pablisco pablisco self-assigned this Jul 6, 2021
matrix:
os: [macos-latest]
java: [8, 11, 13, 15]
name: Build libraries with JDK ${{ matrix.java }} on ${{ matrix.os }}
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if we want to build on all these versions. I was thinking about splitting github actions to build/test jvm and javascript in parallel. Since the build went up considerable now we added MPP.

Before 4-5 minutes for a build, now ~20 minuntes.
But for every MPP library we generate 4 JS binaries + JVM, and soon native which has a lot of targets as well.

How does this impact CI time? How many Github Actions can we run in parallel? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think they are run in Parallel as far as I can tell, so we should be safe 🤞

Copy link
Contributor Author

@pablisco pablisco Jul 9, 2021

Choose a reason for hiding this comment

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

Just checked, and it seems that way 🥳

@nomisRev
Copy link
Member

@pablisco looking at the times every task takes we're running JS tests on all 4 of those actions.
Can we split off JS, so it runs in a separate action? I think that will bring down the time of every action back to ~10 minutes.

@pablisco
Copy link
Contributor Author

@pablisco looking at the times every task takes we're running JS tests on all 4 of those actions.
Can we split off JS, so it runs in a separate action? I think that will bring down the time of every action back to ~10 minutes.

This should do the trick 🤞
0129c26

@pablisco pablisco requested a review from nomisRev July 13, 2021 14:12
Copy link
Member

@nomisRev nomisRev left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing this issue @pablisco. I was running into this every time I open Arrow since I work with JDK 11 😅

Copy link
Member

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

thanks @pablisco !

@pablisco pablisco merged commit 10a517b into main Jul 14, 2021
@pablisco pablisco deleted the pablisco/remove_tooljar_from_later_sdks branch July 14, 2021 09:18
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.

[Investigation] Allow to use JDK 9 and later
6 participants