Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Wrong type argument: arrayp, nil' on cider-jack-in #1819

Closed
noisegul opened this issue Aug 4, 2016 · 11 comments
Closed

'Wrong type argument: arrayp, nil' on cider-jack-in #1819

noisegul opened this issue Aug 4, 2016 · 11 comments

Comments

@noisegul
Copy link

noisegul commented Aug 4, 2016

Expected behavior

Starting a REPL with cider-jack-in

Actual behavior & Steps to reproduce the problem

When trying to use cider-jack-in while editing a single *.clj file that is not part of a project, this error occurs. Starting a nREPL server separately and connecting to it works as expected. Starting a REPL with cider-jack-in inside a project created with boot-new works fine as well.

Environment & Version information

CIDER version information

;; CIDER 0.14.0snapshot (package: 20160727.904), nREPL 0.2.12
;; Clojure 1.8.0, Java 1.8.0_92

Boot version

BOOT_VERSION=2.6.0

Emacs version

GNU Emacs 25.0.94.2

Operating system

Windows 10

@noisegul noisegul changed the title 'Wrong type argument: arrayp, nil 'Wrong type argument: arrayp, nil on cider-jack-in Aug 4, 2016
@noisegul noisegul changed the title 'Wrong type argument: arrayp, nil on cider-jack-in 'Wrong type argument: arrayp, nil' on cider-jack-in Aug 4, 2016
@Malabarba
Copy link
Member

You're not the first to run into this. It seems to be a regression in Emacs 25. I guess someone needs to report it. :-)

@bbatsov
Copy link
Member

bbatsov commented Aug 5, 2016

//cc @NicolasPetton

@NicolasPetton
Copy link
Contributor

@bbatsov do you know where the bug comes from? A stacktrace would be perfect.

@bbatsov
Copy link
Member

bbatsov commented Aug 6, 2016

@bitrauser can you post here the backtrace as well?

@hackeryarn
Copy link

hackeryarn commented Aug 6, 2016

I am having the same issue but while working in a cljs project and a different emacs version. Happens with both cider-jack-in and cider-jack-in-clojurescript.

Debug trace

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string("[^-0-9a-zA-Z_./\n]" "\\\\\\&" nil)
  shell-quote-argument(nil)
  cider--lein-resolve-command()
  cider-jack-in-resolve-command("lein")
  cider-jack-in(nil)
  call-interactively(cider-jack-in record nil)
  command-execute(cider-jack-in record)
  #[257 "\304\305!\203\f�\306\307�!!\210��\307�!\211��\310\307�!\311\")\207" [current-prefix-arg prefix-arg this-command real-this-command featurep smex smex-rank intern command-execute record] 4 "\n\n(fn CMD)"]("cider-jack-in")
  ivy-call()
  ivy-read("M-x " [emmet-filters esh-arg dired-view-file bibtex-autofill-entry viper-util x-sensitive-text-pointer-shape ox-man debugger-previous-window verilog-mode-indent org-export-org dired-faces web-mode-unfontify-region erc-log web-mode-interpolate-javascript-string misearch web-mode-file-extensions nnir web-mode-django-code-font-lock-keywords web-mode-element-wrap ediff-merg nnmail-files gnus-article-highlight cal-html ezimage-document-minus web-mode-block-is-opening-control erc-mode-line-and-header icomplete concat-str dired-find-subdir gnus-score-expire kill-grep epl-package--parse-info elt-clo erc-autoaway srecode/expandproto web-mode-tag-next-position custom-faces em-script web-mode-part-highlight tag-flags widget-radio-value-get doc-view-get-bounding-box ebrowse xscheme none-but-delete message-buffers speedbar-directory-face ps-print-printer ob-R alchemist-compile--file ...] :predicate commandp :require-match t :history extended-command-history :action #[257 "\304\305!\203\f�\306\307�!!\210��\307�!\211��\310\307�!\311\")\207" [current-prefix-arg prefix-arg this-command real-this-command featurep smex smex-rank intern command-execute record] 4 "\n\n(fn CMD)"] :sort t :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input "^" :caller counsel-M-x)
  counsel-M-x()
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)

Emacs version

GNU Emacs 24.5.1 (x86_64-apple-darwin15.0.0, NS apple-appkit-1404.13

@NicolasPetton
Copy link
Contributor

That's Emacs 25.4, so I guess the bug is in CIDER, not in Emacs 25.1 RC? shell-quote-argument is called with nil.

@hackeryarn
Copy link

To help with reproduction. I got the error initially while working on a reagent project. So I tried to generate a fresh reagent project which resulted in the same thing. Seems that thereagent and re-frame lein templates lead to this error. I also tried both with +cider and without and got the same results.

@bbatsov
Copy link
Member

bbatsov commented Aug 6, 2016

Hmm, seems lein is not on exec-path in those scenarios. Guess I didn't consider this.

@bbatsov bbatsov closed this as completed in ee63ad0 Aug 6, 2016
@hackeryarn
Copy link

@bbatsov would it need to be added to emacs exec-path manually? Because it's definitely in my system path.

@bbatsov
Copy link
Member

bbatsov commented Aug 6, 2016

Usually - yes. You can also use https://github.com/purcell/exec-path-from-shell

@Malabarba
Copy link
Member

@achernyak You need that the environment that Emacs is started in be the same as the environment where you set up your path. How to actully do that varies between system. exec-path-from-shell is one option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants