This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-30
Channels
- # adventofcode (22)
- # announcements (7)
- # beginners (32)
- # calva (56)
- # cider (96)
- # cljdoc (7)
- # cljs-dev (50)
- # clojure (173)
- # clojure-austin (8)
- # clojure-brasil (7)
- # clojure-europe (10)
- # clojure-greece (2)
- # clojure-italy (10)
- # clojure-nl (9)
- # clojure-spec (18)
- # clojure-uk (143)
- # clojurebridge (3)
- # clojurescript (9)
- # cursive (14)
- # data-science (1)
- # datascript (4)
- # datomic (9)
- # docker (7)
- # emacs (2)
- # figwheel-main (4)
- # fulcro (18)
- # garden (1)
- # graphql (13)
- # hyperfiddle (4)
- # juxt (2)
- # off-topic (43)
- # pathom (1)
- # pedestal (17)
- # portkey (163)
- # re-frame (4)
- # reitit (7)
- # rum (4)
- # shadow-cljs (139)
- # spacemacs (5)
- # sql (14)
- # unrepl (2)
I want to make Calva able to connect without having to instruct the users about setting up project.clj or deps.edn in any particular way. As our still unsolved session with @mateus.pimentel.w from yesterday, reminds about.
:aliases
{:nrepl-server {:extra-deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"}
cider/cider-nrepl {:mvn/version "0.19.0-SNAPSHOT"}
refactor-nrepl {:mvn/version "2.3.1"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}
clj -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"}
cider/cider-nrepl {:mvn/version "0.19.0-SNAPSHOT"}
refactor-nrepl {:mvn/version "2.3.1"}}}' -m nrepl.cmdline --connect --host localhost --port 49832
@slipset You’ll need to use nREPL 0.4+ in the deps, though, as tools.nrepl didn’t have clj
integration at all.
Why doesn’t fastlane suppor transit+edn
, @bozhidar? I suspect I am getting something wrong here. 😃
@slipset, can we start the server with only command line args too? An equivalent to lein repl
, I guess.
I can confirm that the client connect works. Even if the interaction is a bit less stellar than the leiningen version is.
I guess problem is that you want to read the projects deps.edn when you start the server up.
that way it'll work regardless of what tools the user has installed on their system
@lilactown, there are at least two issues in play here. One is freeing Calva of an unnecessary dependency on leiningen and the other to make the “Getting started with Calva” less painful than it currently is.
I mean you want to start the repl in the context of a project. To be able to evaluate forms and stuff.
For starting the client, I want to explore how far we can get with the tools that regardless are needed for Clojure development, before we consider bundling something.
So, in order to do that, the nrepl server has to load the libs that the project depends on. Hence the need to have a deps.edn in place.
right, so we need to: 1. Start the user's application with an nREPL server 2. Connect to the nREPL server with a client we control
Sorry, @lilactown
@slipset, yes, but I’d like for Calva to not have any requirements on what should be in the deps.edn file.
#1 will depend on what kind of project the user is in. it could be shadow-cljs, boot, deps.edn, leiningen, figwheel
The way Cider does it, if I have understood things correctly, is to inject what it needs on the command line it uses to start the server.
Then you’re back at square one where Calva has to start the nrepl server with extra-deps, ie calva-jack-in
@pez yes, but cider has two modes: cider-connect, which is what Calva has today, and which is what I’m trying to augment so that Calva can connect without having lein installed. cider-jack-in is the other mode, where cider also starts the nrepl server, and injects the appropriate middle wares.
I think Calva should come configured with some tasks to start lein, boot, clj and shadow servers.
You have solved the Calva connect case for clj, @slipset. 😃 I am pushing it one step further. Call me greedy.