Fork me on GitHub
#calva
<
2022-11-02
>
skylize23:11:49

Weird issue with coloring: If I have a defnwith a docstring and a 1-character argument...

(defn foo
  "docstring"
  [x])
... the argument vector displays a white background with black text for all dark themes, or either black or grey background with white text for all light themes. Anyone else with this problem? Any clue what could be causing it? Correction: Only happens specifically with the symbol x (or maybe x and some not yet determined other chars). Since "\x" is an invalid string, I'm thinking something to do with string escaping somewhere in Calva or its deps?

skylize23:11:57

Goes away if if I add more chars to var, add space inside vector, move vector to same line as docstring, or remove docstring. I checked it out with the Scopes Inspector, but that shows the same scopes as normal, and even lists the correct fg/bg colors, making no mention of white or black colors.

pez10:11:36

I doubt Calva has anything to do with this. As always, I could be wrong. Can you run an Extension Bisect and see what it gives?

skylize13:11:19

Great tip! Thanks. Caused by Todo Tree, which apparently was seeing [ ] and [x] as checkbox representations of todos. --- But I was also able to use Extension Bisect it to figure out that Calva has been causing me this error:

[Extension Host] (node:350285) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `code --trace-deprecation ...` to show where the warning was created)

skylize13:11:46

The suggested code --trace-deprecation has never worked on my system, but the Bisect pointed the finger clearly at Calva.

pez14:11:11

We've had that with Calva from day one 😃 Never figured it out. If you do, please feel invited to PR it!

skylize14:11:13

I assume that means you already tried running Code with trace-deprecation flag?

pez14:11:41

It was a very long time since I had a look. Don't remember what I have tried or not.

pez14:11:24

It hasn't bothered me enough, I guess. 😃

skylize14:11:26

On Arch, the flag does nothing. 😞 But when you have a chance, just try starting Code from command line with that flag added, and see if it points to anything useful.

skylize14:11:45

I don't know what the actual security issue is, but when something is deprecated for security reasons, its usually a good idea to raise it above "it bothers me". 😄

pez14:11:49

¯\(ツ)

skylize16:11:02

Are we keeping Node modules up to date? I wonder if just updating some of them could make this just go away.

pez16:11:10

It has happened that we update dependencies.

pez17:11:44

I think it is extract-zip, updated the issue with some info.

skylize17:11:22

👍 I'll test that out later.

metal 1