From e4678c413a88b6686342020d312d47a2e88611e9 Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 1 Aug 2023 14:39:14 +0200 Subject: [PATCH 1/2] `cider-connect-clj&cljs`: don't render `"ClojureScript REPL type:" for JVM repls Fixes https://github.com/clojure-emacs/cider/issues/3383 --- CHANGELOG.md | 1 + cider.el | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09bc6b291..d5f9de9c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - [#3355](https://github.com/clojure-emacs/cider/pull/3355): Fix `cider-mode` disabling itself after a disconnect when `cider-auto-mode` is set to nil. - [#3362](https://github.com/clojure-emacs/cider/issues/3362): Fix `sesman-restart` regression issue. - [#3236](https://github.com/clojure-emacs/cider/issues/3236): `cider-repl-set-ns` no longer changes the repl session type from `cljs:shadow` to `clj`. +- [#3383](https://github.com/clojure-emacs/cider/issues/3383): `cider-connect-clj&cljs`: don't render `"ClojureScript REPL type:" for JVM repls. ### Changes diff --git a/cider.el b/cider.el index 40150b33f..dbe9d84d5 100644 --- a/cider.el +++ b/cider.el @@ -1448,10 +1448,13 @@ non-nil, don't start if ClojureScript requirements are not met." (cider--update-host-port) (cider--check-existing-session) (cider--update-cljs-type))) - (clj-repl (cider-connect-clj params))) - (if soft-cljs-start - (when (cider--check-cljs (plist-get params :cljs-repl-type) 'no-error) - (cider-connect-sibling-cljs params clj-repl)) + (clj-params (thread-first + params + copy-sequence + (map-delete :cljs-repl-type))) + (clj-repl (cider-connect-clj clj-params))) + (when (or (not soft-cljs-start) + (cider--check-cljs (plist-get params :cljs-repl-type) 'no-error)) (cider-connect-sibling-cljs params clj-repl)))) (defvar cider-connection-init-commands From 74616840b161ebc6d59a67e8f4e2b8a41484d7fc Mon Sep 17 00:00:00 2001 From: vemv Date: Wed, 2 Aug 2023 14:24:08 +0200 Subject: [PATCH 2/2] PR feedback --- cider.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cider.el b/cider.el index dbe9d84d5..8372381cb 100644 --- a/cider.el +++ b/cider.el @@ -1453,8 +1453,9 @@ non-nil, don't start if ClojureScript requirements are not met." copy-sequence (map-delete :cljs-repl-type))) (clj-repl (cider-connect-clj clj-params))) - (when (or (not soft-cljs-start) - (cider--check-cljs (plist-get params :cljs-repl-type) 'no-error)) + (when (if soft-cljs-start + (cider--check-cljs (plist-get params :cljs-repl-type) 'no-error) + t) (cider-connect-sibling-cljs params clj-repl)))) (defvar cider-connection-init-commands