belav / csharpier

CSharpier is an opinionated code formatter for c#.
https://csharpier.com
MIT License
1.41k stars 99 forks source link

[rider] warning about deprecated function #1224

Closed MonstraG closed 7 months ago

MonstraG commented 7 months ago

This one, I think, is fairly easy to solve. Rider 2024.1 was released couple of days ago, and it reports that the plugin is using a deprectated function.

Environments

Log Output

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'com.intellij.csharpier.ReformatWithCSharpierAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: com.intellij.csharpier]
    at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
    at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
    at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
    at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
    at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:199)

Steps to reproduce ?

jojoman2 commented 7 months ago

Here is another jetbrains plugin that had this same problem: https://github.com/bazelbuild/intellij/issues/5993 And how they solved it: https://github.com/bazelbuild/intellij/pull/6101

belav commented 7 months ago

Thanks for the links! This will be resolved with 1.7.0 which should be out within a couple of days.