verifier and new extensions points

Answered

I write the plugin for Intellij 2018.*-2019.3

I use extensions points 

<extensions defaultExtensionNs="com.intellij">
<openapi.vcs.ui.cloneDialog.VcsCloneDialogExtension
implementation="com.microfocus.intellij.plugin.gitclient.clone.DmCloneDialogExtension"/>
</extensions>

and 

<extensions defaultExtensionNs="Git4Idea">
<gitRepositoryHostingService
implementation="com.microfocus.intellij.plugin.gitclient.repository.DmRepositoryHostingService"/>
</extensions>

for 2019.3 and earlier versions

I build my plugin with 2019.3 and install it on 2018.3 and 2019.3 and all work fine.

But when I check the plugin with verifier v.1.222 and IC 2018.3 (https://github.com/JetBrains/intellij-plugin-verifier) the last shows error:

 #Package 'com.intellij.openapi.vcs.ui.cloneDialog' is not found
Package 'com.intellij.openapi.vcs.ui.cloneDialog' is not found along with its 3 classes.
Probably the package 'com.intellij.openapi.vcs.ui.cloneDialog' belongs to a library or dependency that is not resolved by the checker.
It is also possible, however, that this package was actually removed from a dependency causing the detected problems. Access to unresolved classes at runtime may lead to **NoSuchClassError**.

How I can avoid verifier errors like this?

2 comments
Comment actions Permalink

Hello,
sorry for the late reply

>>> #Package 'com.intellij.openapi.vcs.ui.cloneDialog' is not found

The root of this problem is that the new clone dialog API (openapi.vcs.ui.cloneDialog.VcsCloneDialogExtension) is only available from 2019.3 and will not work in earlier versions.

`gitRepositoryHostingService` EP is outdated since 2019.3 and exists for compatibility with external plugins. It seems that I forgot to mark it as deprecated..

I recommend to implement own way to load list of repos in your implementation of `openapi.vcs.ui.cloneDialog.VcsCloneDialogExtension` for the 2019.3 and newer versions

0
Comment actions Permalink

Maybe I don't clear my question:

How I can publish plugin with old functional (to 2019.2) and new (2019.3+) one in one build.

I know when `openapi.vcs.ui.cloneDialog.VcsCloneDialogExtension` appears. But, as I noticed, Intellij ignores EP it doesn't know, so "unknown classes" don't run. So plugin with both functional works correctly in old and new Intellij versions. Verifier doesn't consider that fact. The problem is I can't publish it at the Jetbrains marketplace. 

0

Please sign in to leave a comment.