intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

runPluginVerifier returns returns with exit code 0 even if it finds some errors

Open tpasternak opened this issue 2 years ago • 1 comments

What happened?

runPluginVerifier exited with 0 despite spotting some errors

Relevant log output or stack trace

No response

Steps to reproduce

  1. Create a hello world plugin
  2. Do something that contains error spot by plugin verifier (for example mark it dynamic, but implement a non-dynamic extension point)
  3. Execute ./gradlew :runPluginVerifier

Result: The error message is print correctly, but the exit code is 0, so it's impossible to use runPluginVerifier to implement a CI guard for some features.

Gradle IntelliJ Plugin version

1.16.0

Gradle version

unrelated

Operating System

None

Link to build, i.e. failing GitHub Action job

No response

tpasternak avatar Oct 31 '23 15:10 tpasternak

As discussed, the problem is categorized as Internal API usages. Therefore, NOT_DYNAMIC doesn't make the runPluginverifier task to fail.

An example issue report looks like:

Plugin org.jetbrains.plugins.template:1.11.2 against IC-232.10227.8: Compatible. 1 usage of internal API
Internal API usages (1): 
    #Internal interface com.intellij.ide.ApplicationInitializedListener reference
        Internal interface com.intellij.ide.ApplicationInitializedListener is referenced in org.jetbrains.plugins.template.listeners.MyApplicationInitializedListener. This interface is marked with @org.jetbrains.annotations.ApiStatus.Internal annotation or @com.intellij.openapi.util.IntellijInternalApi annotation and indicates that the class is not supposed to be used in client code.
    Plugin probably cannot be enabled or disabled without IDE restart: Plugin probably cannot be enabled or disabled without IDE restart because it declares non-dynamic extensions: `com.intellij.applicationInitializedListener`

cc @novotnyr

hsz avatar Nov 29 '23 13:11 hsz

The Internal API Usages and the dynamic eligibility are two different concepts.

Additionally, this might be connected with Plugin Verifier and possibly misleading message output in the console. This has been already fixed.

novotnyr avatar Apr 03 '24 13:04 novotnyr