This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-24
Channels
- # announcements (6)
- # beginners (89)
- # calva (75)
- # cider (37)
- # clj-kondo (1)
- # cljs-dev (19)
- # cljsjs (8)
- # clojars (1)
- # clojure (122)
- # clojure-europe (6)
- # clojure-italy (41)
- # clojure-nl (18)
- # clojure-uk (24)
- # clojurescript (26)
- # cursive (6)
- # data-science (5)
- # datomic (51)
- # emacs (28)
- # fulcro (8)
- # graalvm (13)
- # hoplon (1)
- # immutant (1)
- # jobs (3)
- # joker (1)
- # keechma (43)
- # lambdaisland (1)
- # leiningen (37)
- # midje (1)
- # nrepl (2)
- # off-topic (32)
- # re-frame (3)
- # reagent (24)
- # reitit (5)
- # remote-jobs (1)
- # shadow-cljs (33)
- # sql (7)
- # tools-deps (11)
Fixed a bug where if you didn't have a custom cljs repl specified, the connect picker menu would not be populated.
Maybe a known issue, but if my project defines no aliases, the jack in action uses invalid arguments to Clojure CLI
That's not a known issue. Maybe something introduced just today even. Can you file an issue about it? I'll look at it ASAP.
Thanks for reporting! I'm sorry about that bug. I'll fix as soon as I have access to a computer.
The fix is out. Again thanks for quickly reporting. I hope that not too many people were inconvenienced by that!
(set! *newbie-alert* true)
I’m trying to get a REBL session by running jack-in command from Calva. I have followed the instructions to setup REBL using deps.edn
, and that works when I run it from the command line: clj -R:rebl -m cognitect.rebl
. When I call jack-in from Calva, and select the REBL alias to launch with, I get an error:
> Executing task: /usr/local/bin/clojure -Sdeps "{:deps {nrepl {:mvn/version \"0.6.0\"} cider/cider-nrepl {:mvn/version \"0.21.1\"}}}" -A:rebl -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" <
Exception in thread "main" clojure.lang.ArityException: Wrong number of args (4) passed to: cognitect.rebl/-main
at clojure.lang.AFn.throwArity(AFn.java:429)
at clojure.lang.AFn.invoke(AFn.java:44)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.main$main_opt.invokeStatic(main.clj:491)
at clojure.main$main_opt.invoke(main.clj:487)
at clojure.main$main.invokeStatic(main.clj:598)
at clojure.main$main.doInvoke(main.clj:561)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:37)
The terminal process terminated with exit code: 1
Any ideas on how to fix this?I tuned out of Calva development for a couple months… wow - ya’ll have moved fast! Is there a changelog for v2+ stuff somewhere? My CTO asked for me to demo how Clojure could fit into our product, and I’m trying to get back up to speed on Cavla to do so.
I’m happy to hear you want to use Calva for that! Here’s the closest to a change log: https://clojureverse.org/t/the-calva-journey-continues-please-jack-in
@stefan.van.den.oord, I’m unfamiliar with the -R flag. And with REBL. I think @lilactown may have more knowledge about it…
You can see in the command that you are using an alias called :rebl
which probably has a main set
that’s what the -R does, right: load the stuff, but not run it (or something like that)
Right. What's actually happening is the args after -A:rebl
are passed through to the main set by the REBL alias
You could remove the main from the :rebl
alias or Calva could provide a way of specifying what way to consume the alias (R, A, etc.)
It launches the REPL without the main, as you would expect, but how can I now launch a REBL that is connected to Calva?
Is there something Calva can do to support this better? What does it mean “remove the main from the :rebl
alias”?
Getting things wired up to redirect repl expressions to the REBL ui takes some sort of middleware FYI
By remove the main, I mean that an alias can contain different configurations that override what's passed in to the clojure CLI. Like a different main routine to run on startup
Also, can you write something about how you got it working on the Calva wiki, @stefan.van.den.oord?
There’s still one missing link though: How can I evaluate something in Calva and have it end up in REBL?
@lilactown So I would probably be best off creating two aliases, one with main for clj
cli and one without for Calva?
I think that’s what @lilactown meant by middleware.
You'll need to specify the middleware to be loaded via the jack in command tho so I'm not sure you can use it with Calva automatically
I think what this whole situation is about is that people who want to use some of these more "advanced" tools need finer grained control over the jack in command
While we’re at it, what’s wrong when I get “unable to resolve symbol: slurp in this context”, that’s on clojure.core…
In Emacs there's a way to execute jack in that prompts for the exact command to run to start the Clojure process
@stefan.van.den.oord, have you loaded the file?
It was? Yeah, I should probably make loading files automatically default behaviour in Calva and people who do not want it need to disable it, because it is causing confusion like it is now.
To be honest I’m thoroughly confused about the build-side of things with clojure. I started doing cljs a few months back, with shadow-cljs, and that seemed clear enough, but now with clojure there’s leingingen, boot, tools.deps, … 😞
The mental model of Clojure and CLJS is very different too. CLJS is a static compile of code to JS. Clojure is usually interpreted in process
deps.edn for sure, @stefan.van.den.oord. Maybe @dominicm can make a case for you using Edge.
Right, off to bed. So @pez in summary, I don’t think I’ll write that wiki post just yet, because without the “middleware” to integrate it, it doesn’t make a lot of sense I guess.
I haven’t been using REBL. (Will fix that flaw.) Does it makes sense to think of it as a better REPL prompt? I am trying to figure out how to design an integration well.
I think it’s better to think of it is as like a tool for data inspections / introspection