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

Exception thrown when registering "resolve-macro-as" command #1495

Closed
bpringe opened this issue Jan 23, 2022 · 3 comments · Fixed by #1496
Closed

Exception thrown when registering "resolve-macro-as" command #1495

bpringe opened this issue Jan 23, 2022 · 3 comments · Fixed by #1496
Labels
bug Something isn't working lsp

Comments

@bpringe
Copy link
Member

bpringe commented Jan 23, 2022

It seems we may be registering it twice. See this comment for this error: #1482 (comment).

@bpringe bpringe added bug Something isn't working lsp labels Jan 23, 2022
@bpringe bpringe added this to To do in Brandon's Board via automation Jan 23, 2022
@bpringe bpringe moved this from To do to In progress in Brandon's Board Jan 23, 2022
@bpringe bpringe mentioned this issue Jan 23, 2022
15 tasks
@bpringe
Copy link
Member Author

bpringe commented Jan 23, 2022

@ericdallo It seems that clojure-lsp now registers or causes the client to register the resolve-macro-as command, and also handles presenting the user with choices about how to resolve the macro, which Calva previously did itself. This now causes an exception to be thrown when Calva tries to register resolve-macro-as itself, and it also causes the current code to present the options to the user as Calva does it, then clojure-lsp presents options to the user (since that command now causes that).

It seems we probably can stop registering resolve-macro-as and stop presenting the options to the user, and instead defer all of this to clojure-lsp. Is that correct?

@bpringe
Copy link
Member Author

bpringe commented Jan 23, 2022

You can see the changes in the linked PR. @ericdallo Let me know what you think.

@bpringe bpringe changed the title Errors appear in the developer console related to "resolve-macro-as" Exception thrown when registering "resolve-macro-as" command Jan 23, 2022
@ericdallo
Copy link
Contributor

@bpringe correct, I think I found a issue with that recently and ended up changing to handle via code action / clojure-lsp side, sorry for not warning about that, calva should handle that as other refactor commands normally.

Brandon's Board automation moved this from In progress to Done Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp
Projects
Development

Successfully merging a pull request may close this issue.

2 participants