This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-14
Channels
- # beginners (183)
- # boot (6)
- # cider (106)
- # cljs-dev (17)
- # cljsjs (2)
- # cljsrn (2)
- # clojure (56)
- # clojure-italy (14)
- # clojure-nl (39)
- # clojure-spec (49)
- # clojure-uk (138)
- # clojurescript (197)
- # core-logic (37)
- # cursive (22)
- # datascript (5)
- # datomic (29)
- # devcards (18)
- # emacs (1)
- # events (8)
- # figwheel (1)
- # fulcro (59)
- # lein-figwheel (1)
- # leiningen (1)
- # off-topic (54)
- # onyx (3)
- # pedestal (1)
- # portkey (4)
- # re-frame (18)
- # reagent (5)
- # reitit (43)
- # ring (6)
- # ring-swagger (26)
- # shadow-cljs (42)
- # spacemacs (8)
- # specter (12)
- # sql (3)
- # tools-deps (21)
- # vim (18)
How do I force downloading the correct version of cider in emacs/spacemacs
I'mgetting an issue with 0.18 and the nrepl
I can connect but it pretty much stops after it starts, so I can't eval or use the repl
should it be 0.17?
of cider that is
are you talking about cider or cider-nrepl? CIDER version is up to you: melpa stable is 0.17.0 and the melpa version is 0.18.0-SNAPSHOT
so I go to eval, and emacs highlights green, then red and says that I have to be connected to a clojurescript repl
the odd thing is that the repl operates, but tells me that there is a mismatch
WARNING: CIDER's version (0.18.0-snapshot) does not match cider-nrepl's version (0.17.0). Things will break!
More information.
WARNING: No Clojure project was detected. The
refactor-nrepl middleware was not enabled. (You can mute this
warning by customizing `cljr-suppress-no-project-warning'.)
the no project is an ongoing issue with trying to get it to connect with shadow-cljs
not sure if that's related to why I can't eval
hmm, let me try something
reading through the nrepl docs, I think i'm missing SNAPSHOT
of cider-nrepl
yeah i see that from your output. do you explicitly say which cider-nrepl version to use?
I changed it
WARNING: CIDER's version (0.18.0-snapshot) does not match cider-nrepl's version (0.17.0-snapshot). Things will break!
the reference to cider-nrepl to use snapshot
also, CIDER now injects cider/piggieback and i bet that might be mucking with some stuff as well
now it's complaining about nil
WARNING: CIDER's version (0.18.0-snapshot) does not match cider-nrepl's version (nil). Things will break!
More information.
I think I did something, I don't remember this happening when I first fiddled with shadow-cljs
I think updating cider was the first thing I did before this started happening
from melpa or melpa-stable
melpa-stable are the releases, melpa are the dev versions. although the non-snapshots might be on melpa as well. but melpa-stable are the intended releases
it's kind of a pity that the base name "melpa" are the dev versions and you have to go out of your way to get the stable releases on "melpa-stable"
let me try 0.17 stable
0.17 is seen by emacs as obsolete, it won't let me revert
spacemacs, sorry
ahhh, so I just removed cider layer, restarted to have them cleared out, restarted and added cider layer, now it works perfectly
finds the port by itself and project association
That really needs to be at the top of my debugging
elisp can be fickle. i named a variable comment-start
in my own let binding and it would kill my emacs font locking and error out
the obvious difference was that I'm using spacemacs, and it has it's own config I have no control of
because that's a global var that's not supposed to be an integer apparently. go figure
wild. I'm trying to tackle elisp myself and I hit walls very often
the whole ecosystem is a massive state machine, have to know where the buttons and levers are buried under buttons and levers
@jsa-aerial I think this was done in 0.17. It’s configurable.
I am facing a single logical project, but divided into clj and cljs codebases, each with its own project.clj I'm more used to a single project.clj. Is the former scenario something CIDER can handle well? i.e. multiple connections, each with its own middleware running I presume Otherwise should I fire up two Emacs instances instead? Recommendations welcome
so projectile uses the git root as the project so they will appear as one to that (which is probably good). but i believe in dispatching to repls CIDER looks for a base project.clj which means they will appropriately appear as two, wihch you probably want here
and does CIDER work fine with two disparate projects? e.g. I don't want autocompletions from one project being offered for the other one
although if you are on 0.18.0-snapshot there's about to be a major overhaul of connections so you'll be kind of a canary on that front.
btw, how to install a fixed version? Last time I researched that didn't seem possible My code is like this
(dolist (package '(cider company queue fiplr clojure-mode clj-refactor
dash simpleclip helm-ag git-timemachine paren-face))
(unless (package-installed-p package)
(package-refresh-contents)
(package-install package)))
if you run into problems with things from one project being eval-ed in the other let me know. i've got a patch that makes that better that gets rid of the "last repl used" heuristic which i find is often not what i want
what can be the reason of a bunch of
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see clojure.tools.middleware/set-descriptor!
...
?oh it seems the namespaces for nrepl
have not been changed in https://github.com/nrepl/piggieback
is there a reason why not or just folks did not get to it yet? should I do it?
@richiardiandrea I haven’t had time to add a lein task to spin nREPL for CIDER. Without this there’s no way to start a new nREPL server, as lein doesn’t support it yet. Same issue with boot.
@bozhidar I was wondering because I changed the namespaces in shadow but I started to have all the warnings, it seems the until cider/piggieback
changes this https://github.com/nrepl/piggieback/blob/master/src/cider/piggieback.clj#L5
it cannot work with nrepl
0.4.1
ah yeah ok
sorry I re-read your message
Yeah, once the boot and lein tasks are added to cider-nrepl
we’ll just update our defcustoms and all the middlewares.
If you can just wrap your work on the boot task and do the very same task for lein that’d be appreciated!
about the boot task, do you think that's all we need? I feel we would break a lot of stuff if we do not replicate the original boot task (the server one, which has a lot of options)
uhm ok
If the tasks take more params that’d certainly be better, but I don’t view this is something that’s must have right now.
If you decide to do something very flexible I won’t stop you, but right now I’ll just take anything that actually gets us to a running REPL. 🙂
ok so if that's the case i will make sure it works than remove the WIP from that PR
How would I go about adding an alias to the cider-jack-in
command if using tools.deps? Does it happen to auto-add :dev
or :repl
or anything I can hook into?
@cjsauer this is what I have in my dir-locals.el
...
(cider-preferred-build-tool . "clojure-cli")
(cider-clojure-cli-global-options . "-A:cljs-jvm:dev:unit-test")
@richiardiandrea hm...can't seem to get that working. Is the file .dir-locals.el
, with the leading dot? I admittedly haven't used local variables in emacs before 😅
yeah it is with a dot and you need revert-buffer
to load them
@richiardiandrea with this as .dir-locals.el
I keep getting Wrong type argument: listp
...
(cider-preferred-build-tool . "clojure-cli")
(cider-clojure-cli-global-options . "-A:dev")
:thinking_face:I found I can just write a shell script with this in it:
clj -A:dev:test -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.17.0-SNAPSHOT"} refactor-nrepl {:mvn/version "2.4.0-SNAPSHOT"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware"])'
Aha:
clj -A:dev:test -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.17.0-SNAPSHOT"} refactor-nrepl {:mvn/version "2.4.0-SNAPSHOT"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware" "refactor-nrepl.middleware/wrap-refactor"])'
@cjsauer sorry yeah you can do that but also use .dir-locals.el
, the format is not exactly the one I sent you because I have extracted only the salient parts 😉
but cider inject its own deps so you can avoid lauching terminal scripts by using the above defcustom
s
@richiardiandrea ah ok. I'm not familiar at all with .el
files, I come from the land of Vim haha
Would the syntax be:
(defcustom
(cider-preferred-build-tool . "clojure-cli"))
Something like this?@cjsauer sorry a bit busy now but you can google emacs .dir-locals.el
or if you use projectile you can delete the file and use C-c p E
Thanks for the help @richiardiandrea, appreciate it 🍻
Is there a way to use the cljs browser repl via cljs.main
?
Do I need to manually setup a cider-nrepl
repl then start the browser cljs repl?
@ghopper my PR should be in. figwheel-main
is the type
Cool, thanks