intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

Add support for mute switch for plugin verifier

Open abrooksv opened this issue 1 year ago • 4 comments

Describe the need of your request

The latest release of the plugin verifier (https://github.com/JetBrains/intellij-plugin-verifier/releases/tag/1.367) added a -mute switch.

Can this be exposed as a ListProperty<String> on the verifier block?

Proposed solution

Add new provider on the verifier config

Alternatives you've considered

No response

Additional context

No response

abrooksv avatar Jun 07 '24 18:06 abrooksv

There's already https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#verifyPlugin-freeArgs which should work. I don't think it makes sense to expose this via dedicated property, given the total number of affected plugins.

YannCebron avatar Jun 10 '24 06:06 YannCebron

I tried to mute some errors with freeArgs, since my plugin has the intellij identifier in its name and title:

    verifyPlugin {
        ides {
            recommended()
        }
        freeArgs = listOf("-mute TemplateWordInPluginId,TemplateWordInPluginName")
    }

However, this results in the following error:

Exception in thread "main" java.lang.IllegalArgumentException: IDE must reside in a directory: <path-to-plugin>/build/distributions/plugin-1.11.0.zip
 	at com.jetbrains.pluginverifier.options.OptionsParser.createIdeDescriptor(OptionsParser.kt:103)
 	at com.jetbrains.pluginverifier.tasks.checkPlugin.DefaultIdeDescriptorParser.parseIdeDescriptors(CheckPluginParamsBuilder.kt:126)
 	at com.jetbrains.pluginverifier.tasks.checkPlugin.CheckPluginParamsBuilder.build(CheckPluginParamsBuilder.kt:41)
 	at com.jetbrains.pluginverifier.tasks.checkPlugin.CheckPluginParamsBuilder.build(CheckPluginParamsBuilder.kt:27)
 	at com.jetbrains.pluginverifier.PluginVerifierMain$main$3$1.invoke(PluginVerifierMain.kt:130)
 	at com.jetbrains.pluginverifier.PluginVerifierMain$main$3$1.invoke(PluginVerifierMain.kt:123)
 	at com.jetbrains.pluginverifier.tasks.profiling.PluginVerificationProfilingsKt.measurePluginVerification(PluginVerificationProfilings.kt:11)
 	at com.jetbrains.pluginverifier.PluginVerifierMain.main(PluginVerifierMain.kt:123)

The command line that is generated looks okay to me, so maybe it's an issue with the plugin verifier itself.

vsaar avatar Jun 13 '24 12:06 vsaar

@vsaar you need to split the list

        freeArgs = listOf(
            "-mute",
            "TemplateWordInPluginId"
        )

abrooksv avatar Jun 14 '24 19:06 abrooksv

@abrooksv, thanks, that worked. Though it's not very intuitive.

vsaar avatar Jun 21 '24 13:06 vsaar

Documented https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-faq.html#how-to-mute-specific-problems-in-verifyplugin

YannCebron avatar Jul 02 '24 11:07 YannCebron

I just want to comment that the problem of not splitting up the single arguments leading to the error IDE must reside in directory has led me on the wildest goose chase. This is probably a case of a problem not being caught at the right place and in combination with the inability to debug Gradle (in Intellij) and some outdated documentation (even though the plugin was just released), see downloadDirectory, which doesn't exist, leads to a very frustrating experience.

Macariel avatar Aug 02 '24 09:08 Macariel

@Macariel You can usually debug gradle (as far as gradle is debuggable...) by enabling Gradle script debugging

Screenshot 2024-08-02 at 8 23 53 AM

abrooksv avatar Aug 02 '24 15:08 abrooksv