InvocationTargetException when running unusedCode
When running unusedCode from sbt shell in our codebase we always get:
[error] (Global / unusedCode) java.lang.reflect.InvocationTargetException
with no additional output, for every sbt module. Is it some known issue/limitation of the current version of the plugin? If not, do you know if there is some nice way to track down the real reason behind it? I've tried sbt --verbose --debug but it doesn't help much in this case. I don't have any minimal yet, but I can try to create some
please try set ThisBuild / scalafixOnCompile := false or remove scalafixOnCompile := true
Thanks. I've tried set ThisBuild / scalafixOnCompile := false (we don't use scalafixOnCompile := true), but the issue still remains, unfortunately. Also, we've got a bunch of plugins in project/plugins.sbt - I've disabled them all, except sbt-native-packager, but it didn't help either
I'm seeing the exact same thing on the latest version 0.2.0
I made a minimal example to reproduce this issue. https://github.com/tkawachi/testunused
I made a minimal example to reproduce this issue. https://github.com/tkawachi/testunused
- https://github.com/xuwei-k/testunused/runs/7384036712
- https://github.com/xuwei-k/testunused/commit/913822f72ca8cca8b23e61f01f18ed45b0df08a7
Could not reproduce.
When I ran unusedCode from IntelliJ IDEA's sbt shell on Windows, the problem occurred, but not when I ran it from WSL's sbt. Hmmm. I wonder what it is?
I thought IntelliJ IDEA sbt shell was suspicious, so I tried IntelliJ IDEA sbt shell on Linux as another environment, but the problem didn't occur.