Skip to content

Remove Gradle error from newer JDK versions#2392

Merged
suhtai merged 16 commits intomainfrom
pablisco/remove_tooljar_from_later_sdks
Jul 14, 2021
Merged

Remove Gradle error from newer JDK versions#2392
suhtai merged 16 commits intomainfrom
pablisco/remove_tooljar_from_later_sdks

Conversation

@suhtai
Copy link
Copy Markdown
Contributor

@suhtai suhtai commented May 5, 2021

Closes #2391

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

@suhtai suhtai requested review from a team and rachelcarmena May 5, 2021 10:52
@suhtai suhtai changed the title Remove crash from newer JDK versions Remove Gradle error from newer JDK versions May 5, 2021
@rachelcarmena
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Modifier.SYNCHRONIZED -> null
Modifier.NATIVE -> null
Modifier.STRICTFP -> null
else -> null
Copy link
Copy Markdown
Contributor Author

@suhtai suhtai 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
Copy Markdown
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
Copy Markdown
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.

@suhtai suhtai mentioned this pull request Jul 6, 2021
@suhtai suhtai requested a review from rachelcarmena July 6, 2021 11:04
@suhtai suhtai 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

@suhtai suhtai 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
Copy Markdown
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.

@suhtai
Copy link
Copy Markdown
Contributor Author

suhtai commented Jul 12, 2021

@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

@suhtai suhtai requested a review from nomisRev July 13, 2021 14:12
Copy link
Copy Markdown
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
Copy Markdown
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 !

@suhtai suhtai merged commit 10a517b into main Jul 14, 2021
@suhtai suhtai 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