Fork me on GitHub
#calva
<
2020-06-14
>
pez09:06:04

@borkdude: In working with that parser bug (which I think I have figured out now), one of my test texts puzzle me a bit. This:

(comment
  
  #foo :bar
  (foo #foo ('foo^' :bar))
  #_ 'abc 
  #foo  @~#(foo :bar) \space
  \' {:foo (#foo '[1 2 3])} 'abc
  #_#_
  #foo
   #bar
    #baz
     #{:foo (#foo '[1 2 3])}
  #foo
   'bar
  \a [] "a"

  )
Here, Calva's parser thinks the (comment ...) form is fine, but clj-kondo complains about the opening paren not being matched. Which judgment is correct?

borkdude09:06:51

can you make a smaller repro out of this which fails in clj-kondo but succeeds with JVM clojure?

pez10:06:54

Trying that shows me that it is Calva that is ”wrong”: This is the minimum repro:

(comment ^)
Calva doesn't care that the meta data is missing, but both kondo and clojure complains about an unmatched closing paren. Which is fine, Calva likes to be helpful with structure and I don't mind it doing a friendly interpretation of what is a complete form. 😃

borkdude10:06:24

what parser are you using?

pez10:06:34

Calva's own.

borkdude10:06:48

it parses sexprs?

pez10:06:06

Yes. Imagine if it didn't! 😃

borkdude10:06:34

I wonder how you implemented it then. both clj-kondo and bb are based (indirectly) on tools.reader

pez10:06:45

Well, actually it isn't a full parser. It is a tokenizer, and then I have a token cursor that can navigate sexprs.

pez10:06:38

It's completely bespoke. Written from scratch in super-stateful typescript.

pez10:06:46

I can't really use tools.reader, because it croaks too easily, Calva needs to be much more resilient . 😃

gmercer14:06:03

Is anyone getting this command 'paredit.deleteBackward' not found when hitting delete? I have to hit Shift-Delete to delete a character but that can lead to bad paredit results

gmercer14:06:01

I think VS Code updated to the May release on my last reboot

gmercer14:06:46

I have tried uninstall Calva, close VS Code, install Calva

gmercer14:06:23

It was all working fine prior to update

pez15:06:38

Does anything else in Calva still work?

pez16:06:30

@gmercer, I thought I could reproduce the problem there a while, but it turns out I can't. Can you give us some more details about your os and such?

gmercer21:06:06

@pez I am and jacked in to both CLJ & CLJS using the re-frame template +shadow option, and everything seems fine. It was working two days before. I think I had the May 2020 Update downloaded but not applied and had to reboot. MacOS 10.14.6 Calva 2.0.103 Version: 1.46.0 Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321 Date: 2020-06-10T08:59:06.977Z Electron: 7.3.1 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Darwin x64 18.7.0

gmercer22:06:47

@pez I had another paredit hanging around - removed this, and ALL IS GOOD NOW ... sorry to bother