Open kkocel opened 2 years ago
I expect this to be a problem caused by a transitive dependency. At least that seemed the solution in https://github.com/pinterest/ktlint/issues/1143. Please add a clear reproduction path (with exact java version) and sample project.
$ java --version
openjdk 17.0.3 2022-04-19 LTS
OpenJDK Runtime Environment (build 17.0.3+7-LTS)
OpenJDK 64-Bit Server VM (build 17.0.3+7-LTS, mixed mode, sharing)
Reproduction:
ktlint -F
$ ktlint -F
13:28:16.135 [main] INFO com.pinterest.ktlint.internal.KtlintCommandLine - Enable default patterns [**/*.kt, **/*.kts]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jetbrains.kotlin.com.intellij.util.ReflectionUtil (file:/opt/homebrew/Cellar/ktlint/0.47.0/libexec/ktlint) to field java.lang.Throwable.backtrace
WARNING: Please consider reporting this to the maintainers of org.jetbrains.kotlin.com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I just found that @Goooler already reported this to jetbrains as a comment on https://youtrack.jetbrains.com/issue/KT-43704. I am doubting whether it gets any priority from the kotlin team. So until then, you have to ignore it, or try one of the workarounds mentioned in the issue.
I noticed that Illegal reflective access reappeared: