-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Unable to jack-in in some cases when cider-enrich-classpath
is t
#3581
Comments
I had never seen |
https://clojure.org/reference/deps_and_cli#_paths it's officially supported in |
Thanks! I'll check it around tomorrow. Feel free to verify if the problem goes away using the traditional syntax (Enrich certainly honors provided aliases) |
Yes, if replace aliases with normal strings, it fixes the first problem. But second problem with |
Problem 2 is not unique to Enrich, IME - it's very common in tools.deps projects to unintentionally run the tests. Over the years (when Enrich wasn't on the radar) I always suggested to split your deps.edn into :test and :test-runner. That way one can e.g. pick an alternative runner. In general, the best practice is to keep aliases fine-grained - more so than the average Lein project, for instance. Otherwise I'd be hesitant about 'fixing' this - Enrich supports custom |
Hm, but why I can successfully jack-in with |
Enrich supports a broader set of use cases e.g. running it from the terminal, where it's more common to specify a main program (e.g. for specifying a repl - there are a few possible choices). We may be able to hack something, but I think that nudging users into best practices also is a good idea. |
OK. I've been using {:test {:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"}}}
:test-runner {:main-opts ["-m" "cognitect.test-runner"]
:exec-fn cognitect.test-runner.api/test}} If I split it like this I won't be able to run Or should I duplicate all dependencies in both |
Thanks for the willingness! I'd suggest to
This has the advantages of:
Not really but probably it's easy enough to see how this is a design that favors composition - often valued in Clojure. |
The latest Enrich supports the paths-as-aliases feature. The issue related to Cheers - V |
Good enough for me :) Thank you! |
Steps to reproduce the problem
deps.edn
src/core.clj
(content is not relevant)test/core_test.clj
(content is not relevant)Expected behavior
I can successfully jack-in without
:test
alias or with:test
alasActual behavior
cider-jack-in
command), the REPL is running successfully, but my namespaces are not included to the classpath. The following command is generated byclojure.sh
(src
path is missing)::test
alias (either by modifyingcider-clojure-cli-aliases
to":test"
or by using prefix argument and edit start server command replacing-M:cider/nrepl
with-M:test:cider/nrepl
at the end) REPL won't start. Instead I see in the*Messages*
buffer the output of running tests:The following command is generated by
clojure.sh
(looks likecider/nrepl
alias is missing or wrongmain-opts
are picked up):Environment & Version information
CIDER version information
Lein / Clojure CLI version
Clojure CLI 1.11.1
Emacs version
GNU Emacs 29.1.90 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2023-10-23
Operating system
6.6.1-arch1-1 GNU/Linux
JDK distribution
The text was updated successfully, but these errors were encountered: