Fork me on GitHub
#calva
<
2020-04-24
>
thom09:04:22

Ah, yesterday's discussion has solved my issue. Is the idiomatic VSCode workflow to always have a project directory open then? Any way to do that automatically if I just open a .clj file deep in a project?

pez09:04:32

I don't know if I would call it idiomatic vscode, but Calva certainly assumes that there is a project directory opened. This is why step 1 in ”Connecting Calva” is what it is: https://calva.io/connect/ There is also a page about workspace layouts that is linked from the getting-started page. This has been plauging Calva since day 1 nd we never seem to solve it fully... Not sure what automatic way there is. I do cmd+o and then use the cmd+up until I'm at the project root and hit enter.

hindol10:04:13

That's how Emacs works in general. The Projectile (also by bbatsov, I think) package keeps going up until it sees something that can be called a project (a .git repo, a .projectile file or any of the pom.xml, project.clj, Makefile etc. etc.) and opens that behind our back.

❤️ 1
hindol10:04:21

Maybe Calva can do the same?

hindol10:04:38

Not sure if that's against VSCode norms.

pez10:04:52

We need to make Calva work w/o a project directory, because babashka.

borkdude10:04:57

also because normal clojure. I've used lein repl pretty often from a non-project dir

sogaiu12:04:34

i use clj from non-proj dir sometimes to check things that are generic, but this is via terminal usually

Marc O'Morain12:04:49

I’m using Calva today, and it keeps “locking up” and the commands stop working. Is there anywhere that I can check for errors? Any debug view? The yellow “REPL <lightening> is showing” correctly, and some evaluation does work for a while, and then it stops responding.

Marc O'Morain12:04:26

Using k f for format stops working too, and clj-kondo stops working also.

borkdude12:04:30

@marc-omorain clj-kondo is a separate extension from calva. maybe you can try disabling one or the other to see what's the culprit

Marc O'Morain12:04:03

I restarted VSCode, and disabled clj-kondo, and it hasn’t hung in the last few minutes.

Marc O'Morain12:04:12

It’s broken again, so it wasn’t related to kondo.

Marc O'Morain12:04:35

[2020-04-24 13:45:45.336] [renderer1] [warning] UNRESPONSIVE extension host, 'betterthantomorrow.calva' took 92% of 5065.715ms, saved PROFILE here: '/var/folders/q0/2g2lcf6j79df6vxqm0cg_0zm0000gn/T/exthost-65a9d5.cpuprofile' [{"id":"betterthantomorrow.calva","total":4675972,"percentage":92},{"id":"gc","total":389639,"percentage":8}]
[2020-04-24 13:45:56.832] [renderer1] [warning] {}
[2020-04-24 13:45:58.781] [renderer1] [warning] {}

ryan echternacht13:04:51

@pez #620 is SO MUCH BETTER thank you

❤️ 1
calva 1
pez14:04:38

@marc-omorain, could be the last update. Can you try with 2.0.93?

Marc O'Morain14:04:09

trying that now 👌

pez14:04:17

@ryan072: Thanks! Super fun to implement, so glad if it is useful as well. 😃 Let's hope we can get any performance bugs chased out quickly.

alekszelark15:04:54

Hi guys! I just got new update and saw this

alekszelark15:04:14

It shows even if have "editor.renderIndentGuides": false, So I changed nothing, just got new update and they showed up instantly.

alekszelark15:04:51

"calva.highlight.rainbowIndentGuides": false, helped to hide them, but as I understand there is something wrong with that.

pez15:04:16

Yes, it's a bit confusing, but there is no way to override the built-in guides, so they must be off. Will document it.

alekszelark15:04:07

I think it’d better if calva.highlight.rainbowIndentGuides defaults to off then.

pez15:04:21

I disagree. 😎

alekszelark15:04:02

Ok, but with that’s on, "editor.renderIndentGuides doesn’t make any sense more.

pez15:04:02

it won’t make sense regardless, unfortunately. ¯\(ツ)

pez15:04:18

VS Code's API limits this for us, but, maybe there is some middle ground...

1
pez16:04:06

@marc-omorain, did 2.0.93 work better?

Marc O'Morain16:04:59

yes, I have not had the problem with .93

pez16:04:48

I think one of your source files throws Calva .94 into an infinite loop. If you have the time to try see which one and figure out what's special about it, I'd love that!

alekszelark16:04:19

@pez minor, but annoying issue https://github.com/BetterThanTomorrow/calva/issues/623. I’d like to create a PR for that.

👍 2
sergey.shvets17:04:21

had exactly the same issue with alabaster and arrived to that solution!

pez16:04:58

Thanks, @zelark! And extra thanks for researching it a bit.

pez16:04:18

@marc-omorain, if you do investigate it, disabling calva.highlight.rainbowIndentGuides should make the problem go away, and no need to downgrade to .93 ,if so.

ryan echternacht17:04:41

sometimes my calva -> nREPL connection grinds to a halt (auto formatting fails, the repl itself seems slow). Any thoughts on what’s going on/what I’m doing wrong?

ryan echternacht18:04:52

After a bit of research, it’s definitely on the calva side (my nREPL is fine). It keeps happening within 2 minutes of jacking into an nREPL. I’ve tried reinstalling calva and vscode and no dice. Thoughts?

ryan echternacht18:04:17

the calva repl stops accepting input. formatting stops working.

ryan echternacht18:04:27

@pez I can try to help with debugging, just not sure what is most helpful. looking at my system performance, the vscode rendered helper just goes haywire (>90% cpu on my macbook pro and my fans all kick on)

pez18:04:30

@ryan072, I think it is some source file in your project that exposes the problem. If you can figure out which one, we can narrow it down from there.

ryan echternacht18:04:33

ok, i just started using clj cli (instead of lein) so give me a few minutes to throw up a new project and see if i can repro

pez18:04:21

You do not need to jack in to expose the problem.

pez18:04:25

This is a problem with the parsing to produce the rainbow indent guides.

ryan echternacht19:04:00

fwiw, i disabled that at one poitn and still had the issue (downgrading definitely fixed it)

pez19:04:22

That is worth tons. Which setting did you disable?

pez19:04:22

Time to join a Zoom meeting, and we can look at it together?

pez19:04:26

Dear Calva friends: Latest Calva seems to introduce a severe problem with rendering, see above. I can't reproduce it, but in this build I have tried to safe guard against a potential infinite lopp. Please help testing it. Especially if you have the rendering problem. Here: https://5784-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.95-pez-active-guide-625-47c81ce9.vsix

pez19:04:44

@zelark: ^That version ^ also intrduces a second setting, which makes it possible to highlight only the current/active indent. + it sets the highlight of indent gudes to off by default (and this new current/active to default on).

bringe22:04:22

@pez I just ran into the render issue above and came here to see if someone else had the same problem. I have a code file that will repro it. Not sure if you still need more details.

bringe22:04:10

So as soon as I put a \ before a } in this code it seems to lock it up.

(defn respond-hello [request]
  (let [nm (get-in request [:query-params :name])]
    {:status 200 :body \}))
Not that I wanted to put that there, but I think I originally hit a wrong key when typing and then realized I couldn't backspace

bringe22:04:58

And then I get the message mentioned earlier

[2020-04-24 15:47:11.681] [renderer1] [warning] UNRESPONSIVE extension host, 'betterthantomorrow.calva' took 94% of 5047.946ms, saved PROFILE here: '/tmp/exthost-b0f97c.cpuprofile' [{"id":"betterthantomorrow.calva","total":4724394,"percentage":94},{"id":"gc","total":323330,"percentage":6}]
From the Log (Window) output

bringe22:04:16

Weird thing is I can still type in the file just can't backspace or delete

bringe22:04:37

This is with 2.0.94, I'm about to try the vsix above

bringe22:04:12

It's still happening with the 2.0.95 vsix, specifically placing \ before } in the above code is causing it

bringe22:04:11

FYI - disabling "Highlight Active Indent" fixed it

👍 1