This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-16
Channels
- # announcements (33)
- # asami (37)
- # autochrome-github (1)
- # aws (5)
- # babashka (26)
- # babashka-sci-dev (18)
- # beginners (63)
- # biff (1)
- # calva (66)
- # cider (15)
- # clj-kondo (24)
- # cljs-dev (2)
- # cljsrn (14)
- # clojure (62)
- # clojure-doc (1)
- # clojure-europe (15)
- # clojure-nl (11)
- # clojure-spec (12)
- # clojure-uk (4)
- # clojurescript (45)
- # community-development (2)
- # cursive (34)
- # datahike (7)
- # datomic (7)
- # events (1)
- # figwheel-main (5)
- # fulcro (19)
- # gratitude (7)
- # holy-lambda (85)
- # hyperfiddle (4)
- # jobs (7)
- # jobs-discuss (25)
- # kaocha (4)
- # lsp (11)
- # off-topic (1)
- # polylith (20)
- # portal (14)
- # practicalli (6)
- # proletarian (5)
- # rdf (52)
- # re-frame (13)
- # reagent (48)
- # releases (1)
- # remote-jobs (3)
- # shadow-cljs (7)
- # tools-deps (17)
Hi, I have a weird problem.
I've been testing clojure-cli and I'm trying various different tooling. Currently, I'm testing portal
and I've set up a simple test project for that.
My personal deps.edn
contains an alias:
:portal {:extra-deps {djblue/portal {:mvn/version "0.21.0"}}}
I've added to the projects .dir-locals.edn
the following config:
((clojure-mode . ((cider-preferred-build-tool . clojure-cli)
(cider-clojure-cli-aliases . "portal"))))
When I run cider-jack-in-clj
the command that is executed is the following;
/opt/homebrew/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.1.0"} cider/cider-nrepl {:mvn/version "0.27.4"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:portal:cider/nrepl
That will open a REPL buffer, but the classpath won't contain the portal dependencies and things like (require 'portal.api)
will fail with FileNotFoundException
.
However, if I start the nREPL server from command line with the exact same command as above and just connect to it with cider-connect
, everything works just fine.
Can someone shed some light on what is happening and how to debug this further?What exact CIDER version are you using? Could it have to do with https://github.com/clojure-emacs/cider/pull/3127/files ? cc @U05254DQM
Might be. Cider version is 1.2.0
. The default that comes from doom-emacs
.
Maybe, I should look into upgrading...
Wondering if I should start creating PRs against doom or spacemacs whenever we cut releases, not sure of how those distros work
Humm, actually, now cider stopped injecting refactor-nrepl altogether.
Let's see what else I need to upgrade 😄
Yeah, now everything works. Upgrading helped there also. @U45T93RA6 yeah, doom-emacs pins to specific versions of packages to achieve some stableness in the package ecosystem and reproducibility to the configs. I think that's a good thing in general, but in some cases a bit more speed in the upgrades might be needed. Luckily, one can just opt out of the pinning case-by-case and speed things up. But in general, I guess doom welcomes PR's for upgrading packages - especially for critical upgrades and bugfixes. The clojure relevant package management is here: https://github.com/hlissner/doom-emacs/blob/master/modules/lang/clojure/packages.el
thanks! Is refactor-nrepl being injected now? Without upgrading clj-refactor.el I don't expect it to work, see https://github.com/clojure-emacs/clj-refactor.el/blob/master/CHANGELOG.md#333
Yeah, thanks for help! Everything is working now. I decided to unpin everything in the clojure module to keep everything in sync since basically most of the stuff there is a dependency to cider.

FYI @U45T93RA6 - Spacemacs uses packages from https://melpa.org/ by default, so no need for a PR on the Spacemacs repository to update Cider. It only requires the user to run a package update, which checks for new versions. So the user can upgrade when required
@UFG0HRDC7 all aliases are keywords, so :portal
should be used in the .dir-locals.el
file, rather than portal.
I believe Cider will still work if only using the name and not the keywords, but technically (and for clarity) the keyword should be used.
@U05254DQM thanks, I actually changed it to that after upgrading and checking the newest documentation. With older cider it didn't work.