This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-23
Channels
- # bangalore-clj (5)
- # beginners (136)
- # boot (1)
- # bristol-clojurians (6)
- # cider (46)
- # cljs-dev (172)
- # cljsrn (35)
- # clojure (82)
- # clojure-china (2)
- # clojure-dev (9)
- # clojure-dusseldorf (1)
- # clojure-finland (15)
- # clojure-italy (54)
- # clojure-norway (4)
- # clojure-russia (6)
- # clojure-spec (19)
- # clojure-uk (61)
- # clojurebridge (1)
- # clojurescript (55)
- # community-development (23)
- # cursive (7)
- # datomic (19)
- # emacs (10)
- # events (4)
- # fulcro (108)
- # graphql (7)
- # hoplon (1)
- # leiningen (7)
- # lumo (14)
- # off-topic (68)
- # onyx (23)
- # parinfer (8)
- # portkey (40)
- # precept (11)
- # re-frame (5)
- # reagent (40)
- # ring-swagger (5)
- # shadow-cljs (58)
- # specter (5)
- # tools-deps (37)
- # unrepl (13)
- # vim (9)
- # yada (12)
@thheller Yeah, that’s a good idea as well. Regarding different ops vs same ops + some type param - it seems like more or less the same thing in the end of the day. I guess the different ops would have the slight advantage of making it easier to tell if some ops is supported on cljs, but at the cost of doubling the ops for each middleware.
See https://github.com/clojure-emacs/cider/commit/973e1041bd0a7f6e60dbda126e20d90b870bab05
Unfortunately it doesn’t quit work quite write - the server starts but it seems it’s not an nREPL server. I can’t connect with cider-connect
as well.
I’m reasonable certain that’s just a matter of invoking the right command, so I’ve pushed this for everyone’s consideration.
I’ll add the cljs repl code when we get this running. On a related note - it’d be nice if someone can provide me with a “real” project I can play with. I just created a blank project with lein and used shadow-cljs init
on it, as I wasn’t quite sure what to do, and don’t have time to peruse the nice manual.
@bozhidar What's the state of play with CIDER and deps.edn
these days? I'm just coming back to Emacs/CIDER after a couple of years away ... I set up Prelude again today and did cider-jack-in
somewhere that didn't have a project.clj
or build.boot
and saw it trying to use clj -Sdeps ...
I think?
(I was a bit surprised it didn't walk up the file system tree to a parent folder that did contain build.boot
)
@bozhidar do you talk to the server
process via stdin/stdout? server
is just a standalone process you can't interact it besides CTRL+C o D. it starts a nREPL server and writes its port to .shadow-cljs/nrepl.port
(similar to .nrepl-port
). its a random port similar to lein .nrepl-port
.
I made this example for a user yesterday https://github.com/thheller/shadow-react-avatar-editor. README contains the usual commands
> (I was a bit surprised it didn’t walk up the file system tree to a parent folder that did contain build.boot
)
@seancorfield Outside of a project CIDER now defaults to using tools.deps instead of lein
, as it did in the past. But the algorithm for resolving projects hasn’t changed and CIDER will start looking from the current folder up until it finds some project marker file.
Ah, of course, we maintain all our dependencies in external EDN files called -- you guessed -- deps.edn
that predates the new tooling.
@thheller No, I can’t connect to the server for some reason, that’s why I started wondering whether this is an nREPL server or a socket server.
And I had not gotten to changing the code that looks for the port file, as normally it’s in another place.
Might be nice to still print the nrepl port in the boot message, as I’d assume some people would not know 2 servers are starting and they have to check for the other port in a file.
well it currently only prints the http port because that will some day contain a UI of sorts
but how do you pick the correct one? where is the detection code for this? should it be printed in a specific format?
(when (string-match "nREPL server started on port \\([0-9]+\\)" output)
(let ((port (string-to-number (match-string 1 output))))
(message "nREPL server started on %s" port)
(with-current-buffer server-buffer
(let* ((client-proc (nrepl-start-client-process nil port process))
(client-buffer (process-buffer client-proc)))
(setq nrepl-client-buffers
(cons client-buffer
(delete client-buffer nrepl-client-buffers)))
(when (functionp nrepl-post-client-callback)
(funcall nrepl-post-client-callback client-buffer))))))
In the past lein
wasn’t writing anything to a file and this seemed like a good way to figure out server has finished it’s initialization. That’s basically the big problem - how do you know you can finally connect to the server.
We also use the port files, but only to provide connection candidates for cider-connect
.
@bozhidar I'm using your init.el
. how do I directly use a git checkout of cider? its currently using elpa/cider-20180318.833
I think
If you really want to use a local git checkout you’ll need to remove the installed package and add to init.el something like the following code:
; load CIDER from its source code
(add-to-list 'load-path "~/projects/cider")
(require 'cider)
Ah, of course, we maintain all our dependencies in external EDN files called -- you guessed -- deps.edn
that predates the new tooling.
anyone having trouble with company + cider recently? autocomplete is broken for me with snapshot CIDER and stable CIDER, and I’m inclined to blame one of the many recent commits to company-mode itself
File an issue against CIDER. Be sure to fill in the details: https://github.com/clojure-emacs/cider/issues/new
@bozhidar Should this say "clause" instead of "cause"? https://github.com/clojure-emacs/cider/blob/0ca04ebceeabda645dd9bc584b4683fe3b2ea317/cider-util.el#L647 > The only thing worse than a rebel without a cause is a REPL without a cause.