-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 google java formatter dependency #11765
Conversation
@colinsurprenant you've been around the compilation code recently, what do you think here about the need of this dependency? if this is being used to avoid cache invalidation, in what scenarios does it do that? This dependency was introduced in #8913 |
Good question, will investigate. |
@jsvd This is used to do generated source code formatting and in that respect insures that 2 equivalent code generation will yield the same text+formatting. I see that the note about licensing :
I just verified that and starting at v1.8 they removed that GPL dependency we should be good to upgrade to latest v1.9 without incompatible license dependency. I think we can close this and create a new PR to upgrade google-java-format. |
Created #12223 to upgrade to latest versions. |
@colinsurprenant I believe that version only works with Java >= 9, which is why we didn’t upgrade |
Good catch. I can't find clear indications for the Java version requirements but looking at https://github.com/google/google-java-format/releases all I see is that v1.8 requires JDK 11. Short of upgrading the library because of minimum JDK requirements we can either keep the current version or remove it altogether as you suggest here but by doing so we also will loose readable formatting on the generated sources which is useful when developing/debugging. I don't think that removing the formatter will break caching but I don't know for sure. |
Here we should upgrade to version 1.13. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment to update the version
// WARNING: DO NOT UPGRADE "google-java-format" | ||
// later versions require GPL licensed code in javac-shaded that is | ||
// Apache2 incompatible | ||
implementation('com.google.googlejavaformat:google-java-format:1.1') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that it's use for code formatting in debug mode of Janino, we should keep it and update to version 1.13 which still require Java 11 and is In Apache License
Closing this in favor of #13700 |
No description provided.