-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run lein repl
without explicit dependency on tools.nrepl
#27
Comments
And |
Currently this is expected, as I think we replace the whole Doing something better would be good, but I don't know how we can make it do the right thing for the current task. I'm don't think always merging the I'm not 100% sure yet, but I think if we were to do this we'd need to investigate replacing this line:
With something more subtle, I suspect we probably want to merge the I'm not currently clear enough on the actual execution order of middleware's and profile merging to be sure what to do yet. We should investigate. |
Yeah, perhaps if the |
For those encountering this ticket, to have the default behavior, you'd start with a {:deps {clojure-complete {:mvn/version "0.2.4" :exclusions [[org.clojure/clojure]]}
org.clojure/tools.nrepl {:mvn/version "0.2.12" :exclusions [[org.clojure/clojure]]}}} |
Yes, but I think if you want to do it properly (if that's even possible) we'd also need to ensure profiles for the running task are merged properly e.g. the Clearly we can't maintain profiles for each and every possible leiningen task, so I'd like to find a better way. It feels like the best thing is probably to ensure that we only replace Naturally this assumes that middlewares are applied before profiles are merged... I suspect that's true, but I haven't checked yet. |
Maybe, at least for determining dependencies, it'll be about mapping a lein profile to a list of tools.deps aliases? Have a look at Juxt's "Edge" project. This is a pure clj / tools.deps project that includes access to a REPL. The REPL is quite loaded with features with all the dependencies they have, but I've removed the extraneous stuff for clarity. a clojure -A:dev/nrepl a :aliases
{:dev/nrepl {:jvm-opts ["-Dedge.load_nrepl=true"]}
:extra-paths ["aliases/nrepl"]
:extra-deps
{org.clojure/tools.nrepl {:mvn/version "0.2.12"}}}} a (ns user
(:require
[clojure.tools.namespace.repl :refer :all]))
(when (System/getProperty "edge.load_nrepl")
(require 'nrepl)) and a (ns ^{:clojure.tools.namespace.repl/load false} nrepl
(:require
[clojure.tools.nrepl.server :as nrepl.server]))
(defn start-nrepl
[opts]
(let [server
(nrepl.server/start-server
:port (:port opts))]
(spit ".nrepl-port" (:port server))
server))
(def server (start-nrepl {:port 5600})) This works. What can go in a Thoughts? |
project.clj
:deps.edn:
{:deps {}}
Changing
deps.edn
to the following fixes it:The text was updated successfully, but these errors were encountered: