bad calva.autoEvaluateCode settings causes errors during activation
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:
- Uninstalled VSCode and erased all earlier settings and data.
- Downloaded the latest VSCode the erased all earlier VSCode settings.
- Opened up a clojure project with a deps.edn in it.
- Installed the calva extension.
- Ran: Developer: Show Running Extensions which are hanging in Activating... state.
- Ran: Developer: Show Logs > Extension Host showing the following error:
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 :)
I agree we probably should at least sanity check this crucial configuration and warn about it if it looks funny.