This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-27
Channels
- # admin-announcements (1)
- # beginners (1)
- # boot (37)
- # cbus (1)
- # cider (44)
- # cljs-dev (16)
- # cljsjs (2)
- # cljsrn (18)
- # clojure (205)
- # clojure-belgium (6)
- # clojure-china (1)
- # clojure-india (1)
- # clojure-russia (24)
- # clojure-spec (21)
- # clojure-turkiye (1)
- # clojure-uk (72)
- # clojurescript (91)
- # core-async (4)
- # cursive (12)
- # data-science (2)
- # datascript (2)
- # datomic (12)
- # emacs (6)
- # flambo (7)
- # funcool (12)
- # hoplon (24)
- # incanter (2)
- # jobs-discuss (29)
- # keechma (2)
- # lein-figwheel (2)
- # leiningen (2)
- # mount (13)
- # nyc (2)
- # om (76)
- # om-next (1)
- # onyx (38)
- # other-languages (4)
- # planck (40)
- # re-frame (33)
- # reagent (101)
- # ring-swagger (5)
- # slack-help (1)
- # untangled (7)
- # yada (14)
I'm using boot-cljs-repl https://github.com/adzerk-oss/boot-cljs-repl
basically I start cljs repl by typing (start-repl)
in a clj repl
the problem is when I try to evaluate a cljs buffer, it yells ... needs a cljs repl
I guess it's b/c the repl is detected as clj
and the (start-repl)
didn't change (of course it couldn't) the emacs buffer's info that it's become a cljs repl
how can I fix this?
@myguidingstar: there was an issue open some time ago and I discovered that I did not configure cider (or nrepl cannot remember) correctly
hmm, I think I followed the instructions
Oh I remember hardcoding .cljs files
will try that
many thanks
No problem ;)
hmm, I used to do that, but no longer
so that's not the problem
> and the (start-repl)
didn't change (of course it couldn't) the emacs buffer's info that it's become a cljs repl
Actually, if you have the cider midddleware properly set up, it should detect the repl type automatically.
@myguidingstar: how do you start your repl?
Any known issues with cider 20160524.714? I just pulled new packages in Emacs and am now getting Wrong number of arguments: when-let, 1
That's when I do a cider-connect
.
I was just reading malabarba's blog and saw that when-let
is a macro in emacs 25.1 and which is in prerelease.
24.5.1
Backtrace:
Debugger entered--Lisp error: (wrong-number-of-arguments when-let 1)
signal(wrong-number-of-arguments (when-let 1))
#[(&rest body) "^H\203\f^@^H\211A^P@\202^S^@\304\305\306^HGD\"\211^YG\307U\203#^@ \211A^Q@\202*^@\304\305\306 GD\"^z @^[\310\n^KDC\311\n^HBBE+\207" [body --cl-rest-- var value signal wrong-number-of-arguments when-let 2 let when] 6 ("/home/pls/.emacs.d/elpa/scion-20130315.555/scion.elc" . 1787)](((port (and d (nrepl-extract-port (cider--file-path d))))) (list (file-name-nondirectory (directory-file-name d)) port))
(when-let ((port (and d (nrepl-extract-port (cider--file-path d))))) (list (file-name-nondirectory (directory-file-name d)) port))
(closure ((paths) (dir . "/home/pls/work/oboe/src/clj/oboe/") t) (d) (when-let ((port (and d (nrepl-extract-port (cider--file-path d))))) (list (file-name-nondirectory (directory-file-name d)) port)))("~/work/oboe/")
mapcar((closure ((paths) (dir . "/home/pls/work/oboe/src/clj/oboe/") t) (d) (when-let ((port (and d (nrepl-extract-port (cider--file-path d))))) (list (file-name-nondirectory (directory-file-name d)) port))) ("~/work/oboe/"))
(let* ((paths (cider--running-nrepl-paths)) (proj-ports (mapcar (lambda (d) (when-let ((port ...)) (list (file-name-nondirectory ...) port))) (cons (clojure-project-dir dir) paths)))) (seq-uniq (delq nil proj-ports)))
cider-locate-running-nrepl-ports("/home/pls/work/oboe/src/clj/oboe/")
(let* ((change-dir-p (file-remote-p default-directory)) (default-directory (if change-dir-p "~/" default-directory))) (cider-locate-running-nrepl-ports (if change-dir-p nil default-directory)))
(if localp (let* ((change-dir-p (file-remote-p default-directory)) (default-directory (if change-dir-p "~/" default-directory))) (cider-locate-running-nrepl-ports (if change-dir-p nil default-directory))) (let ((vec (vector "sshx" nil host "" nil)) (dir (if (file-remote-p default-directory) (progn (let* (... ... ... ... ... ...) (ignore cur-method cur-user cur-host cur-localname cur-hop) (if ... ...)))))) (tramp-maybe-open-connection vec) (save-current-buffer (set-buffer (tramp-get-connection-buffer vec)) (cider-locate-running-nrepl-ports dir))))
(let ((localp (or (nrepl-local-host-p host) (not (assoc-string host ssh-hosts))))) (if localp (let* ((change-dir-p (file-remote-p default-directory)) (default-directory (if change-dir-p "~/" default-directory))) (cider-locate-running-nrepl-ports (if change-dir-p nil default-directory))) (let ((vec (vector "sshx" nil host "" nil)) (dir (if (file-remote-p default-directory) (progn (let* ... ... ...))))) (tramp-maybe-open-connection vec) (save-current-buffer (set-buffer (tramp-get-connection-buffer vec)) (cider-locate-running-nrepl-ports dir)))))
cider--infer-ports("localhost" (("core") ("zuul") ("xl2") ("xl1") ("xz2") ("xz1")))
(cider--completing-read-port host (cider--infer-ports host ssh-hosts))
(or (cadr sel-host) (cider--completing-read-port host (cider--infer-ports host ssh-hosts)))
(let* ((ssh-hosts (cider--ssh-hosts)) (hosts (seq-uniq (append (if cider-host-history (progn (list ...))) (list (list (cider-current-host))) cider-known-endpoints ssh-hosts (if (file-remote-p default-directory) (progn (quote ...)))))) (sel-host (cider--completing-read-host hosts)) (host (car sel-host)) (port (or (cadr sel-host) (cider--completing-read-port host (cider--infer-ports host ssh-hosts))))) (list host port))
cider-select-endpoint()
call-interactively(cider-connect nil nil)
command-execute(cider-connect)
Failure comes after hitting enter at the host prompt.
i looked at the scion package, and it looks like both scion and cider define a when-let
Ah, I was just noticing that was an odd duck to see in this trace.
Well, I'm not doing much Haskell at the moment. I'll trying disabling it.
i think it can only take a single binding whereas the traditional when-let can take a seq of them and only invoke its clause when all are bound
Yep, that did it.
Thanks.
@malabarba: nice articles on upcoming features. read it this morning and already put the knowledge to use
no. you can use M-x toggle-debug-no-error
and you can get an elisp stack trace that shows the path to that error, but I haven’t gotten the chance to look into it yet
@adamfrey: I did that. It seems to be related with company mode, in particular the company-capf backend. Do you remember when the problem started? What version of cider started to display this behavior?