detekt / detekt-intellij-plugin

detekt plugin for IntelliJ
https://plugins.jetbrains.com/plugin/10761-detekt
Apache License 2.0
290 stars 39 forks source link

Issues of the kotlin compiler are blamed at detekt plugin #271

Open arturbosch opened 1 year ago

arturbosch commented 1 year ago

We get a large amount of bug reports regarding issues coming from the kotlin compiler but are blamed at the detekt plugin. One might notice no stacktrace which mentioned any of detekt's known packages.

The issue might be that detekt bundles API's which is clearly shipped by Intellij and the Kotlin plugin itself. This is to the nature that the Kotlin compiler (which detekt uses the embedded version) bundles itself some of IntelliJ apis.

Compatibility warnings (1): 
    #Plugin bundles IDE packages
        The plugin distribution bundles IDE packages 'org.jetbrains.org.objectweb.asm.signature', 'org.jetbrains.org.objectweb.asm.commons', 'org.jetbrains.org.objectweb.asm', 'org.jetbrains.org.objectweb.asm.util', 'org.jetbrains.org.objectweb', 'org.jetbrains.org.objectweb.asm.tree.analysis', 'org.jetbrains.concurrency', 'org.jetbrains.org.objectweb.asm.tree', 'org.jetbrains.org'. Bundling IDE packages is considered bad practice and may lead to sophisticated compatibility problems. Consider excluding these IDE packages from the plugin distribution. If your plugin depends on classes of an IDE bundled plugin, explicitly specify dependency on that plugin instead of bundling it. 

The bug reporting logic of IntelliJ might consider exception thrown from above packages are caused by detekt.

nils-a commented 1 year ago

@arturbosch I had this only once and never again, but if there's anything I can test/try or help with, don't hesitate to reach out.

arturbosch commented 1 year ago

I have the impression that the Kotlin compiler reports less from 2023.1+.

kenyee commented 1 month ago

We're seeing this in our IDEA/AS logs as well. Probably worth mentioning in the repo Readme since it seems to be happening to everyone...