./gradlew verifyPlugin reports no issue (version: 1.373)
At runtime, a ClassNotFoundException is thrown when accessing class
com.intellij.smartUpdate.VcsUpdateStep.
Expected behavior:
Compilation should fail because module intellij.smart.update should not
be on the compile classpath.
The intellij-plugin-verifier should complain that classes from
module intellij.smart.update are being used without a corresponding
dependency declaration in plugin.xml, specifically:
Let me know if I should file a separate issue for intellij-plugin-verifier, given that the verifier should be reporting these dependency violations too. (Should I file this issue on YouTrack?)
What happened?
Plugins can easily be hit by
ClassNotFoundException
at runtime if they access classes from V2 "modules".I've created a minimal repro scenario as a patch on top of the intellij-platform-plugin-template: https://github.com/gharrma/intellij-plugin-repro-module-dependency-violation/commit/8291e98b2e7808301cea3af22826101abc04b4f8
Observed behavior:
./gradlew assemble
succeeds./gradlew verifyPlugin
reports no issue (version: 1.373)At runtime, a
ClassNotFoundException
is thrown when accessing classcom.intellij.smartUpdate.VcsUpdateStep
.Expected behavior:
Compilation should fail because module
intellij.smart.update
should not be on the compile classpath.The intellij-plugin-verifier should complain that classes from module
intellij.smart.update
are being used without a corresponding dependency declaration in plugin.xml, specifically:Note, I believe commit https://github.com/JetBrains/intellij-community/commit/6fb57f5b2d5346c7a622cde47e6d2d6c11acdf2f in IntelliJ 2024.2 is what placed V2 modules into a separate classloader at runtime (thus requiring the explicit dependency declaration in
plugin.xml
).Let me know if I should file a separate issue for intellij-plugin-verifier, given that the verifier should be reporting these dependency violations too. (Should I file this issue on YouTrack?)
Relevant log output or stack trace
Steps to reproduce
[See repro steps in the main description.]
Gradle IntelliJ Plugin version
2.0.1
Gradle version
8.9
Operating System
macOS
Link to build, i.e. failing GitHub Action job
No response