JetBrains / intellij-platform-gradle-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs
https://plugins.jetbrains.com/docs/intellij/gradle-prerequisites.html
Apache License 2.0
1.43k stars 271 forks source link

Plugin incompatible with IntelliJ 203 #574

Closed benwatson528 closed 3 years ago

benwatson528 commented 3 years ago

Hello,

I maintain a plugin, and it has stopped working as of this morning's release with the error:

Plugin 'Avro and Parquet Viewer' (version 'null') is not compatible with the current version of the IDE, because it requires build 202.* or older but the current build is IU-203.5981.155

It's a fairly vanilla Tool Window plugin, so I would expect it to always work with the latest version of IntelliJ. My build.gradle contains:

patchPluginXml {
    sinceBuild("171")
    changeNotes """
      Some LogicalTypes (such as dates) are not written as valid JSON, which was causing some files to not be displayed at all. This update ensures that such files can still be viewed in the raw pane."""
}

so I'm under the impression that the plugin should always be compatible with the latest version. However on the JetBrains Marketplace page I can see:

image

If I try to update the compatibility range then I get the error: "You cannot set an until-build value greater than the until-build value in plugin.xml".

If I manually schedule verifications than I can see that my plugin is compatible:

image

As things stand it isn't even appearing in the marketplace. How can I get my plugin working again?

Any help greatly appreciated.

benwatson528 commented 3 years ago

I am currently updating to id 'org.jetbrains.intellij' version '0.6.5' from 0.4.21, and that should fix it, but it would still be good to know what causes these incompatibilities.

YannCebron commented 3 years ago

I don't see any intellij block in your build.gradle? How is this supposed to work? Please see https://jetbrains.org/intellij/sdk/docs/tutorials/build_system/gradle_guide.html#patching-the-plugin-configuration-file for a detailed guide on how to setup Gradle and specifying/overriding since/until-build attributes.

benwatson528 commented 3 years ago

Thanks for the quick reply. The plugin has worked in every JetBrains product for about a year without the inclusion of an intellij block. patchPluginXml is where I specify the sinceBuild and not untilBuild (because I want it to continue being compatible automatically with each new release). I have read the documentation but it's not crystal clear, and it's difficult for me to play with different settings, because the only way to see if anything truly works is to release it, which isn't exactly ideal for the users of my plugin.

If I replace patchPluginXml with the following then should I be good?

intellij {
  version 'LATEST-EAP-SNAPSHOT'
  updateSinceUntilBuild false

  patchPluginXml {
      sinceBuild("171")
      changeNotes """
        A general version spring clean. Java 1.11, Avro 1.10.0, Parquet 1.11.1, and several other minor bumps."""
  }
}
YannCebron commented 3 years ago

If you want your plugin to be compatible with 171 and later, you should build against 171 and not "LATEST-EAP-SNAPSHOT". patchPluginXml task LGTM

benwatson528 commented 3 years ago

Thanks a lot for your help. I'll give this a go.