-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Java module system support with Multi-Release JAR #1976
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
base: main
Are you sure you want to change the base?
Conversation
Add module-info.java files to all modules and configure Multi-Release JAR compilation to support both Java 8 (without modules) and Java 9+ (with modules). - Add module declarations for common, service, value, and factory modules - Configure Maven compiler for dual compilation (release=8 and release=9) - Update build order and versions for consistency - Maintain full backward compatibility with Java 8 runtime Enables module system benefits for Java 9+ users while preserving existing Java 8 compatibility through Multi-Release JAR mechanism.
Split CI into build (JDK 11) and test (JDK 8/11/17) jobs to support module compilation while maintaining compatibility testing.
202dbbb to
f82a458
Compare
|
Fixes #597 |
|
The CI is failing with this message:
|
|
@eamonnmcmanus Fixed. Try again. |
|
Still failing, unfortunately. I think we're probably not going to want to keep that |
As @cpovirk mentioned, it isn't possible to keep |
…e/module-info # Conflicts: # value/processor/pom.xml
|
Is it possible to configure the CI to keep on running the build every time I push an update? I just pushed a fix. |
It might be, but I don't know how. (Meaning, I don't know how to configure that for you without also configuring it for everybody.) This is something that GitHub put in place a few years ago because people were sending bogus PRs that would update the CI actions to do Bitcoin mining. Even if your PR wasn't submitted, those CI actions would run. I don't know if the countermeasure actually needs to require manual approval for PRs that don't touch the CI actions, but anyway it does. I'll look into committing a trivial punctuation change and recording you as the author, in the hope that that will mean that updates to your PRs won't require manual approval for the CI. |
|
You might also have luck with locally running the two commands from our config in series, noting that the first always fails: |
|
I should have said this in #1976 (review), but: I suspect that no files should reference
My logic is: We can't release with a SNAPSHOT dependency. Thus, unless we were to try to wire up an atomic release for all the projects, we'd need to release a modularized AutoCommon, then update deps to use that, then release a modularized AutoValue, then update deps to use that, and then release a modularized AutoService. (This is roughly the same situation as I was in during the f3fbb3b saga that eamonnmcmanus dug up earlier.) Under that logic, I'd be looking at updating:
But really, I'd be looking at having one PR that targets just AutoCommon, at least when it's time to merge. Until then, it is very possible that we could get additional value out of testing everything with SNAPSHOT dependencies. In the above, I omitted AutoFactory. I'm not sure that we should modularize it at all until we finish splitting out its annotations. Again, there may be value in testing our setup for it beforehand. |
|
Sorry, work sucked all the energy out of me this week. I'd love for someone else to pick up where I left off; otherwise, I'll try getting back to this in a couple of weeks. |
Add module-info.java files to all modules and configure Multi-Release JAR compilation to support both Java 8 (without modules) and Java 9+ (with modules).
Enables module system benefits for Java 9+ users while preserving existing Java 8 compatibility through Multi-Release JAR mechanism.