Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getId deprecated - See org.ziglang.execution.ZigRunConfigurationFactory #38

Closed
koekiebox opened this issue Feb 16, 2022 · 11 comments
Closed

Comments

@koekiebox
Copy link

I got the following error while running IntelliJ IDEA v2021.3.2:

com.intellij.diagnostic.PluginException: The default implementation of method 'getId' is deprecated, you need to override it in 'class org.ziglang.execution.ZigRunConfigurationFactory'. The default implementation delegates to 'getName' which may be localized, but return value of this method must not depend on current localization. [Plugin: org.ziglang]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.diagnostic.PluginException.reportDeprecatedDefault(PluginException.java:110)
	at com.intellij.execution.configurations.ConfigurationFactory.getId(ConfigurationFactory.java:75)
	at com.intellij.execution.impl.RunManagerImplKt.getFactoryKey(RunManagerImpl.kt:1374)
	at com.intellij.execution.impl.RunManagerImplKt.access$getFactoryKey(RunManagerImpl.kt:1)
	at com.intellij.execution.impl.RunManagerImpl.getConfigurationTemplate(RunManagerImpl.kt:333)
	at com.intellij.execution.impl.RunManagerImpl.createConfiguration(RunManagerImpl.kt:261)
	at com.intellij.execution.actions.RunConfigurationProducer.cloneTemplateConfigurationStatic(RunConfigurationProducer.java:259)
	at com.intellij.execution.actions.RunConfigurationProducer.cloneTemplateConfiguration(RunConfigurationProducer.java:249)
	at com.intellij.execution.actions.RunConfigurationProducer.createConfigurationFromContext(RunConfigurationProducer.java:98)
	at com.intellij.execution.actions.RunConfigurationProducer.findOrCreateConfigurationFromContext(RunConfigurationProducer.java:199)
	at com.intellij.execution.actions.PreferredProducerFind.doGetConfigurationsFromContext(PreferredProducerFind.java:110)
	at com.intellij.execution.actions.PreferredProducerFind.getConfigurationsFromContext(PreferredProducerFind.java:93)
	at com.intellij.execution.actions.ConfigurationContext.getConfigurationsFromContext(ConfigurationContext.java:414)
	at com.intellij.execution.actions.ConfigurationContext.findPreferredConfiguration(ConfigurationContext.java:292)
	at com.intellij.execution.actions.ConfigurationContext.findExisting(ConfigurationContext.java:285)
	at com.intellij.execution.actions.BaseRunConfigurationAction.findExisting(BaseRunConfigurationAction.java:62)
	at com.intellij.execution.actions.BaseRunConfigurationAction.fullUpdate(BaseRunConfigurationAction.java:232)
	at com.intellij.execution.actions.BaseRunConfigurationAction.update(BaseRunConfigurationAction.java:198)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:602)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$7(ActionUpdater.java:126)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:170)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:127)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:109)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:588)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:434)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$21(ActionUpdater.java:413)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1454)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:413)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:489)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$21(ActionUpdater.java:413)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1454)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:413)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:489)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$21(ActionUpdater.java:413)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1454)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:413)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:489)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$21(ActionUpdater.java:413)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1454)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:413)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:489)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$21(ActionUpdater.java:413)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1454)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:413)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:489)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$21(ActionUpdater.java:413)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1454)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:413)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:233)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$13(ActionUpdater.java:286)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$15(ActionUpdater.java:309)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$16(ActionUpdater.java:309)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$17(ActionUpdater.java:305)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:277)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$18(ActionUpdater.java:304)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:246)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:32)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:225)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:214)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
@koekiebox koekiebox changed the title getId deprecated - See org.ziglang.execution.ZigRunConfigurationFactory getId deprecated - See org.ziglang.execution.ZigRunConfigurationFactory Feb 16, 2022
@koekiebox koekiebox changed the title getId deprecated - See org.ziglang.execution.ZigRunConfigurationFactory getId deprecated - See org.ziglang.execution.ZigRunConfigurationFactory Feb 16, 2022
@ice1000
Copy link
Owner

ice1000 commented Feb 16, 2022

I know it's deprecated

@ice1000
Copy link
Owner

ice1000 commented Feb 16, 2022

I just lost interest in developing idea plugins. I think someone should take the code and make a better plugin.

@koekiebox
Copy link
Author

Ok @ice1000 . I will do a merge request if you have the time to review and approve/merge? I have never done an IntelliJ plug-in and keen to try it out. Thank you!

@ice1000
Copy link
Owner

ice1000 commented Feb 16, 2022

Ok @ice1000 . I will do a merge request if you have the time to review and approve/merge? I have never done an IntelliJ plug-in and keen to try it out. Thank you!

It is very hard to make IDEA plugins. Also, users won't be nice to you. They'll yell at you because of your free work. I've tasted that before.

My recommendation is: don't do it.

However, PRs are welcomed. Go for it, and I'll review. I expect a few lines of changes.

@anatol
Copy link
Contributor

anatol commented Oct 23, 2022

@ice1000 thank you for all the work you've done for the language and for the community. It would be really great if this plugin continue developed. Maybe you can send a message to Zig reddit and ask for volunteers to step up?

@ice1000
Copy link
Owner

ice1000 commented Oct 23, 2022

@ice1000 thank you for all the work you've done for the language and for the community. It would be really great if this plugin continue developed. Maybe you can send a message to Zig reddit and ask for volunteers to step up?

I would expect potential volunteers to be coming here and PR/asking me questions/create new projects directly, and if they're reluctant (or do not have the programming capabilities, as creating IJ plugin = debug a 1M loc Java project everyday) they won't response either.

I've experienced the same with the Julia plugin. The Julia language, I believe, has more users than Zig. The situations are the same.

@anatol
Copy link
Contributor

anatol commented Oct 24, 2022

For the original problem, the fix should be relatively simple, something like

class ZigRunConfigurationFactory(type: ConfigurationType) :
...
   override fun getId() = ZIG_RUN_CONFIG_ID
...

I briefly looked at the plugin sources, and I could say that it is indeed a heroic effort to implement and maintain something like this. And it would be a pity to lose such a useful project.

I tried to build the project against the latest idea plugin SDK. I see there are numerous incompatibilities (+ a lot of deprecated API use).

@ice1000 Is there any chance you can reconsider dropping this plugin? I feel you have a lot of Intellij plugin development experience, and somebody like you would be a great leader for the project.

@anatol
Copy link
Contributor

anatol commented Oct 24, 2022

A bit of context about why I posted my questions. I am trying to learn Zig. It has some interesting language features that I want to try.

I came from Golang development land and one of the reasons I like Go is that it has great IDE support. Having a good language plugin makes the learning/development process much more pleasant. Zig language definitely needs such IDEA plugin.

@ice1000
Copy link
Owner

ice1000 commented Oct 24, 2022

It has some interesting language features that I want to try.

It was also the reason why I made this project. Unfortunately, I had too many classes in my sophomore year (2019) so I abandoned almost all of my intellij plugin projects.

I tried to build the project against the latest idea plugin SDK. I see there are numerous incompatibilities (+ a lot of deprecated API use).

Yes. I do not have time to fix all of them. What users see is just one error -- the id thing. What I see is those numerous incompatibilities. IntelliJ SDK is changing every single day. I am not paid to do this.

@ice1000
Copy link
Owner

ice1000 commented Oct 24, 2022

Right now, in 2022, I'll have to apply for graduate school, so I have even less time.

@ice1000
Copy link
Owner

ice1000 commented Oct 24, 2022

Basically, there are many issues. I'll try to list the ones I can think of, in case any potential next-hero stumble by.

  1. The obvious problems. Fix the build script (it has some hacks on finding a local IDE so you don't have to download the intellij source to build the project) and the deprecations if possible.
  2. Update the grammar. The Zig language is evolving. The syntax needs to be updated.
  3. Update the way it runs Zig code. See my comment Todolist #35 (comment)
  4. Implement stub indices. This part is undocumented and is the most important thing to make cross-file support work. If you try to do this you'll see how hard ij plugin dev is.

anatol pushed a commit to anatol/intellij-zig that referenced this issue Oct 24, 2022
```
com.intellij.diagnostic.PluginException: The default implementation of method 'getId' is deprecated, you need to override it in 'class org.ziglang.execution.ZigRunConfigurationFactory'. The default implementation delegates to 'getName' which may be localized, but return value of this method must not depend on current localization. [Plugin: org.ziglang]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.diagnostic.PluginException.reportDeprecatedDefault(PluginException.java:110)
```

Fixes ice1000#38
anatol pushed a commit to anatol/intellij-zig that referenced this issue Oct 24, 2022
```
com.intellij.diagnostic.PluginException: The default implementation of method 'getId' is deprecated, you need to override it in 'class org.ziglang.execution.ZigRunConfigurationFactory'. The default implementation delegates to 'getName' which may be localized, but return value of this method must not depend on current localization. [Plugin: org.ziglang]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.diagnostic.PluginException.reportDeprecatedDefault(PluginException.java:110)
```

Fixes ice1000#38
anatol pushed a commit to anatol/intellij-zig that referenced this issue Oct 24, 2022
```
com.intellij.diagnostic.PluginException: The default implementation of method 'getId' is deprecated, you need to override it in 'class org.ziglang.execution.ZigRunConfigurationFactory'. The default implementation delegates to 'getName' which may be localized, but return value of this method must not depend on current localization. [Plugin: org.ziglang]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.diagnostic.PluginException.reportDeprecatedDefault(PluginException.java:110)
```

Fixes ice1000#38
anatol pushed a commit to anatol/intellij-zig that referenced this issue Oct 24, 2022
```
com.intellij.diagnostic.PluginException: The default implementation of method 'getId' is deprecated, you need to override it in 'class org.ziglang.execution.ZigRunConfigurationFactory'. The default implementation delegates to 'getName' which may be localized, but return value of this method must not depend on current localization. [Plugin: org.ziglang]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.diagnostic.PluginException.reportDeprecatedDefault(PluginException.java:110)
```

Fixes ice1000#38
anatol added a commit to anatol/intellij-zig that referenced this issue Oct 24, 2022
```
com.intellij.diagnostic.PluginException: The default implementation of method 'getId' is deprecated, you need to override it in 'class org.ziglang.execution.ZigRunConfigurationFactory'. The default implementation delegates to 'getName' which may be localized, but return value of this method must not depend on current localization. [Plugin: org.ziglang]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.diagnostic.PluginException.reportDeprecatedDefault(PluginException.java:110)
```

Fixes ice1000#38
anatol added a commit to anatol/intellij-zig that referenced this issue Oct 24, 2022
```
com.intellij.diagnostic.PluginException: The default implementation of method 'getId' is deprecated, you need to override it in 'class org.ziglang.execution.ZigRunConfigurationFactory'. The default implementation delegates to 'getName' which may be localized, but return value of this method must not depend on current localization. [Plugin: org.ziglang]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.diagnostic.PluginException.reportDeprecatedDefault(PluginException.java:110)
```

Fixes ice1000#38
anatol added a commit to anatol/intellij-zig that referenced this issue Oct 24, 2022
```
com.intellij.diagnostic.PluginException: The default implementation of method 'getId' is deprecated, you need to override it in 'class org.ziglang.execution.ZigRunConfigurationFactory'. The default implementation delegates to 'getName' which may be localized, but return value of this method must not depend on current localization. [Plugin: org.ziglang]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:290)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.diagnostic.PluginException.reportDeprecatedDefault(PluginException.java:110)
```

Fixes ice1000#38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants