clojure-lsp / clojure-lsp-intellij

Intellij Plugin for Clojure & ClojureScript development via Language Server (LSP) made in Clojure
https://clojure-lsp.io
MIT License
76 stars 5 forks source link

JetBrains Exception when attemping to refactor/rename a file #32

Closed codewriter3000 closed 3 months ago

codewriter3000 commented 4 months ago

Describe the bug I get an exception leading me to this tool every time I attempt to rename a file.

To Reproduce Steps to reproduce the behavior:

  1. Click on a file.
  2. Either hit Shift + F6 (the shortcut for refactoring), or right-click on it to bring up the tooltip to rename it.

Expected behavior A dialog for the new file name.

Log - client <-> server
n/a
Log - clojure-lsp
java.lang.StackOverflowError
    at com.intellij.openapi.util.registry.Registry.getInstance(Registry.java:180)
    at com.intellij.openapi.util.registry.Registry.get(Registry.java:45)
    at com.intellij.openapi.util.registry.Registry.is(Registry.java:58)
    at com.intellij.openapi.actionSystem.impl.PreCachedDataContext.reportValueProvidedByRulesUsage(PreCachedDataContext.java:250)
    at com.intellij.openapi.actionSystem.impl.PreCachedDataContext.getDataInner(PreCachedDataContext.java:221)
    at com.intellij.openapi.actionSystem.impl.PreCachedDataContext$InjectedDataContext.lambda$getDataInner$0(PreCachedDataContext.java:387)
    at com.intellij.openapi.actionSystem.InjectedDataKeys.getInjectedData(InjectedDataKeys.java:57)
    at com.intellij.openapi.actionSystem.impl.PreCachedDataContext$InjectedDataContext.getDataInner(PreCachedDataContext.java:387)
    at com.intellij.openapi.actionSystem.impl.PreCachedDataContext.getData(PreCachedDataContext.java:174)
    at com.intellij.openapi.actionSystem.DataContext.getData(DataContext.java:57)
    at com.github.clojure_lsp.intellij.extension.rename$_invoke.invokeStatic(rename.clj:48)
    at com.github.clojure_lsp.intellij.extension.rename$_invoke.invoke(rename.clj:45)
    at com.github.clojure_lsp.intellij.extension.rename$_invoke.invokeStatic(rename.clj:48)
    at com.github.clojure_lsp.intellij.extension.rename$_invoke.invoke(rename.clj:45)
    at com.github.clojure_lsp.intellij.extension.rename$_invoke.invokeStatic(rename.clj:48)
    at com.github.clojure_lsp.intellij.extension.rename$_invoke.invoke(rename.clj:45)
    at com.github.clojure_lsp.intellij.extension.rename$_invoke.invokeStatic(rename.clj:48)
...
(this goes on for a pretty long time)

User details (please complete the following information):

ericdallo commented 4 months ago

@codewriter3000, I can't repro the problem and I'm almost sure it's not related with the plugin itself but the available heap memory available for PyCharm, can you try to increase it following https://www.jetbrains.com/help/pycharm/increasing-memory-heap.html?

codewriter3000 commented 3 months ago

I just changed it to 8192 and I still get the same StackOverflowException.

Also I don't have this issue when I disable the Clojure LSP plugin. image

codewriter3000 commented 3 months ago

image I still have this problem with version 2.1.0.

ericdallo commented 3 months ago

@codewriter3000 does that happens on https://github.com/ericdallo/clojure-sample?

ericdallo commented 3 months ago

@codewriter3000 should be fixed on 2.3.0