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

bad calva.autoEvaluateCode settings causes errors during activation #2563

Open
ollemartensson opened this issue Jun 5, 2024 · 1 comment

Comments

@ollemartensson
Copy link

When I started to use Calva for the first time copilot suggested nonsense configuration(like it so often does) in the settings.json and I kept the calva.autoEvaluateCode part of it since I wanted to remember to check it out later and it looked like placeholder config.

Then I started to get indications that calva was not active when the calva key-bindings did not work anymore.

I did not know what was wrong at first so I started to discuss this in a slack thread:

Like I described there this is the steps I took to investigate this further:

  1. Uninstalled VSCode and erased all earlier settings and data.
  2. Downloaded the latest VSCode the erased all earlier VSCode settings.
  3. Opened up a clojure project with a deps.edn in it.
  4. Installed the calva extension.
  5. Ran: Developer: Show Running Extensions which are hanging in Activating... state.
  6. Ran: Developer: Show Logs > Extension Host showing the following error:

snippet.log

After a while I started to remove calva config section by section and found that:

;; removing this fixes the problem
"calva.autoEvaluateCode": {
        "onFileLoaded": {
            "enabled": true,
            "exclude": []
        },
    }
;; this does not work 
"calva.autoEvaluateCode": {
        "onFileLoaded": {
            "clj": ""
        },
    }
;; Neither does this:
"calva.autoEvaluateCode": {}

So it seems to me that the parsing of config probably should be more resilient but I leave it up to you to decide how to take this further :)

@PEZ
Copy link
Collaborator

PEZ commented Jun 21, 2024

I agree we probably should at least sanity check this crucial configuration and warn about it if it looks funny.

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

No branches or pull requests

2 participants