API breakage in 15.0.2

In my plugin, I'm using UpdateChecker.getDisabledToUpdatePlugins() to disable plugin updates when the user's upgrade period as defined in their licence is expired. This API appears to have changed in 15.0.2, the code I'm calling it from is Kotlin and getDisabledToUpdatePlugins() no longer resolves. I can use the property instead, but that no longer returns a mutable set. I see that the underlying set is mutable, but the returned on on the property is not. Should I now be using excludedFromUpdateCheckPlugins?

API breakage in a minor point release is very unfortunate, it's inevitably confusing for users who don't realise why they're not receiving the latest version of my plugin if they're on 15.0.1.

Also, my impression was that public API classes were not going to be Kotlin because of binary compatibility issues with plugins - is this no longer the case?

Comment actions Permalink

First of all, if you consider UpdateChecker to be a public API class, then the entire IntelliJ is public API, and we can never change anything anywhere. :) The class is absolutely part of the implementation, but it happened to have one method which appeared to be useful to plugin developers.

In fact, the semantics of this method is not entirely correct for your purpose, because plugins can be added or removed from disabledToUpdatePlugins set by the user when they check or uncheck checkboxes in the update notification dialog.

The new API (excludedFromUpdateCheckPlugins) does the right thing: it's only modifiable through the plugin API and completely disables update checks for plugins on the list.

As for using Kotlin in the APIs, the only thing needed to ensure binary compatibility is that signatures of public API classes do not refer to any classes from the Kotlin runtime, which I believe is still the case here.

Comment actions Permalink

Hehe, yes, I consider the "API" to be "anything I need", which in this case included that method. I'll use the new one from 15.0.2 on then.

Thanks for the details on Kotlin too, that's interesting.

Comment actions Permalink

I just upgraded my IntelliJ plugin to the latest Kotlin version, and I'm now getting the following error:

Error:Kotlin: Class 'com/intellij/openapi/updateSettings/impl/UpdateChecker' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.0.1, expected version is 1.1.0 (/Users/colin/dev/cursive/lib/IntelliJ-15-SDK/lib/idea.jar!/com/intellij/openapi/updateSettings/impl/UpdateChecker.class)

It looks like this is now introducing binary incompatibilities. Can I do anything to fix this?


Please sign in to leave a comment.