This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-20
Channels
- # announcements (16)
- # babashka (71)
- # beginners (121)
- # bristol-clojurians (2)
- # calva (55)
- # clj-kondo (16)
- # clojure (103)
- # clojure-europe (9)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-spec (49)
- # clojure-uk (57)
- # clojurescript (28)
- # conjure (9)
- # cursive (6)
- # datascript (3)
- # datomic (35)
- # duct (20)
- # events (3)
- # figwheel-main (12)
- # fulcro (6)
- # graalvm (12)
- # juxt (3)
- # kaocha (5)
- # lumo (10)
- # malli (5)
- # off-topic (54)
- # pathom (8)
- # re-frame (19)
- # reitit (21)
- # remote-jobs (1)
- # shadow-cljs (102)
- # sql (38)
- # tools-deps (60)
- # uncomplicate (3)
- # xtdb (10)
Would be nice if Calva could display a line number when an error is thrown while evaluating a form. Either in the file itself or in the REPL output
I'm working on a shadow-cljs project and I have to tab over to my browser console to see the error info
There may actually be an recent issue with that. I noticed today I'm not seeing stacktraces, which should be printed with errors afaik.
https://github.com/BetterThanTomorrow/calva/issues/758 If you need a more detailed bug report or repro steps I can edit it tomorrow, I am too tired tonight lol
All good! I noticed earlier too and sent to @pez, but he is in a very different time zone and therefore sleep schedule, so waiting on his reply (and I'm "off" for the evening). If I'm not missing something there is something definitely wrong
On a different note, is it currently possible to pretty-print REPL output? Currently I have a lot of outputs like the first image, which is obviously a little hard to parse at a glance, so I wind up editing it to look like the second photo so I can confirm I have the right output. Not a big deal, but the cumulative effort adds up
Indeed, this button in the bottom right of the status bar toggles pretty printing of output
Okay, I thought that might be what that's for. But my pretty-printing is turned on
Just not working đ
Aha! This is something I noticed recently and was confused about. shadow does pprinting differently for reasons. I added this to the docs to clarify: https://calva.io/pprint/#pprint-is-not-working-for-clojurescript
@pez maybe we should dig up the reasons we stopped defaulting to the calva pprint engine :thinking_face: . If we can switch back, then we can avoid this confusion at least in the default case.
So, essentially you can change your pprint engine to "calva" in your settings, or you can set :repl-pprint to true in :devtools of your shadow-cljs build
Seems like for me switching the pprint engine to "calva" worked, but setting :repl-pprint
in my settings had no effect. Might be worth adding a note about in the docs
:repl-pprint works for me. Make sure it was added correctly and that you restarted your shadow repl / build
This is from the shadow docs: https://shadow-cljs.github.io/docs/UsersGuide.html#_repl_3
I did restart it pretty sure. I will double check that it doesn't work later. I didn't have :repl-init-ns
set, which I saw before is mentioned in that link, but I figured that shouldn't affect it
Hi, has something changed recently in either latest Calva or latest VSCode update .. I cannot open the REPL window (had a nice orange logo inside the window and on the title bar), I am only getting the output.repl window - I used to do Command-Shift-P .. Open REPL Window (from memory)
@gmercer, yes, a recent Calva update replaced that window with the output.repl window. I do miss those sweet logos, but it is about the only thing I (as a maintainer) miss about it. The default shortcut for opening the new repl window is ctrl+alt+c o
. (And it can be opened via the command palette, like you used to do with the old window, as well.)
the old window also coped with Enter to execute command but we must use Ctrl-Enter now đ
We could consider making enter
work in this window as well. đ But a big part of the point with the new window is that it works very much like a regular file, so alt+enter
should feel quite natural after a while.
See https://clojureverse.org/t/calva-summer-of-bugs-2020/6303 for a bit of the rationale with the shift.
Not a biggie - but I was using VSCode Live Share with someone .. and it was not happy about the new style .. but the old window was not shareable either .. just thought it was worth mentioning
Live Share is one of the reasons for the shift. Since it wasn't really feasibly to make the old window work with Live Share.
File was unwriteable .. from memory .. I will wait for my co-conspirator to get well and try again .. might be next week .. I may have incorrectly tried to start my own repl session
Might be that there are none. I had some troubles with that in the first versions, but might have fixed it. Please fly like that a while and let us know. Ie would be most happy to remove that line.
I've been operating mostly without the output window open, lol. I thought the quirks were with the command to focus/open it, sometimes opening multiple editors for it in different view columns, and then having inconsistent behavior with where output goes. I never experienced this though, and maybe this was just an issue before we made calva save the file after writing to it. I think if multiple editors are open with the same doc now, if the doc is saved it should be reflected across all editors
Calva v2.0.122 is out and stacktraces are fixed (now showing again in the output window) @mail985

Does calva use the same rules as cljfmt for itâs formatting?
Yes. In fact Calva is using cljfmt. And you are in charge is the rules. https://calva.io/formatting/
Calva friends and testers: I could use some help testing this vsix: https://7808-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.123-fix-interrupted-evaluation-output-91674a90.vsix Some minor changes were made to error printing both as annotations and in the output window, mainly to print an error when evaluations are interrupted. I've tested myself on linux, but more testing would be good, especially on Mac and Windows. Basically, install it and test out interrupting evaluations, like this (using Calva's interrupt command)
(loop [i 1000]
(println i)
(Thread/sleep 3000)
(if (zero? i)
i
(recur (dec i))))
And generally just see that no other output looks weird or is missing :man-shrugging: