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

Include ns when requiring repl utils #2730

Merged
merged 1 commit into from
Oct 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## master (unreleased)

### Bugs fixed
* [#2730](https://github.com/clojure-emacs/cider/pull/2730) Require repl utilities into current namespace not just user ns

## 0.23.0 (2019-10-08)

### New features
Expand Down
2 changes: 1 addition & 1 deletion cider-repl.el
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ This cache is stored in the connection buffer.")
(require-code (cdr (assoc (cider-repl-type current-repl) cider-repl-require-repl-utils-code))))
(nrepl-send-sync-request
(lax-plist-put
(nrepl--eval-request require-code)
(nrepl--eval-request require-code (cider-current-ns))
"inhibit-cider-middleware" "true")
current-repl)))

Expand Down
6 changes: 4 additions & 2 deletions test/cider-repl-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ PROPERTY should be a symbol of either 'text, 'ansi-context or
(it "requires clj utils in a clj buffer"
(spy-on 'cider-repl-type :and-return-value 'clj)
(cider-repl-require-repl-utils)
(expect 'nrepl--eval-request :to-have-been-called-with (cdr (assoc 'clj cider-repl-require-repl-utils-code))))
(expect 'nrepl--eval-request :to-have-been-called-with
(cdr (assoc 'clj cider-repl-require-repl-utils-code)) "user"))
(it "requires cljs utils in a cljs buffer"
(spy-on 'cider-repl-type :and-return-value 'cljs)
(cider-repl-require-repl-utils)
(expect 'nrepl--eval-request :to-have-been-called-with (cdr (assoc 'cljs cider-repl-require-repl-utils-code)))))
(expect 'nrepl--eval-request :to-have-been-called-with
(cdr (assoc 'cljs cider-repl-require-repl-utils-code)) "user")))