This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-08
Channels
- # architecture (20)
- # beginners (140)
- # cider (155)
- # cljsjs (1)
- # cljsrn (29)
- # clojure (53)
- # clojure-dev (9)
- # clojure-italy (40)
- # clojure-nl (13)
- # clojure-poland (4)
- # clojure-russia (8)
- # clojure-uk (51)
- # clojurescript (74)
- # cursive (36)
- # data-science (1)
- # datomic (3)
- # emacs (14)
- # fulcro (11)
- # graphql (2)
- # java (21)
- # javascript (2)
- # jobs (3)
- # nrepl (7)
- # off-topic (18)
- # om-next (1)
- # onyx (9)
- # portkey (8)
- # re-frame (72)
- # reagent (64)
- # reitit (4)
- # remote-jobs (1)
- # rum (1)
- # schema (1)
- # shadow-cljs (49)
- # slack-help (1)
- # spacemacs (8)
- # specter (7)
- # tools-deps (27)
- # vim (28)
Whereabouts? I just removed the quote in cider-cljs-repl-types
but that made no difference
((nil . ((cider-lein-global-options . "with-profile dev")
(cider-default-cljs-repl . figwheel))))
@b2berry I see in your second example you haven’t defined anywhere a type named figwheel+harmonium
, that’s the fundamental problem.
You should change “Harmonium” to figwheel-harmonium
. Also - we’ve got a function called cider-register-cljs-repl-type
which you can also use in your init.el
or whatever.
emacs 25.2.2, I am also running the emacs command with a modified home to point to a separate directory structure for testing. Think that may be it. I just don't want to override my current emacs setup
Anyways, I’m happy that after I woke up I didn’t find a ton of issues reported here or on GitHub. Seems despite the final push and last minute issues the release shaped up nicely. 🙂
@dominicm seen your comment over the weekend. Does that mean you rejig how the vars are listed in cider /orchard?
@benedek I think your work will potentially become a lot easier. I created a function in orchard for listing vars generically.
@benedek Nope, it's data driven, which I think is better. The idea is that it should be an interface you can send over nrepl. What predicates did you have?
If it has a certain meta for example... i should probably check out your code before asking ;)
@benedekyou can filter by having certain metadata keys, same as how tests can be filtered now 🙂
@benedek it's hacked together from usages elsewhere, certainly scope for more tweaks. I'm keen to avoid functions being passed for filtering, as it restricts nrepl clients a little. The idea is that they would send this data structure directly, with some coercion in the middle.
Filtering for failed tests which needs extra info (the value in the test result atom)
I am just proposing an other hack then. But have not tried to code the failed tests bit yet
But it could be used for this, my goal of the interface is really that apropos should be able to list failed tests.
It might be that the test wrapper moves into orchard, then this function can have a flag for filtering to those vars
Yeah, the test wrapper should move to orchard as well. There’s still a lot of code that has to be moved there (and improved in the process I guess).
It would also be nice if we agreed on some common conventions for the nREPL middleware APIs, so there are no editor quirks leaking there.
I just realised that CIDER will happily jack-in to a simple deps.edn project. So convenient! Thank you @bozhidar and team!
https://github.com/clojure-emacs/cider-nrepl/issues/529#issuecomment-387345915 are others encountering this?
I’m way too busy at work currently, so I’ve got next to no time for testing/debugging myself.
Unless the namespace isn't being sent, I don't know what could be wrong. I might have to try the dark side or something.
Yeah sorry so the default is not to load them unless you explicitly change the config to do so
Hi all, I just updated my work machine to 0.17.0. I’m running a project with shadow-cljs. I seem to recall that when I ran cider connect on my personal machine (running stable
) cider was able to figure out the host, port, and app I was running. Did I imagine that? Is that included in 0.17.0, or only stable
?
As for the ports - this works just for lein repls, not sure if we can extend it to shadow as well. Basically we’re just running ps
and parsing its output.
If some process has the info we need we can extend this functionality, if it doesn’t - we’re out of luck. I recall boot does not have it.
If you do what you’d suggest you’d see just one running process, inspecting ps shows you all the servers running on localhost.
that makes sense.
Except my current project is shadow-cljs only.
But the same idea should work.
I’m having no luck getting cljs-repl to startup, still. My .dir-locals
is
(nil
(cider-default-cljs-repl . harmonium)
(cider-cljs-repl-types
('harmonium "(do (require 'figwheel-sidecar.repl-api)\n (figwheel-sidecar.repl-api/start-figwheel! \"login\" \"imageviewer\" \"harmonium\")\n (figwheel-sidecar.repl-api/cljs-repl))")))
which seems totally right. I’m running in spacemacs. I’m running 0.17.0 for cider. I’ve tried the nuclear option by blowing away all my maven repo’s, reinstalling /.emacs.d
, trying a brand-new .spacemacs
.If I eval inside a running emacs instance (cider-register-cljs-repl-type 'harmonium "do (<see string above>...)")
and then cider-jackin-clojurescript
it allows me to choose this repl type and it’s good-to-go.
Completely strangely though everyone on my project team has no issues even though they’ve upgrade to 0.17.0 (and some haven’t) I’m sort of baffled at this point, certainly seems isolated to my environment but I don’t really know where else to go from here. Any thoughts?
Oh, helps if I post the error I’m getting: error in process filter: cider-cljs-repl-form: Symbol's function definition is void: nil
(defvar cider-cljs-repl-types
'((nashorn "(cider.piggieback/cljs-repl (cljs.repl.nashorn/repl-env))"
cider-check-nashorn-requirements)
(figwheel "(do (require 'figwheel-sidecar.repl-api) (figwheel-sidecar.repl-api/start-figwheel!) (figwheel-sidecar.repl-api/cljs-repl))"
cider-check-figwheel-requirements)
(node "(do (require 'cljs.repl.node) (cider.piggieback/cljs-repl (cljs.repl.node/repl-env)))"
cider-check-node-requirements)
(weasel "(do (require 'weasel.repl.websocket) (cider.piggieback/cljs-repl (weasel.repl.websocket/repl-env :ip \"127.0.0.1\" :port 9001)))"
cider-check-weasel-requirements)
(boot "(do (require 'adzerk.boot-cljs-repl) (adzerk.boot-cljs-repl/start-repl))"
cider-check-boot-requirements)
(shadow cider-shadow-cljs-init-form cider-check-shadow-cljs-requirements)
(custom cider-custom-cljs-repl-init-form nil)))
So in .dir-locals
((nil
((cider-default-cljs-repl . harmonium)
(cider-cljs-repl-types
('harmonium "(do (require 'figwheel-sidecar.repl-api)\n (figwheel-sidecar.repl-api/start-figwheel! \"login\" \"imageviewer\" \"harmonium\")\n (figwheel-sidecar.repl-api/cljs-repl))")))))
Is legit?Like so?
((nil
(cider-default-cljs-repl . harmonium)
(cider-cljs-repl-types
(('harmonium "(do (require 'figwheel-sidecar.repl-api)\n (figwheel-sidecar.repl-api/start-figwheel! \"login\" \"imageviewer\" \"harmonium\")\n (figwheel-sidecar.repl-api/cljs-repl))")))))
I think in the last twelve hours working on this I’ve seen probably 8 variations on how this is handled
🙂 I’ve tried to learn from the previous similar questions first and try to think before begging for someone else to deal with my problems 😄
But yeah - the syntax is .dir-locals.el
is very confusing even for me. Often I have to google for this myself.
My team is having success running on a completely different set of syntax that has stopped working for me, doesn’t make sense
((nil
(cider-default-cljs-repl . harmonium)
(cider-cljs-repl-types
'((harmonium "(do (require 'figwheel-sidecar.repl-api)\n (figwheel-sidecar.repl-api/start-figwheel! \"login\" \"imageviewer\" \"harmonium\")\n (figwheel-sidecar.repl-api/cljs-repl))")))))
Just rendered
error in process filter: cider-cljs-repl-form: Symbol's function definition is void: nil
after the nil, yeah? I’ve attempted that in previous variations of this, I’ll try that here
`(cider-cljs-repl-types . ’((harmonium “(do (require ’figwheel-sidecar.repl-api)\n (figwheel-sidecar.repl-api/start-figwheel! \“login\” \“imageviewer\” \“harmonium\“)\n (figwheel-sidecar.repl-api/cljs-repl))“)`
(cider-cljs-repl-types .
((harmonium "(do (require 'figwheel-sidecar.repl-api)\n (figwheel-sidecar.repl-api/start-figwheel! \"login\" \"imageviewer\" \"harmonium\")\n (figwheel-sidecar.repl-api/cljs-repl))")
You can also use eval
to just register a new type before setting it - e.g. like shown here https://emacs.stackexchange.com/questions/21955/calling-functions-in-dir-locals-in-emacs
Winner!
((nil
(cider-default-cljs-repl . harmonium)
(cider-cljs-repl-types .
((harmonium "(do (require 'figwheel-sidecar.repl-api)\n (figwheel-sidecar.repl-api/start-figwheel! \"login\" \"imageviewer\" \"harmonium\")\n (figwheel-sidecar.repl-api/cljs-repl))")))))


CIDER together with aggressive-indent-mode
seems to be insisting on vertical alignment of let forms and maps. While normally I’m a fan of this behavior, my team isn’t. I’m seeing that the relevant customs are defined to be off - am I missing something here?
Argh. It looks like this is a bug in clojure-mode - it smells like there’s a shared codepath which assumes that automatic alignment is always enabled.
It looks like clojure-align-region
is the only place that clojure-align-forms-automatically
is respected, so when you hit clojure-indent-function
eg via aggressive-indent-mode
it never does the form alignment check and just runs the same codepath.
File a ticket about this. I wonder why no one hasn’t noticed it in 3 years or something. 🙂
I reaaaally love aggressive-indent-mode
, but I had to ditch it because it was completely killing my emacs perf. I should try it again one of these days in case the situation has improved.
It doesn’t play well with big files in general, and it plays terribly with CIDER’s dynamic indentation.
I was using it in the past, but even for bigger Elisp files it was making everything unusable.
I am using it currently but I have to say not with cider and not on big files
Now the cljfmt
has been posted to Graal I am planning to use that
@eggsyntax I definitely see CIDER/Emacs lag on large clj files. Enforces some small ns discipline 😉
I’m not an emacs user, but I noticed that there is a CIDER-nREPL command format-code
which uses cljfmt
. Is that not commonly used?
@sashton aggressive-indent-mode
does the reindantation at every key stroke, that's the beauty of it
i’m curious why you mentioned trying graal-cljfmt, given there is a cider command for it. is there a disadvantage to the built-in command? with the jvm already running, I assume startup time isn’t an issue.
@sashton there is no command in cider directly, but I think somebody posted a hook trigger
on Twitter of something
Sorry, I meant there is a command for formatting with cljfmt which is packaged in cider-nrepl: cider-format-code
I don't think there is any if I remember correctly
this is the hook though: https://github.com/dzer6/cljfmt-graalvm