Closed nevillelyh closed 3 years ago
IJ plugin classloading in tests is handled by the IJ test framework, not SBT.
The reason you're getting this error is that IJ cannot find plugins jars because the plugin artifact hasn't been assembled.
sbt-idea-plugin
adds a dependency on packageArtifact
task to the testOnly
task.
However, turns out I somehow missed that sbt's test
task itself does not depend on testOnly
and since you've been running test
task as a part of the CI, the artifact was not built.
I'll fix the test
test task in the 3.9.2 which I'm planning to publish later today.
Ah yeah that explains why it worked after packagePluginZip
. Thanks!
After upgrading from 3.8.5 to 3.9.1 (and a few other things due to Scala 2.12->2.13) my test stopped working with a
NoClassDefFoundError
. It seems theTest
scope no longer includesCompile
classes. I tried the common sbt tricks likefork
or layering strategy but none worked.This is the breaking commit: https://github.com/spotify/scio-idea-plugin/commit/31a386ad8c9d5e05f3339488f09bb047f6a56c5b