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

Update the IntelliJ plugin to use v1.12.0 #688

Closed
wants to merge 2 commits into from
Closed

Conversation

ze
Copy link
Contributor

@ze ze commented Nov 14, 2021

Since the last plugin update was almost half a year ago, I thought it would be prudent to update it and resolve most of the issues regarding updating the plugin.

It took around half an hour once I managed to correctly set up the module due to the gradle plugin version 1.2.1 + intellij version 2020.3 requiring java 11 to develop.

All of the included annotation changes were requested by IntelliJ to add since the overrides added them as well.

The change of <? extends TextRange> to <TextRange> was to resolve the syntax errors introduced by a change removing the wildcard requirement.

NotificationGroup was deprecated and moved into the plugin xml file as per the SDK docs
The same was required for StdFileTypes.JAVA being deprecated with the fix being JavaFileType.INSTANCE + changing the depend module to add that fix.

I had to change the project SDK to JDK 11 on my end to have the gradle build work.

I also tested the plugin with 1.12 and 1.10 on some test files such as from #653 and #654. Would be good to have some double checking though because I've had issues trying to get the test file reformatted in #558 working. Probably because it's locked behind an experimental flag?

@google-cla google-cla bot added the cla: yes label Nov 14, 2021
@cushon cushon requested a review from plumpy November 15, 2021 20:46
@ze
Copy link
Contributor Author

ze commented Nov 21, 2021

I see a new version released, I'll update the PR to use 1.13 in a few days or so, since it's really just a trivial version bump on Gradle.

Copy link
Collaborator

@plumpy plumpy left a comment

Choose a reason for hiding this comment

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

Thanks, I just updated this internally to 1.13, so that will make it's way out to GitHub sometime next week (sorry for the delay).

But if you wouldn't mind rebasing onto that, I'd still love the rest of your changes! Thanks for taking the time to do this; I appreciate it!

sinceBuild = '201'
untilBuild = ''
version.set("${googleJavaFormatVersion}.0")
sinceBuild = "203"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious why you updated this to 2020.3? AFAIK there's no reason it shouldn't continue to work with 2020.1. (I just tested the 1.13 plugin with 2020.1 and it still seems to work...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I updated it to 2020.3 was for the newer features regarding notification groups
https://plugins.jetbrains.com/docs/intellij/notifications.html#top-level-notifications-balloons
+ https://plugins.jetbrains.com/docs/marketplace/product-versions-in-use-statistics.html

I considered it acceptable to move to 203 from 201 to get the newer features to ease the pain in the future

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh okay, yeah that's totally reasonable. I thought it was just an arbitrary change, but if it's enabling that notification configuration change, that defintiely makes sense.


intellij {
pluginName = "google-java-format"
version = "211.6693.65-EAP-SNAPSHOT"
plugins = ["java"]
version = "2020.3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like to build these against the latest version of IntelliJ possible. This causes a compile-time error if they added methods to CodeStyleManager, which they do from time to time (albeit not in a while now).

@plumpy
Copy link
Collaborator

plumpy commented Nov 23, 2021

...oh, actually, the 1.13 commit just landed, so you can rebase this now. Thanks again!

Add .gitignore for gradle generated files
Update Intellij Gradle plugin to v1.2.1
@ze
Copy link
Contributor Author

ze commented Feb 3, 2022

Welp, more than a "few days or so" have passed, but I rebased. Perfectly willing to drop back down to 201 from 203, but we will lose some of the newer gains which may become more of a problem further down the line

@cushon
Copy link
Collaborator

cushon commented Feb 3, 2022

Thanks for getting back to this!

No concerns from me, but I'll defer to @plumpy.

@ze did you see the comment about using the latest snapshot release here: #688 (comment) ?

@ze
Copy link
Contributor Author

ze commented Feb 3, 2022

Yep! I updated it from 2020.3 to 221.3427-EAP-CANDIDATE-SNAPSHOT which I think is the latest snapshot
source: https://www.jetbrains.com/intellij-repository/snapshots/

@copybara-service copybara-service bot closed this in d86e930 Feb 4, 2022
@plumpy
Copy link
Collaborator

plumpy commented Feb 4, 2022

Thanks again @ze, I appreciate your help here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants