This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-15
Channels
- # announcements (2)
- # beginners (24)
- # calva (22)
- # cider (4)
- # clara (15)
- # clojure (24)
- # clojure-europe (24)
- # clojure-korea (16)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (8)
- # clojurescript (30)
- # conjure (1)
- # datahike (1)
- # datomic (7)
- # emacs (10)
- # events (1)
- # fulcro (22)
- # graalvm (18)
- # graphql (6)
- # jobs (1)
- # jobs-discuss (71)
- # lsp (22)
- # malli (27)
- # missionary (31)
- # polylith (7)
- # portal (6)
- # releases (1)
- # remote-jobs (3)
- # ring (9)
- # shadow-cljs (16)
- # squint (1)
- # tools-deps (9)
- # vim (9)
- # xtdb (15)
Can the new terminal results output formatting be customized? I would prefer more vertical (tonsky style) line breaks. As I am often on a laptop and the arbitrary line wrapping makes it hard to see data shape.
some unfortunate indenting..
I’d prefer to see these as a vertical column. This make it hard to see.
Although it is more compact, so I realize there’s a tradeoff..
ps I’m learning to use portal more, so maybe not crucial to solve?
The formatting for the terminal output is done using zprint, so we really could make it customizable.
Or we could go for Tonsky style formatting and skip making it customizable. I would lean towards this option.
Also, I’m super keen to hear what you think of the new inspector, so would love if you installed the latest VSIX build of that and took it for some spins.
I played with new inspector today. Looks neat. I like the value icons. My first impression is that i would want to see the last form auto expanded, on top, with maybe levels 2-n folded? I guess it depends. But im orobably thinking of it like normal results, not a backup drill-down explorerer it currently is. But to really use it a lot i wouldnt want to have to click and drill after every eval? All in all, the more results options the better! If the repl is our super power, taking the viz + interaction to the logical extensions just makes sense 👏
Thanks for having a look! The reason we don’t auto-expand is that it can take some time, depending on the size of the structure, and it locks the ui during. We could consider a configuration which enables auto-expansion, but maybe it is better that the user uses runCommands to string the evaluation and the expansion. But first we must enable the expansion via an exposed command, of course.
The changes in v2.0.437 that updated the nREPL/CIDER dependencies mean that CIDER will "opt out" of projects that use Clojure 1.8 (or earlier) because the new version of CIDER requires Clojure 1.9+. A user on a Clojure 1.8 project started getting the warning about cider-nrepl not being present -- and test running stopped working -- but the only change they'd made was updating Calva by restarting VS Code (over the weekend, to v2.0.439) 😞 We downgraded to v2.0.436 and it all worked again.
You shouldn’t need to downgrade Calva. The change was only about default dependencies. You can use whatever versions via the setting calva.jackInDependencyVersions
:
"calva.jackInDependencyVersions": {
"nrepl": "1.1.1",
"cider-nrepl": "0.47.1",
"cider/piggieback": "0.5.3"
}
If this doesn’t work, we have a bug. But even then you can use connect instead of jack-in.We could consider trying to detect Java 1.8 and use special jack-in deps then, or inform about the setting then.
This was a relative beginner and I wasn't about to try to navigate them through modifying their settings JSON to add that stuff on the fly, especially since neither they nor I knew the appropriate nrepl or cider-nrepl versions off the top of our heads. Downgrading Calva was the easiest solution for them now.
I think 2.0.436 was jacking in with nrepl 1.0.0 and cider-nrepl 0.28.5? No idea about piggieback (which they're not relying on). Is there a specific doc link I could send them with the correct older nrepl/cider-nrepl deps so they could make this change themselves without breaking anything?
You think the right versions:
diff --git a/package.json b/package.json
index 348e1b34..c06dba94 100644
--- a/package.json
+++ b/package.json
@@ -491,8 +491,8 @@
}
},
"default": {
- "nrepl": "1.0.0",
- "cider-nrepl": "0.28.5",
+ "nrepl": "1.1.1",
+ "cider-nrepl": "0.47.1",
"cider/piggieback": "0.5.3"
}
},
I added a note here now: https://calva.io/customizing-jack-in-and-connect/#jack-in-dependency-versions
Perfect! Thank you!
For the sake of completeness - you can use Clojure latest locally and 1.8 in production. Cider's requirement (which doesn't come arbitrarily - wish we didn't have it) certainly doesn't have to affect project constraints in any way - good use of profiles/aliases keeps things composable.
True, but using a different version for dev to prod can lead to mistakes -- accidentally using a 1.9-only function or having subtly different behavior -- and this was a relatively new developer, working on a large project with a lot of old dependencies that their teammates wouldn't want them to mess with in project.clj
.
I was shocked to see their project was still using Clojure 1.8 👀