You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Plugin Verifier verifies the compatibility of a plugin with a given IDE, it should also verify the compatibility of the plugin against the JBR that comes with the given IDE.
Proposed solution
Remove the -runtime-dir command line argument given to the plugin verifier.
The path to the directory containing Java runtime JAR files (JDK).
If not specified, the embedded JDK from the provided IDE parameter will be used.
If the IDE does not contain an embedded JDK, the JAVA_HOME environment variable will be used to resolve the Java runtime.
As far as I am aware, the IDE distributions downloaded for the Plugin Verifier should usually have a bundled JBR. Also note that in contrast to all the other usages of RuntimeAware, the JBR is not actually used as a runtime in this context. The PluginVerifier uses the JBR directory to resolve classes used by the plugin, so it can verify whether the used classes, methods, and fields exist in the given IDE/JBR.
Alternatives you've considered
It might make sense to provide an explicit option to use a different JBR as the one bundled with the IDE. I am also not sure if we can really assume that all IDEs downloaded for the Plugin Verifier have a bundled JBR. So, it might also make sense to test whether they have one, and fallback to the JBR used by the other tasks.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Those are valid points — passing the runtimeDirectory to Plugin Verifier makes it use the JBR bundled with the IntelliJ Platform you use for building the plugin, not the one bundled within the IDE distribution picked for the verification.
Still, the case when the picked IDE has no JBR bundled is possible.
@novotnyr Can we introduce a -fallback-runtime-dir so we could use provided Java Runtime when IDE has no JBR present?
As I see, currently we use provided Runtime, then check for the bundled one:
Describe the need of your request
When the Plugin Verifier verifies the compatibility of a plugin with a given IDE, it should also verify the compatibility of the plugin against the JBR that comes with the given IDE.
Proposed solution
Remove the
-runtime-dir
command line argument given to the plugin verifier.intellij-platform-gradle-plugin/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt
Line 239 in 0c6867a
From the README.md of the Plugin Verifier:
As far as I am aware, the IDE distributions downloaded for the Plugin Verifier should usually have a bundled JBR. Also note that in contrast to all the other usages of
RuntimeAware
, the JBR is not actually used as a runtime in this context. The PluginVerifier uses the JBR directory to resolve classes used by the plugin, so it can verify whether the used classes, methods, and fields exist in the given IDE/JBR.Alternatives you've considered
It might make sense to provide an explicit option to use a different JBR as the one bundled with the IDE. I am also not sure if we can really assume that all IDEs downloaded for the Plugin Verifier have a bundled JBR. So, it might also make sense to test whether they have one, and fallback to the JBR used by the other tasks.
Additional context
No response
The text was updated successfully, but these errors were encountered: