From e54808c74944196f20cb1ee56f60f9198838655d Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 7 Nov 2023 18:18:35 +0100 Subject: [PATCH 001/212] Use cider-nrepl 0.43.1 https://github.com/clojure-emacs/cider-nrepl/blob/v0.43.1/CHANGELOG.md#0431-2023-11-07 --- CHANGELOG.md | 4 +- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 38 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 398819653..71fd66ca9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,10 @@ - [#3495](https://github.com/clojure-emacs/cider/issues/3495): possibly display error overlays on [`cider-load-buffer`](https://docs.cider.mx/cider/usage/code_evaluation.html#basic-evaluation). - `cider-popup-buffer-display`: honor `special-display-buffer-names` if customized for a given CIDER buffer name (e.g. `*cider-inspect*`), avoiding the double-rendering of the given buffer. - [#3572](https://github.com/clojure-emacs/cider/issues/3572): `lein.sh`: honor `XDG_CACHE_HOME`. -- Bump the injected `cider-nrepl` to [0.43.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.43.0/CHANGELOG.md#0430-2023-11-04). +- Bump the injected `cider-nrepl` to [0.43.1](https://github.com/clojure-emacs/cider-nrepl/blob/v0.43.1/CHANGELOG.md#0431-2023-11-07). - Improves performance for exception handling and other use cases. + - Fixes [`cider-inspector-refresh`](https://docs.cider.mx/cider/debugging/inspector.html#usage) + - Offers better completions related to `:as-alias` under ClojureScript. ## 1.10.0 (2023-10-31) diff --git a/cider.el b/cider.el index 95cae1168..091eb2941 100644 --- a/cider.el +++ b/cider.el @@ -527,7 +527,7 @@ the artifact.") (defconst cider-latest-clojure-version "1.10.1" "Latest supported version of Clojure.") -(defconst cider-required-middleware-version "0.43.0" +(defconst cider-required-middleware-version "0.43.1" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index 6fcfa8b79..d5005d312 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.43.0"]]) + :plugins [[cider/cider-nrepl "0.43.1"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index 5bf54d5bf..19260943f 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.43.0"] + :plugins [[cider/cider-nrepl "0.43.1"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index b614c70a2..aadbab9a8 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.43.0"]] +:plugins [[cider/cider-nrepl "0.43.1"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.43.0"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.43.1"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.43.0"]]) + concat '[[cider/cider-nrepl "0.43.1"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.43.0"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.43.1"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.43.0"} + cider/cider-nrepl {:mvn/version "0.43.1"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.43.0' + devImplementation 'cider:cider-nrepl:0.43.1' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 31a27d857..fb7bca885 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -67,7 +67,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.43.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.43.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -303,7 +303,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.43.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.43.1"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index c60948dd4..a5acf6953 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.43.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.43.1"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index 18957758b..498ea6bf8 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.43.0' + devImplementation 'cider:cider-nrepl:0.43.1' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index a24cb47ee..9076c11f1 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.43.0") + (setq-local cider-injected-middleware-version "0.43.1") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -154,7 +154,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -167,7 +167,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -179,7 +179,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -192,7 +192,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.0") + (shell-quote-argument "cider/cider-nrepl:0.43.1") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -201,7 +201,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.1") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -218,7 +218,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -231,7 +231,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.0") + (shell-quote-argument "cider/cider-nrepl:0.43.1") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -253,7 +253,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -264,7 +264,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.0") + (shell-quote-argument "cider/cider-nrepl:0.43.1") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -272,7 +272,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.1") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -287,14 +287,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.43.0")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.43.1")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.43.0"))) + :to-equal '(("cider/cider-nrepl" "0.43.1"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -323,7 +323,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.43.0") + ("cider/cider-nrepl" "0.43.1") ("mx.cider/lein-enrich-classpath" "1.18.2"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -334,7 +334,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -352,7 +352,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.0") + (shell-quote-argument "cider/cider-nrepl:0.43.1") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -447,7 +447,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.1\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -461,7 +461,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.1\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -478,7 +478,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -488,7 +488,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -516,7 +516,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.1\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 75946066a6fa5ba15bc44dc21c41b54399974bad Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 7 Nov 2023 18:20:00 +0100 Subject: [PATCH 002/212] `defconst cider-codename "Hvar"` --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index 091eb2941..69ef9519a 100644 --- a/cider.el +++ b/cider.el @@ -96,7 +96,7 @@ (defconst cider-version "1.11.0-snapshot" "The current version of CIDER.") -(defconst cider-codename "Sant Cugat" +(defconst cider-codename "Hvar" "Codename used to denote stable releases.") (defcustom cider-lein-command From 6e5294624959736c486f7a466bd5e78ce6183ab9 Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 7 Nov 2023 19:19:40 +0100 Subject: [PATCH 003/212] 1.11.0 --- CHANGELOG.md | 2 ++ cider.el | 6 +++--- doc/antora.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71fd66ca9..72f2d9a2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master (unreleased) +## 1.11.0 (2023-11-07) + ### New features - [#3565](https://github.com/clojure-emacs/cider/issues/3565): [`*cider-error*`](https://docs.cider.mx/cider/usage/dealing_with_errors.html#inspector-integration): open a given Exception in the [Inspector](https://docs.cider.mx/cider/debugging/inspector.html) by clicking it, or hitting p. diff --git a/cider.el b/cider.el index 69ef9519a..9f123a587 100644 --- a/cider.el +++ b/cider.el @@ -10,8 +10,8 @@ ;; Hugo Duncan ;; Steve Purcell ;; Maintainer: Bozhidar Batsov -;; URL: http://www.github.com/clojure-emacs/cider -;; Version: 1.11.0-snapshot +;; URL: https://www.github.com/clojure-emacs/cider +;; Version: 1.11.0 ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.0") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.11.0-snapshot" +(defconst cider-version "1.11.0" "The current version of CIDER.") (defconst cider-codename "Hvar" diff --git a/doc/antora.yml b/doc/antora.yml index fd9dacd59..d485ebf30 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: ~ +version: 1.11 nav: - modules/ROOT/nav.adoc From cbf815ed91109181b31f148d7ccca8fb1e5199fa Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 7 Nov 2023 20:14:12 +0100 Subject: [PATCH 004/212] 1.12.0-snapshot --- cider.el | 4 ++-- doc/antora.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cider.el b/cider.el index 9f123a587..6e6e984f8 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.11.0 +;; Version: 1.12.0-snapshot ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.0") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.11.0" +(defconst cider-version "1.12.0-snapshot" "The current version of CIDER.") (defconst cider-codename "Hvar" diff --git a/doc/antora.yml b/doc/antora.yml index d485ebf30..fd9dacd59 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: 1.11 +version: ~ nav: - modules/ROOT/nav.adoc From bf9dceca17e912605e2d8327c44ed241e2a556e2 Mon Sep 17 00:00:00 2001 From: vemv Date: Wed, 8 Nov 2023 21:23:30 +0100 Subject: [PATCH 005/212] Use enrich-classpath 1.18.4 --- CHANGELOG.md | 4 ++++ cider.el | 2 +- clojure.sh | 2 +- doc/modules/ROOT/pages/config/basic_config.adoc | 2 +- test/cider-tests.el | 14 +++++++------- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72f2d9a2a..b10aa867f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Changes + +- Bump the injected `enrich-classpath` to [1.18.4](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.2...v1.18.4). + ## 1.11.0 (2023-11-07) ### New features diff --git a/cider.el b/cider.el index 6e6e984f8..782881890 100644 --- a/cider.el +++ b/cider.el @@ -598,7 +598,7 @@ returned by this function does not include keyword arguments." (let ((plugins (if cider-enrich-classpath (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version) - ("mx.cider/lein-enrich-classpath" "1.18.2"))) + ("mx.cider/lein-enrich-classpath" "1.18.4"))) (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version)))))) (thread-last diff --git a/clojure.sh b/clojure.sh index db85d93fb..c3c7f6a78 100755 --- a/clojure.sh +++ b/clojure.sh @@ -37,7 +37,7 @@ else cd "$there" # enrich-classpath will emit a command starting by "clojure", or print a stacktrace: - output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.2"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") + output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.4"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") cmd=$(tail -n1 <(echo "$output")) cd "$here" diff --git a/doc/modules/ROOT/pages/config/basic_config.adoc b/doc/modules/ROOT/pages/config/basic_config.adoc index 08c9abedc..90b4584b4 100644 --- a/doc/modules/ROOT/pages/config/basic_config.adoc +++ b/doc/modules/ROOT/pages/config/basic_config.adoc @@ -44,7 +44,7 @@ With it enabled, `cider-jack-in` will activate enrich-classpath, given the follo * You are on macOS/Linux * You are launching a vanilla JVM repl (and not a cljs repl, or a clj+cljs repl) * You are using `cider-jack-in` / `cider-jack-in-clj` (and not `cider-connect`) - ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.18.2#emacs-cider-connect[own instructions]. + ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.18.4#emacs-cider-connect[own instructions]. ...these conditions will be progressively relaxed. diff --git a/test/cider-tests.el b/test/cider-tests.el index 9076c11f1..8b972eee0 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -156,7 +156,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -169,7 +169,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -181,7 +181,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -220,7 +220,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -255,7 +255,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) (it "can concat in a boot project" @@ -324,7 +324,7 @@ (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.43.1") - ("mx.cider/lein-enrich-classpath" "1.18.2"))) + ("mx.cider/lein-enrich-classpath" "1.18.4"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) (it "uses them in a lein project" @@ -336,7 +336,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless")))) From dc7e9e4911c076db497066953bda9ee0098c2090 Mon Sep 17 00:00:00 2001 From: vemv Date: Sat, 11 Nov 2023 23:10:45 +0100 Subject: [PATCH 006/212] Use cider-nrepl 0.43.3 (#3578) https://github.com/clojure-emacs/cider-nrepl/blob/v0.43.3/CHANGELOG.md#0433-2023-11-11 https://clojars.org/cider/cider-nrepl/versions/0.43.3 --- CHANGELOG.md | 1 + cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 36 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b10aa867f..6172bdc1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changes +- Bump the injected `cider-nrepl` to [0.43.3](https://github.com/clojure-emacs/cider-nrepl/blob/v0.43.3/CHANGELOG.md#0433-2023-11-11). - Bump the injected `enrich-classpath` to [1.18.4](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.2...v1.18.4). ## 1.11.0 (2023-11-07) diff --git a/cider.el b/cider.el index 782881890..fd6ff3464 100644 --- a/cider.el +++ b/cider.el @@ -527,7 +527,7 @@ the artifact.") (defconst cider-latest-clojure-version "1.10.1" "Latest supported version of Clojure.") -(defconst cider-required-middleware-version "0.43.1" +(defconst cider-required-middleware-version "0.43.3" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index d5005d312..965179e41 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.43.1"]]) + :plugins [[cider/cider-nrepl "0.43.3"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index 19260943f..b370d4b9c 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.43.1"] + :plugins [[cider/cider-nrepl "0.43.3"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index aadbab9a8..e78467fc0 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.43.1"]] +:plugins [[cider/cider-nrepl "0.43.3"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.43.1"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.43.3"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.43.1"]]) + concat '[[cider/cider-nrepl "0.43.3"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.43.1"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.43.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.43.1"} + cider/cider-nrepl {:mvn/version "0.43.3"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.43.1' + devImplementation 'cider:cider-nrepl:0.43.3' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index fb7bca885..c40ad46c2 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -67,7 +67,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.43.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.43.3"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -303,7 +303,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.43.1"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.43.3"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index a5acf6953..56a17afb4 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.43.1"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.43.3"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index 498ea6bf8..32d1e349d 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.43.1' + devImplementation 'cider:cider-nrepl:0.43.3' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index 8b972eee0..21d336471 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.43.1") + (setq-local cider-injected-middleware-version "0.43.3") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -154,7 +154,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -167,7 +167,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -179,7 +179,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -192,7 +192,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.1") + (shell-quote-argument "cider/cider-nrepl:0.43.3") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -201,7 +201,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.1") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.3") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -218,7 +218,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -231,7 +231,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.1") + (shell-quote-argument "cider/cider-nrepl:0.43.3") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -253,7 +253,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -264,7 +264,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.1") + (shell-quote-argument "cider/cider-nrepl:0.43.3") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -272,7 +272,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.1") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.3") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -287,14 +287,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.43.1")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.43.3")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.43.1"))) + :to-equal '(("cider/cider-nrepl" "0.43.3"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -323,7 +323,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.43.1") + ("cider/cider-nrepl" "0.43.3") ("mx.cider/lein-enrich-classpath" "1.18.4"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -334,7 +334,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -352,7 +352,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.1") + (shell-quote-argument "cider/cider-nrepl:0.43.3") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -447,7 +447,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.1\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.3\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -461,7 +461,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.1\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.3\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -478,7 +478,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -488,7 +488,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -516,7 +516,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.1\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.3\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 9c605cd4938c0055c2766c55606f19ecbf664e8e Mon Sep 17 00:00:00 2001 From: vemv Date: Sat, 11 Nov 2023 23:13:56 +0100 Subject: [PATCH 007/212] 1.11.1 --- CHANGELOG.md | 4 ++++ cider.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6172bdc1b..654b3f0b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,14 @@ ## master (unreleased) +## 1.11.1 (2023-11-11) + ### Changes - Bump the injected `cider-nrepl` to [0.43.3](https://github.com/clojure-emacs/cider-nrepl/blob/v0.43.3/CHANGELOG.md#0433-2023-11-11). + - Improves performance for error-handling functionality. - Bump the injected `enrich-classpath` to [1.18.4](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.2...v1.18.4). + - Handles a Clojure CLI edge case. ## 1.11.0 (2023-11-07) diff --git a/cider.el b/cider.el index fd6ff3464..424a11933 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.12.0-snapshot +;; Version: 1.11.1 ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.0") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.12.0-snapshot" +(defconst cider-version "1.11.1" "The current version of CIDER.") (defconst cider-codename "Hvar" From bf8abf942c59e9ee6ac7421af754358e2d5ae4db Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 12 Nov 2023 06:00:07 +0100 Subject: [PATCH 008/212] 1.12.0-snapshot --- cider.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cider.el b/cider.el index 424a11933..cc234dcc0 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.11.1 +;; Version: 1.12.0-snapshot ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.0") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,10 +93,10 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.11.1" +(defconst cider-version "1.12.0-snapshot" "The current version of CIDER.") -(defconst cider-codename "Hvar" +(defconst cider-codename "Split" "Codename used to denote stable releases.") (defcustom cider-lein-command From a35170bfbfec3eee80163ac5e10c0cad882b6291 Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 12 Nov 2023 06:18:51 +0100 Subject: [PATCH 009/212] Inspector: display Java class/method/field block tags when available Closes https://github.com/clojure-emacs/cider/issues/3576 --- CHANGELOG.md | 4 ++++ cider-inspector.el | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 654b3f0b7..028d41e9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Changes + +- [#3576](https://github.com/clojure-emacs/cider/issues/3576): CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): display Java class/method/field block tags (Returns/Throws/Params info) when available. + ## 1.11.1 (2023-11-11) ### Changes diff --git a/cider-inspector.el b/cider-inspector.el index de1791c54..a040d934f 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -528,6 +528,8 @@ instead of just its \"value\" entry." dict-or-value)) (fragments (when v2 (nrepl-dict-get dict-or-value "doc-fragments"))) + (block-tags (when v2 + (nrepl-dict-get dict-or-value "doc-block-tags-fragments"))) (font-size (when-let* ((b (get-buffer cider-inspector-buffer)) (variable 'text-scale-mode-amount) (continue (local-variable-p variable b))) @@ -536,7 +538,7 @@ instead of just its \"value\" entry." ;; Enabling cider-inspector-mode is the specific step that loses the font size. (buffer-local-value variable b)))) (cider-make-popup-buffer cider-inspector-buffer 'cider-inspector-mode 'ancillary) - (cider-inspector-render cider-inspector-buffer value font-size fragments)) + (cider-inspector-render cider-inspector-buffer value font-size fragments block-tags)) (cider-popup-buffer-display cider-inspector-buffer cider-inspector-auto-select-buffer) (when cider-inspector-fill-frame (delete-other-windows)) (ignore-errors (cider-inspector-next-inspectable-object 1)) @@ -555,7 +557,7 @@ instead of just its \"value\" entry." (when cider-inspector-page-location-stack (goto-char (pop cider-inspector-page-location-stack)))))) -(defun cider-inspector-render (buffer str &optional font-size fragments) +(defun cider-inspector-render (buffer str &optional font-size fragments block-tags) "Render STR in BUFFER." (with-current-buffer buffer (cider-inspector-mode) @@ -564,20 +566,22 @@ instead of just its \"value\" entry." (let ((inhibit-read-only t)) (condition-case nil (cider-inspector-render* (car (read-from-string str)) - fragments) + fragments + block-tags) (error (insert "\nInspector error for: " str)))) (goto-char (point-min)))) (defvar cider-inspector-looking-at-java-p nil) -(defun cider-inspector-render* (elements &optional fragments) +(defun cider-inspector-render* (elements &optional fragments block-tags) "Render ELEMENTS, and FRAGMENTS if present." (setq cider-inspector-looking-at-java-p nil) (dolist (el elements) (cider-inspector-render-el* el)) (when fragments (insert "\n\n") - (insert (cider--render-docstring (list "doc-fragments" fragments))))) + (insert (cider--render-docstring (list "doc-fragments" fragments + "doc-block-tags-fragments" block-tags))))) (defconst cider--inspector-java-headers ;; NOTE "--- Static fields:" "--- Instance fields:" are for objects, From 1b97fe3155d2e22eb057b4269b42c3f6e4750a4e Mon Sep 17 00:00:00 2001 From: vemv Date: Mon, 13 Nov 2023 19:45:03 +0100 Subject: [PATCH 010/212] Inspector: retain `truncate-lines` values across screens (#3579) --- CHANGELOG.md | 1 + cider-inspector.el | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 028d41e9d..770301bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changes - [#3576](https://github.com/clojure-emacs/cider/issues/3576): CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): display Java class/method/field block tags (Returns/Throws/Params info) when available. +- CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): retain [`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html) values across screens. ## 1.11.1 (2023-11-11) diff --git a/cider-inspector.el b/cider-inspector.el index a040d934f..066c37aae 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -536,9 +536,19 @@ instead of just its \"value\" entry." ;; The font size is lost between inspector 'screens', ;; because on each re-rendering, we wipe everything, including the mode. ;; Enabling cider-inspector-mode is the specific step that loses the font size. - (buffer-local-value variable b)))) + (buffer-local-value variable b))) + (truncate-lines-defined (when-let* ((b (get-buffer cider-inspector-buffer))) + (local-variable-p 'truncate-lines b))) + (truncate-lines-p (when-let* ((b (get-buffer cider-inspector-buffer)) + (continue truncate-lines-defined)) + (buffer-local-value 'truncate-lines b)))) (cider-make-popup-buffer cider-inspector-buffer 'cider-inspector-mode 'ancillary) - (cider-inspector-render cider-inspector-buffer value font-size fragments block-tags)) + (cider-inspector-render cider-inspector-buffer value + :font-size font-size + :truncate-lines-defined truncate-lines-defined + :truncate-lines-p truncate-lines-p + :fragments fragments + :block-tags block-tags)) (cider-popup-buffer-display cider-inspector-buffer cider-inspector-auto-select-buffer) (when cider-inspector-fill-frame (delete-other-windows)) (ignore-errors (cider-inspector-next-inspectable-object 1)) @@ -557,12 +567,14 @@ instead of just its \"value\" entry." (when cider-inspector-page-location-stack (goto-char (pop cider-inspector-page-location-stack)))))) -(defun cider-inspector-render (buffer str &optional font-size fragments block-tags) +(cl-defun cider-inspector-render (buffer str &key font-size truncate-lines-defined truncate-lines-p fragments block-tags) "Render STR in BUFFER." (with-current-buffer buffer (cider-inspector-mode) (when font-size (text-scale-set font-size)) + (when truncate-lines-defined + (setq-local truncate-lines truncate-lines-p)) (let ((inhibit-read-only t)) (condition-case nil (cider-inspector-render* (car (read-from-string str)) @@ -574,7 +586,7 @@ instead of just its \"value\" entry." (defvar cider-inspector-looking-at-java-p nil) (defun cider-inspector-render* (elements &optional fragments block-tags) - "Render ELEMENTS, and FRAGMENTS if present." + "Render ELEMENTS, and FRAGMENTS, BLOCK-TAGS if present." (setq cider-inspector-looking-at-java-p nil) (dolist (el elements) (cider-inspector-render-el* el)) From 017ecc8b53d8ecac15487ee9d381cf8578eb30c3 Mon Sep 17 00:00:00 2001 From: vemv Date: Mon, 13 Nov 2023 22:07:43 +0100 Subject: [PATCH 011/212] `cider-test`: make test vars in test results reports clickable (#3583) Fixes https://github.com/clojure-emacs/cider/issues/3580 --- CHANGELOG.md | 2 ++ cider-test.el | 9 ++++++++- .../ROOT/pages/testing/test_reports.adoc | 17 +++++++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 770301bf0..56c851fec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - [#3576](https://github.com/clojure-emacs/cider/issues/3576): CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): display Java class/method/field block tags (Returns/Throws/Params info) when available. - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): retain [`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html) values across screens. +- [#3580](https://github.com/clojure-emacs/cider/issues/3580): `cider-test`: make test vars in [test results reports](https://docs.cider.mx/cider/testing/test_reports.html) clickable. + - As defined in the newly introduced `cider-test-var-keymap` var. ## 1.11.1 (2023-11-11) diff --git a/cider-test.el b/cider-test.el index d4e75e9b1..b5df76d35 100644 --- a/cider-test.el +++ b/cider-test.el @@ -407,6 +407,11 @@ With the actual value, the outermost '(not ...)' s-expression is removed." (and (string-match-p "\\\\n" input-string) t))) +(defvar cider-test-var-keymap + (let ((map (make-sparse-keymap))) + (define-key map [mouse-1] #'cider-test-jump) + map)) + (defun cider-test-render-assertion (buffer test) "Emit into BUFFER report detail for the TEST assertion." (with-current-buffer buffer @@ -428,7 +433,9 @@ With the actual value, the outermost '(not ...)' s-expression is removed." (type-face (cider-test-type-simple-face type)) (bg `(:background ,cider-test-items-background-color :extend t))) (cider-insert (capitalize type) type-face nil " in ") - (cider-insert var 'font-lock-function-name-face t) + (cider-propertize-region `(keymap ,cider-test-var-keymap) + (cider-insert (propertize var 'mouse-face 'highlight) + 'font-lock-function-name-face t)) (when context (cider-insert context 'font-lock-doc-face t)) (when message (cider-insert message 'font-lock-string-face t)) (when expected diff --git a/doc/modules/ROOT/pages/testing/test_reports.adoc b/doc/modules/ROOT/pages/testing/test_reports.adoc index 9199ddf79..1af8d8d94 100644 --- a/doc/modules/ROOT/pages/testing/test_reports.adoc +++ b/doc/modules/ROOT/pages/testing/test_reports.adoc @@ -11,38 +11,51 @@ Calling test commands again will update the test report. TIP: You can also xref:testing/running_tests.adoc#display-test-report-on-success[configure test reports to be displayed on success]. |=== -| Keyboard shortcut | Description +| Keyboard shortcut | Command name | Description | kbd:[g] +| `cider-test-run-test` | Run test at point. | kbd:[n] +| `cider-test-run-ns-tests` | Run tests for current namespace. | kbd:[s] +| `cider-test-run-ns-tests-with-filters` | Run tests for current namespace with selector filter. | kbd:[l] +| `cider-test-run-loaded-tests` | Run tests for all loaded namespaces. | kbd:[p] +| `cider-test-run-project-tests` | Run tests for all project namespaces. This loads the additional namespaces. | kbd:[f] +| `cider-test-rerun-failed-tests` | Re-run test failures/errors. | kbd:[M-p] +| `cider-test-previous-result` | Move point to previous test. | kbd:[M-n] +| `cider-test-next-result` | Move point to next test. -| kbd:[t] or kbd:[M-.] +| kbd:[t] or kbd:[M-.] or kbd:click +| `cider-test-jump` | Jump to test definition. | kbd:[d] +| `cider-test-ediff` | Display diff of actual vs expected. | kbd:[e] +| `cider-test-stacktrace` | Display test error cause and stacktrace info. |=== + +Most key bindings are defined in `cider-test-report-mode-map`, while the `click` behavior is defined in `cider-test-var-keymap`. From 57d1dc19ffbe11e5fc2d9c58f90107e051c43ded Mon Sep 17 00:00:00 2001 From: vemv Date: Mon, 13 Nov 2023 22:55:50 +0100 Subject: [PATCH 012/212] Bump the injected `enrich-classpath` to 1.18.5 (#3584) Closes https://github.com/clojure-emacs/cider/issues/3581 https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.4...v1.18.5 --- CHANGELOG.md | 2 ++ cider.el | 2 +- clojure.sh | 2 +- doc/modules/ROOT/pages/config/basic_config.adoc | 2 +- test/cider-tests.el | 14 +++++++------- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56c851fec..ecb2b0936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): retain [`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html) values across screens. - [#3580](https://github.com/clojure-emacs/cider/issues/3580): `cider-test`: make test vars in [test results reports](https://docs.cider.mx/cider/testing/test_reports.html) clickable. - As defined in the newly introduced `cider-test-var-keymap` var. +- [#3581](https://github.com/clojure-emacs/cider/issues/3581): Bump the injected `enrich-classpath` to [1.18.5](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.4...v1.18.5). + - Handles Clojure CLI `:paths` directly defined as `:aliases`. ## 1.11.1 (2023-11-11) diff --git a/cider.el b/cider.el index cc234dcc0..6d81697ac 100644 --- a/cider.el +++ b/cider.el @@ -598,7 +598,7 @@ returned by this function does not include keyword arguments." (let ((plugins (if cider-enrich-classpath (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version) - ("mx.cider/lein-enrich-classpath" "1.18.4"))) + ("mx.cider/lein-enrich-classpath" "1.18.5"))) (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version)))))) (thread-last diff --git a/clojure.sh b/clojure.sh index c3c7f6a78..fe79af264 100755 --- a/clojure.sh +++ b/clojure.sh @@ -37,7 +37,7 @@ else cd "$there" # enrich-classpath will emit a command starting by "clojure", or print a stacktrace: - output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.4"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") + output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.5"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") cmd=$(tail -n1 <(echo "$output")) cd "$here" diff --git a/doc/modules/ROOT/pages/config/basic_config.adoc b/doc/modules/ROOT/pages/config/basic_config.adoc index 90b4584b4..eeae0ba3d 100644 --- a/doc/modules/ROOT/pages/config/basic_config.adoc +++ b/doc/modules/ROOT/pages/config/basic_config.adoc @@ -44,7 +44,7 @@ With it enabled, `cider-jack-in` will activate enrich-classpath, given the follo * You are on macOS/Linux * You are launching a vanilla JVM repl (and not a cljs repl, or a clj+cljs repl) * You are using `cider-jack-in` / `cider-jack-in-clj` (and not `cider-connect`) - ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.18.4#emacs-cider-connect[own instructions]. + ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.18.5#emacs-cider-connect[own instructions]. ...these conditions will be progressively relaxed. diff --git a/test/cider-tests.el b/test/cider-tests.el index 21d336471..8bb8ba008 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -156,7 +156,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -169,7 +169,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -181,7 +181,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -220,7 +220,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -255,7 +255,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) (it "can concat in a boot project" @@ -324,7 +324,7 @@ (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.43.3") - ("mx.cider/lein-enrich-classpath" "1.18.4"))) + ("mx.cider/lein-enrich-classpath" "1.18.5"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) (it "uses them in a lein project" @@ -336,7 +336,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.4\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless")))) From 5261886ad7c0a8828d022812c7c1c6b503ddd6ba Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 14 Nov 2023 12:39:47 +0100 Subject: [PATCH 013/212] Handle `cider-clojure-compilation-error-phases` values that have been customized to `t` Fixes https://github.com/clojure-emacs/cider/issues/3582 --- CHANGELOG.md | 1 + cider-eval.el | 33 +++++++++++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecb2b0936..c90c3c783 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): retain [`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html) values across screens. - [#3580](https://github.com/clojure-emacs/cider/issues/3580): `cider-test`: make test vars in [test results reports](https://docs.cider.mx/cider/testing/test_reports.html) clickable. - As defined in the newly introduced `cider-test-var-keymap` var. +- [#3582](https://github.com/clojure-emacs/cider/issues/3582): Handle `cider-clojure-compilation-error-phases` values that have been customized to `t`. - [#3581](https://github.com/clojure-emacs/cider/issues/3581): Bump the injected `enrich-classpath` to [1.18.5](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.4...v1.18.5). - Handles Clojure CLI `:paths` directly defined as `:aliases`. diff --git a/cider-eval.el b/cider-eval.el index fc99c5ab4..618889530 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -486,15 +486,18 @@ op/situation that originated this error." (let ((error-buffer (cider-new-error-buffer #'cider-stacktrace-mode error-types))) (cider-stacktrace-render error-buffer (reverse causes) error-types)))) -(defcustom cider-clojure-compilation-error-phases '("read-source" - "macro-syntax-check" - "macroexpansion" - "compile-syntax-check" - "compilation" - ;; "execution" is certainly not to be included here. - ;; "read-eval-result" and "print-eval-result" are not to be included here, - ;; because they mean that the code has been successfully executed. - ) +(defconst cider-clojure-compilation-error-phases-default-value + '("read-source" + "macro-syntax-check" + "macroexpansion" + "compile-syntax-check" + "compilation" + ;; "execution" is certainly not to be included here. + ;; "read-eval-result" and "print-eval-result" are not to be included here, + ;; because they mean that the code has been successfully executed. + )) + +(defcustom cider-clojure-compilation-error-phases cider-clojure-compilation-error-phases-default-value "Error phases which will not cause the `*cider-error*' buffer to pop up. The default value results in no stacktrace being shown for compile-time errors. @@ -511,6 +514,12 @@ https://clojure.org/reference/repl_and_main#_at_repl" :group 'cider :package-version '(cider . "0.18.0")) +(defun cider-clojure-compilation-error-phases () + "Get the normalized value of the `cider-clojure-compilation-error-phases' var." + (if (equal t cider-clojure-compilation-error-phases) + cider-clojure-compilation-error-phases-default-value + cider-clojure-compilation-error-phases)) + (defun cider--handle-stacktrace-response (response causes ex-phase) "Handle stacktrace RESPONSE, aggregate the result into CAUSES, honor EX-PHASE. If RESPONSE contains a cause, cons it onto CAUSES and return that. If @@ -521,7 +530,7 @@ into a new error buffer." (nrepl-notify msg type)) (class (cons response causes)) (status - (unless (member ex-phase cider-clojure-compilation-error-phases) + (unless (member ex-phase (cider-clojure-compilation-error-phases)) (cider--render-stacktrace-causes causes)))))) (defun cider-default-err-op-handler () @@ -832,7 +841,7 @@ REPL buffer. This is controlled via (defun cider--error-phase-of-last-exception (buffer) "Returns the :phase of the latest exception associated to BUFFER, if any." - (when cider-clojure-compilation-error-phases + (when (cider-clojure-compilation-error-phases) (when-let ((conn (with-current-buffer buffer (cider-current-repl)))) (when (cider-nrepl-op-supported-p "analyze-last-stacktrace" conn) @@ -872,7 +881,7 @@ depending on the PHASE." (not (cider-connection-has-capability-p 'jvm-compilation-errors)) ;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate: (and cider-show-error-buffer - (member phase cider-clojure-compilation-error-phases))) + (member phase (cider-clojure-compilation-error-phases)))) ;; Display errors as temporary overlays (let ((cider-result-use-clojure-font-lock nil) (trimmed-err (funcall cider-inline-error-message-function err))) From e5e745b5c265db3cbf83298f0e550c29825662d9 Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 21 Nov 2023 05:27:30 +0100 Subject: [PATCH 014/212] Inspector: introduce `o`, `:` keybindings (#3586) --- CHANGELOG.md | 2 ++ cider-common.el | 8 +++++--- cider-inspector.el | 20 +++++++++++++++++++ .../ROOT/pages/debugging/inspector.adoc | 8 ++++++++ 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c90c3c783..89bc0a6d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ ### Changes - [#3576](https://github.com/clojure-emacs/cider/issues/3576): CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): display Java class/method/field block tags (Returns/Throws/Params info) when available. +- CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html#usage): introduce `o` keybinding which performs `cider-inspector-open-thing-at-point`. +- CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html#usage): introduce `:` keybinding which performs `cider-inspect-expr-from-inspector`. - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): retain [`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html) values across screens. - [#3580](https://github.com/clojure-emacs/cider/issues/3580): `cider-test`: make test vars in [test results reports](https://docs.cider.mx/cider/testing/test_reports.html) clickable. - As defined in the newly introduced `cider-test-var-keymap` var. diff --git a/cider-common.el b/cider-common.el index e1cb51763..85a13d49c 100644 --- a/cider-common.el +++ b/cider-common.el @@ -84,12 +84,13 @@ INVERT inverts the semantics of the function `cider--should-prompt-for-symbol'." (declare-function cider-complete-at-point "cider-completion") (declare-function cider-eldoc "cider-eldoc") -(defun cider-read-from-minibuffer (prompt &optional value) +(defun cider-read-from-minibuffer (prompt &optional value skip-colon) "Read a string from the minibuffer, prompting with PROMPT. If VALUE is non-nil, it is inserted into the minibuffer as initial-input. -PROMPT need not end with \": \". If it doesn't, VALUE is displayed on the +PROMPT need not end with \": \". If it doesn't, VALUE is displayed on the prompt as a default value (used if the user doesn't type anything) and is -not used as initial input (input is left empty)." +not used as initial input (input is left empty). +If SKIP-COLON is non-nil, no \": \" is forced at the end of the prompt." (minibuffer-with-setup-hook (lambda () (set-syntax-table clojure-mode-syntax-table) @@ -100,6 +101,7 @@ not used as initial input (input is left empty)." (let* ((has-colon (string-match ": \\'" prompt)) (input (read-from-minibuffer (cond (has-colon prompt) + (skip-colon prompt) (value (format "%s (default %s): " prompt value)) (t (format "%s: " prompt))) (when has-colon value) ; initial-input diff --git a/cider-inspector.el b/cider-inspector.el index 066c37aae..fc6177f6c 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -89,6 +89,14 @@ by clicking or navigating to them by other means." "\\|[+-.0-9]+") ; nor numbers. Note: BigInts, ratios etc. are interesting "Regexp of uninteresting and skippable values.") +(defun cider-inspector-open-thing-at-point () + "Opens the thing at point if found, without prompting." + (interactive) + (if-let ((url (thing-at-point 'url))) + (browse-url url) + (if-let ((filename (thing-at-point 'filename))) + (find-file filename)))) + (defvar cider-inspector-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map cider-popup-buffer-mode-map) @@ -96,6 +104,7 @@ by clicking or navigating to them by other means." (define-key map [mouse-1] #'cider-inspector-operate-on-click) (define-key map "l" #'cider-inspector-pop) (define-key map "g" #'cider-inspector-refresh) + (define-key map "o" #'cider-inspector-open-thing-at-point) ;; Page-up/down (define-key map [next] #'cider-inspector-next-page) (define-key map [prior] #'cider-inspector-prev-page) @@ -112,6 +121,7 @@ by clicking or navigating to them by other means." (define-key map "n" #'cider-inspector-next-inspectable-object) (define-key map [(shift tab)] #'cider-inspector-previous-inspectable-object) (define-key map "p" #'cider-inspector-previous-inspectable-object) + (define-key map ":" #'cider-inspect-expr-from-inspector) (define-key map "f" #'forward-char) (define-key map "b" #'backward-char) (define-key map "9" #'cider-inspector-previous-sibling) @@ -217,6 +227,16 @@ current buffer's namespace." (when (nrepl-dict-get result "value") (cider-inspector--render-value result 'v2)))) +(defun cider-inspect-expr-from-inspector () + "Performs `cider-inspect-expr' in a way that is suitable from the Inspector itself. +In particular, it does not read `cider-sexp-at-point'." + (interactive) + (let* ((ns (cider-current-ns)) + (prompt (format "Inspect expression in %s" + (substring-no-properties (funcall cider-repl-prompt-function ns))))) + (cider-inspect-expr (cider-read-from-minibuffer prompt nil 'skip-colon) + ns))) + (defun cider-inspector-pop () "Pop the last value off the inspector stack and render it. See `cider-sync-request:inspect-pop' and `cider-inspector--render-value'." diff --git a/doc/modules/ROOT/pages/debugging/inspector.adoc b/doc/modules/ROOT/pages/debugging/inspector.adoc index 863bc6221..6592bb8e0 100644 --- a/doc/modules/ROOT/pages/debugging/inspector.adoc +++ b/doc/modules/ROOT/pages/debugging/inspector.adoc @@ -84,6 +84,14 @@ You'll have access to additional keybindings in the inspector buffer | `cider-inspector-next-sibling` | Navigates to the next sibling, within a sequential collection. +| kbd:[o] +| `cider-inspector-open-thing-at-point` +| Opens the url or file at point, if found. + +| kbd:[:] +| `cider-inspect-expr-from-inspector` +| Prompts for a new value, rendering it in the Inspector. + | kbd:[t] | `cider-inspector-tap-current-val` | Performs `tap>` using the inspector's current value as it argument. From 3822bff655d53aa2c658643f73aa55034a18a67a Mon Sep 17 00:00:00 2001 From: vemv Date: Fri, 24 Nov 2023 09:04:55 +0100 Subject: [PATCH 015/212] Use clojure-mode 5.18.1 --- CHANGELOG.md | 1 + cider.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89bc0a6d9..31f9f275d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - [#3582](https://github.com/clojure-emacs/cider/issues/3582): Handle `cider-clojure-compilation-error-phases` values that have been customized to `t`. - [#3581](https://github.com/clojure-emacs/cider/issues/3581): Bump the injected `enrich-classpath` to [1.18.5](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.4...v1.18.5). - Handles Clojure CLI `:paths` directly defined as `:aliases`. +- Bump the `clojure-mode` required version to [5.18.1](https://github.com/clojure-emacs/clojure-mode/blob/v5.18.1/CHANGELOG.md#5181-2023-11-24). ## 1.11.1 (2023-11-11) diff --git a/cider.el b/cider.el index 6d81697ac..e497a6a4b 100644 --- a/cider.el +++ b/cider.el @@ -12,7 +12,7 @@ ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider ;; Version: 1.12.0-snapshot -;; Package-Requires: ((emacs "26") (clojure-mode "5.18.0") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) +;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider ;; This program is free software: you can redistribute it and/or modify From 025cfa54d20d76260af65df07f7310bce915229a Mon Sep 17 00:00:00 2001 From: vemv Date: Fri, 24 Nov 2023 09:10:04 +0100 Subject: [PATCH 016/212] Use cider-nrepl 0.44.0 --- CHANGELOG.md | 1 + cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 36 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f9f275d..afa0b7be7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - [#3581](https://github.com/clojure-emacs/cider/issues/3581): Bump the injected `enrich-classpath` to [1.18.5](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.4...v1.18.5). - Handles Clojure CLI `:paths` directly defined as `:aliases`. - Bump the `clojure-mode` required version to [5.18.1](https://github.com/clojure-emacs/clojure-mode/blob/v5.18.1/CHANGELOG.md#5181-2023-11-24). +- Bump the injected `cider-nrepl` to [0.44.0](https://github.com/clojure-emacs/cider-nrepl/blob/44da162f51765464192ba04102398c5982f01638/CHANGELOG.md#0440-2023-11-24). ## 1.11.1 (2023-11-11) diff --git a/cider.el b/cider.el index e497a6a4b..366b68434 100644 --- a/cider.el +++ b/cider.el @@ -527,7 +527,7 @@ the artifact.") (defconst cider-latest-clojure-version "1.10.1" "Latest supported version of Clojure.") -(defconst cider-required-middleware-version "0.43.3" +(defconst cider-required-middleware-version "0.44.0" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index 965179e41..9a1c1e966 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.43.3"]]) + :plugins [[cider/cider-nrepl "0.44.0"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index b370d4b9c..ff1d91caf 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.43.3"] + :plugins [[cider/cider-nrepl "0.44.0"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index e78467fc0..71b252eaa 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.43.3"]] +:plugins [[cider/cider-nrepl "0.44.0"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.43.3"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.44.0"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.43.3"]]) + concat '[[cider/cider-nrepl "0.44.0"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.43.3"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.44.0"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.43.3"} + cider/cider-nrepl {:mvn/version "0.44.0"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.43.3' + devImplementation 'cider:cider-nrepl:0.44.0' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index c40ad46c2..f212c8e51 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -67,7 +67,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.43.3"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.44.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -303,7 +303,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.43.3"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.44.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index 56a17afb4..1f1729ca9 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.43.3"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.44.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index 32d1e349d..aa027f704 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.43.3' + devImplementation 'cider:cider-nrepl:0.44.0' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index 8bb8ba008..56ba541d1 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.43.3") + (setq-local cider-injected-middleware-version "0.44.0") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -154,7 +154,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -167,7 +167,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -179,7 +179,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -192,7 +192,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.3") + (shell-quote-argument "cider/cider-nrepl:0.44.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -201,7 +201,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.3") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.44.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -218,7 +218,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -231,7 +231,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.3") + (shell-quote-argument "cider/cider-nrepl:0.44.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -253,7 +253,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -264,7 +264,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.3") + (shell-quote-argument "cider/cider-nrepl:0.44.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -272,7 +272,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.43.3") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.44.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -287,14 +287,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.43.3")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.44.0")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.43.3"))) + :to-equal '(("cider/cider-nrepl" "0.44.0"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -323,7 +323,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.43.3") + ("cider/cider-nrepl" "0.44.0") ("mx.cider/lein-enrich-classpath" "1.18.5"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -334,7 +334,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.43.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -352,7 +352,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.43.3") + (shell-quote-argument "cider/cider-nrepl:0.44.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -447,7 +447,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.3\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.44.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -461,7 +461,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.3\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.44.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -478,7 +478,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.44.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -488,7 +488,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.44.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -516,7 +516,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.43.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.44.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.43.3\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.44.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 4856be1af880bbc3d5ed3122640e601b1499587b Mon Sep 17 00:00:00 2001 From: vemv Date: Fri, 24 Nov 2023 10:20:09 +0100 Subject: [PATCH 017/212] Use enrich-classpath 1.18.6 --- CHANGELOG.md | 2 +- cider.el | 2 +- clojure.sh | 2 +- doc/modules/ROOT/pages/config/basic_config.adoc | 2 +- test/cider-tests.el | 14 +++++++------- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index afa0b7be7..5270689b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ - [#3580](https://github.com/clojure-emacs/cider/issues/3580): `cider-test`: make test vars in [test results reports](https://docs.cider.mx/cider/testing/test_reports.html) clickable. - As defined in the newly introduced `cider-test-var-keymap` var. - [#3582](https://github.com/clojure-emacs/cider/issues/3582): Handle `cider-clojure-compilation-error-phases` values that have been customized to `t`. -- [#3581](https://github.com/clojure-emacs/cider/issues/3581): Bump the injected `enrich-classpath` to [1.18.5](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.4...v1.18.5). +- [#3581](https://github.com/clojure-emacs/cider/issues/3581): Bump the injected `enrich-classpath` to [1.18.6](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.4...v1.18.6). - Handles Clojure CLI `:paths` directly defined as `:aliases`. - Bump the `clojure-mode` required version to [5.18.1](https://github.com/clojure-emacs/clojure-mode/blob/v5.18.1/CHANGELOG.md#5181-2023-11-24). - Bump the injected `cider-nrepl` to [0.44.0](https://github.com/clojure-emacs/cider-nrepl/blob/44da162f51765464192ba04102398c5982f01638/CHANGELOG.md#0440-2023-11-24). diff --git a/cider.el b/cider.el index 366b68434..cd5d28a1e 100644 --- a/cider.el +++ b/cider.el @@ -598,7 +598,7 @@ returned by this function does not include keyword arguments." (let ((plugins (if cider-enrich-classpath (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version) - ("mx.cider/lein-enrich-classpath" "1.18.5"))) + ("mx.cider/lein-enrich-classpath" "1.18.6"))) (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version)))))) (thread-last diff --git a/clojure.sh b/clojure.sh index fe79af264..f20a4f76b 100755 --- a/clojure.sh +++ b/clojure.sh @@ -37,7 +37,7 @@ else cd "$there" # enrich-classpath will emit a command starting by "clojure", or print a stacktrace: - output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.5"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") + output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.6"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") cmd=$(tail -n1 <(echo "$output")) cd "$here" diff --git a/doc/modules/ROOT/pages/config/basic_config.adoc b/doc/modules/ROOT/pages/config/basic_config.adoc index eeae0ba3d..5d09c59d9 100644 --- a/doc/modules/ROOT/pages/config/basic_config.adoc +++ b/doc/modules/ROOT/pages/config/basic_config.adoc @@ -44,7 +44,7 @@ With it enabled, `cider-jack-in` will activate enrich-classpath, given the follo * You are on macOS/Linux * You are launching a vanilla JVM repl (and not a cljs repl, or a clj+cljs repl) * You are using `cider-jack-in` / `cider-jack-in-clj` (and not `cider-connect`) - ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.18.5#emacs-cider-connect[own instructions]. + ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.18.6#emacs-cider-connect[own instructions]. ...these conditions will be progressively relaxed. diff --git a/test/cider-tests.el b/test/cider-tests.el index 56ba541d1..d89db352e 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -156,7 +156,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -169,7 +169,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -181,7 +181,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -220,7 +220,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -255,7 +255,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) (it "can concat in a boot project" @@ -324,7 +324,7 @@ (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.44.0") - ("mx.cider/lein-enrich-classpath" "1.18.5"))) + ("mx.cider/lein-enrich-classpath" "1.18.6"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) (it "uses them in a lein project" @@ -336,7 +336,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.5\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless")))) From 5c12eb90be3e9075ac96694391f62ee1927cfdbc Mon Sep 17 00:00:00 2001 From: vemv Date: Fri, 24 Nov 2023 09:02:59 +0100 Subject: [PATCH 018/212] Introduce `cider-inspector-tap-at-point` --- CHANGELOG.md | 1 + cider-inspector.el | 32 +++++++++++++++++-- .../ROOT/pages/debugging/inspector.adoc | 4 +++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5270689b9..bffd50f33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changes - [#3576](https://github.com/clojure-emacs/cider/issues/3576): CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): display Java class/method/field block tags (Returns/Throws/Params info) when available. +- CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html#usage): introduce `1` keybinding which performs `cider-inspector-tap-at-point`. - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html#usage): introduce `o` keybinding which performs `cider-inspector-open-thing-at-point`. - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html#usage): introduce `:` keybinding which performs `cider-inspect-expr-from-inspector`. - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): retain [`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html) values across screens. diff --git a/cider-inspector.el b/cider-inspector.el index fc6177f6c..820fd35bd 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -116,6 +116,7 @@ by clicking or navigating to them by other means." (define-key map "c" #'cider-inspector-set-max-coll-size) (define-key map "d" #'cider-inspector-def-current-val) (define-key map "t" #'cider-inspector-tap-current-val) + (define-key map "1" #'cider-inspector-tap-at-point) (define-key map [tab] #'cider-inspector-next-inspectable-object) (define-key map "\C-i" #'cider-inspector-next-inspectable-object) (define-key map "n" #'cider-inspector-next-inspectable-object) @@ -386,6 +387,24 @@ current-namespace." (error "Could not tap the current Inspector value: %s" err)))) (user-error "No CIDER session found"))) +(defun cider-inspector-tap-at-point () + "Sends the current Inspector current sub-value (per POINT) to `tap>'." + (interactive) + ;; NOTE: we don't set `cider-inspector--current-repl', because we mean to tap the current value of an existing Inspector, + ;; so whatever repl was used for it, should be used here. + (if cider-inspector--current-repl + (seq-let (property value) (cider-inspector-property-at-point) + (pcase property + (`cider-value-idx + (let* ((idx value) + (response (cider-sync-request:inspect-tap-indexed idx))) + (nrepl-dbind-response response (value err) + (if value + (message "Successfully tapped the Inspector item at point") + (error "Could not tap the Inspector item at point: %s" err))))) + (_ (error "No object at point")))) + (user-error "No CIDER session found"))) + ;; nREPL interactions (defun cider-sync-request:inspect-pop (&optional v2) "Move one level up in the inspector stack, @@ -520,6 +539,13 @@ instead of just its \"value\" entry." "Sends current inspector value to tap>." (cider-nrepl-send-sync-request '("op" "inspect-tap-current-value") cider-inspector--current-repl)) +(defun cider-sync-request:inspect-tap-indexed (idx) + "Sends current inspector sub-value to tap>, per IDX." + (cl-assert idx) + (cider-nrepl-send-sync-request `("op" "inspect-tap-indexed" + "idx" ,idx) + cider-inspector--current-repl)) + (defun cider-sync-request:inspect-expr (expr ns page-size max-atom-length max-coll-size &optional v2) "Evaluate EXPR in context of NS and inspect its result. Set the page size in paginated view to PAGE-SIZE, maximum length of atomic @@ -746,11 +772,11 @@ that value. 3. If point is on a range-button fetch and insert the range." (interactive) (seq-let (property value) (cider-inspector-property-at-point) - (cl-case property - (cider-value-idx + (pcase property + (`cider-value-idx (cider-inspector-push value)) ;; TODO: range and action handlers - (t (error "No object at point"))))) + (_ (error "No object at point"))))) (defun cider-inspector-operate-on-click (event) "Move to EVENT's position and operate the part." diff --git a/doc/modules/ROOT/pages/debugging/inspector.adoc b/doc/modules/ROOT/pages/debugging/inspector.adoc index 6592bb8e0..d894f492b 100644 --- a/doc/modules/ROOT/pages/debugging/inspector.adoc +++ b/doc/modules/ROOT/pages/debugging/inspector.adoc @@ -96,6 +96,10 @@ You'll have access to additional keybindings in the inspector buffer | `cider-inspector-tap-current-val` | Performs `tap>` using the inspector's current value as it argument. +| kbd:[1] +| `cider-inspector-tap-at-point` +| Performs `tap>` using the inspector's current sub-value (the one at POINT) as it argument. + |=== == Use `enrich-classpath` for best results From 2bafc1ec67308de500ce7ce8ac8f79eae449dee8 Mon Sep 17 00:00:00 2001 From: vemv Date: Fri, 24 Nov 2023 11:11:57 +0100 Subject: [PATCH 019/212] 1.12.0 --- CHANGELOG.md | 2 + cider.el | 218 +++++++++--------- doc/antora.yml | 2 +- .../ROOT/pages/about/compatibility.adoc | 7 + 4 files changed, 119 insertions(+), 110 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bffd50f33..6ce8adfae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master (unreleased) +## 1.12.0 (2023-11-24) + ### Changes - [#3576](https://github.com/clojure-emacs/cider/issues/3576): CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): display Java class/method/field block tags (Returns/Throws/Params info) when available. diff --git a/cider.el b/cider.el index cd5d28a1e..a758a199c 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.12.0-snapshot +;; Version: 1.12.0 ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.12.0-snapshot" +(defconst cider-version "1.12.0" "The current version of CIDER.") (defconst cider-codename "Split" @@ -602,15 +602,15 @@ returned by this function does not include keyword arguments." (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version)))))) (thread-last - plugins - (seq-filter - (lambda (spec) - (if-let* ((pred (plist-get (seq-drop spec 2) :predicate))) - (funcall pred spec) - t))) - (mapcar - (lambda (spec) - (seq-take spec 2)))))) + plugins + (seq-filter + (lambda (spec) + (if-let* ((pred (plist-get (seq-drop spec 2) :predicate))) + (funcall pred spec) + t))) + (mapcar + (lambda (spec) + (seq-take spec 2)))))) (defvar cider-jack-in-nrepl-middlewares nil "List of Clojure variable names. @@ -635,18 +635,18 @@ Added to `cider-jack-in-nrepl-middlewares' (which see) when doing See `cider-jack-in-nrepl-middlewares' for the format, except that the list returned by this function only contains strings." (thread-last - cider-jack-in-nrepl-middlewares - (seq-filter - (lambda (spec) - (or (not (listp spec)) - (if-let* ((pred (plist-get (cdr spec) :predicate))) - (funcall pred spec) - t)))) - (mapcar - (lambda (spec) - (if (listp spec) - (car spec) - spec))))) + cider-jack-in-nrepl-middlewares + (seq-filter + (lambda (spec) + (or (not (listp spec)) + (if-let* ((pred (plist-get (cdr spec) :predicate))) + (funcall pred spec) + t)))) + (mapcar + (lambda (spec) + (if (listp spec) + (car spec) + spec))))) (defun cider--list-as-boot-artifact (list) "Return a boot artifact string described by the elements of LIST. @@ -823,21 +823,21 @@ suitable `clojure` invocation and quoting, also accounting for COMMAND if provided. The main is placed in an inline alias :cider/nrepl so that if your aliases contain any mains, the cider/nrepl one will be the one used." (let* ((all-deps (thread-last - dependencies - (append (cider--jack-in-required-dependencies)) - ;; Duplicates are never OK since they would result in - ;; `java.lang.IllegalArgumentException: Duplicate key [...]`: - (cider--dedupe-deps) - (seq-map (lambda (dep) - (if (listp (cadr dep)) - (format "%s {%s}" - (car dep) - (seq-reduce - (lambda (acc v) - (concat acc (format " :%s \"%s\" " (car v) (cdr v)))) - (cadr dep) - "")) - (format "%s {:mvn/version \"%s\"}" (car dep) (cadr dep))))))) + dependencies + (append (cider--jack-in-required-dependencies)) + ;; Duplicates are never OK since they would result in + ;; `java.lang.IllegalArgumentException: Duplicate key [...]`: + (cider--dedupe-deps) + (seq-map (lambda (dep) + (if (listp (cadr dep)) + (format "%s {%s}" + (car dep) + (seq-reduce + (lambda (acc v) + (concat acc (format " :%s \"%s\" " (car v) (cdr v)))) + (cadr dep) + "")) + (format "%s {:mvn/version \"%s\"}" (car dep) (cadr dep))))))) (middleware (mapconcat (apply-partially #'format "%s") (cider-jack-in-normalized-nrepl-middlewares) @@ -1345,10 +1345,10 @@ been determined." Updates :project-dir and :jack-in-cmd. Also checks whether a matching session already exists." (thread-first - params - (cider--update-project-dir) - (cider--check-existing-session) - (cider--update-jack-in-cmd))) + params + (cider--update-project-dir) + (cider--check-existing-session) + (cider--update-jack-in-cmd))) ;;;###autoload (defun cider-jack-in-clj (params) @@ -1388,10 +1388,10 @@ these parameters." (orig-buffer (current-buffer))) ;; cider--update-jack-in-cmd relies indirectly on the above dynamic vars (let ((params (thread-first - params - (cider--update-project-dir) - (cider--check-existing-session) - (cider--update-jack-in-cmd)))) + params + (cider--update-project-dir) + (cider--check-existing-session) + (cider--update-jack-in-cmd)))) (nrepl-start-server-process (plist-get params :project-dir) (plist-get params :jack-in-cmd) @@ -1418,13 +1418,13 @@ only when the ClojureScript dependencies are met." (orig-buffer (current-buffer))) ;; cider--update-jack-in-cmd relies indirectly on the above dynamic vars (let ((params (thread-first - params - (cider--update-project-dir) - (cider--check-existing-session) - (cider--update-jack-in-cmd) - (cider--update-cljs-type) - ;; already asked, don't ask on sibling connect - (plist-put :do-prompt nil)))) + params + (cider--update-project-dir) + (cider--check-existing-session) + (cider--update-jack-in-cmd) + (cider--update-cljs-type) + ;; already asked, don't ask on sibling connect + (plist-put :do-prompt nil)))) (nrepl-start-server-process (plist-get params :project-dir) (plist-get params :jack-in-cmd) @@ -1450,12 +1450,12 @@ server is created." (ses-name (unless (nrepl-server-p other-repl) (sesman-session-name-for-object 'CIDER other-repl)))) (thread-first - params - (cider--update-do-prompt) - (append other-params) - (plist-put :repl-init-function nil) - (plist-put :repl-type 'clj) - (plist-put :session-name ses-name))))) + params + (cider--update-do-prompt) + (append other-params) + (plist-put :repl-init-function nil) + (plist-put :repl-type 'clj) + (plist-put :session-name ses-name))))) ;;;###autoload (defun cider-connect-sibling-cljs (params &optional other-repl) @@ -1475,13 +1475,13 @@ server buffer, in which case a new session for that server is created." (sesman-session-name-for-object 'CIDER other-repl)))) (cider-nrepl-connect (thread-first - params - (cider--update-do-prompt) - (append other-params) - (cider--update-cljs-type) - (cider--update-cljs-init-function) - (plist-put :session-name ses-name) - (plist-put :repl-type 'cljs))))) + params + (cider--update-do-prompt) + (append other-params) + (cider--update-cljs-type) + (cider--update-cljs-init-function) + (plist-put :session-name ses-name) + (plist-put :repl-type 'cljs))))) ;;;###autoload (defun cider-connect-clj (&optional params) @@ -1491,13 +1491,13 @@ prefix argument, prompt for all the parameters." (interactive "P") (cider-nrepl-connect (thread-first - params - (cider--update-project-dir) - (cider--update-host-port) - (cider--check-existing-session) - (plist-put :repl-init-function nil) - (plist-put :session-name nil) - (plist-put :repl-type 'clj)))) + params + (cider--update-project-dir) + (cider--update-host-port) + (cider--check-existing-session) + (plist-put :repl-init-function nil) + (plist-put :session-name nil) + (plist-put :repl-type 'clj)))) ;;;###autoload (defun cider-connect-cljs (&optional params) @@ -1510,14 +1510,14 @@ parameters regardless of their supplied or default values." (interactive "P") (cider-nrepl-connect (thread-first - params - (cider--update-project-dir) - (cider--update-host-port) - (cider--check-existing-session) - (cider--update-cljs-type) - (cider--update-cljs-init-function) - (plist-put :session-name nil) - (plist-put :repl-type 'cljs)))) + params + (cider--update-project-dir) + (cider--update-host-port) + (cider--check-existing-session) + (cider--update-cljs-type) + (cider--update-cljs-init-function) + (plist-put :session-name nil) + (plist-put :repl-type 'cljs)))) ;;;###autoload (defun cider-connect-clj&cljs (params &optional soft-cljs-start) @@ -1527,15 +1527,15 @@ PARAMS is a plist optionally containing :host, :port, :project-dir and non-nil, don't start if ClojureScript requirements are not met." (interactive "P") (let* ((params (thread-first - params - (cider--update-project-dir) - (cider--update-host-port) - (cider--check-existing-session) - (cider--update-cljs-type))) + params + (cider--update-project-dir) + (cider--update-host-port) + (cider--check-existing-session) + (cider--update-cljs-type))) (clj-params (thread-first - params - copy-sequence - (map-delete :cljs-repl-type))) + params + copy-sequence + (map-delete :cljs-repl-type))) (clj-repl (cider-connect-clj clj-params))) (when (if soft-cljs-start (cider--check-cljs (plist-get params :cljs-repl-type) 'no-error) @@ -1606,9 +1606,9 @@ Params is a plist with the following keys (non-exhaustive) (let ((default-directory proj-dir)) (hack-dir-local-variables-non-file-buffer) (thread-first - params - (plist-put :project-dir proj-dir) - (plist-put :--context-buffer (current-buffer))))))))) + params + (plist-put :project-dir proj-dir) + (plist-put :--context-buffer (current-buffer))))))))) (defun cider--update-cljs-type (params) "Update :cljs-repl-type in PARAMS." @@ -1705,9 +1705,9 @@ PARAMS is a plist with the following keys (non-exhaustive list) (if (equal "local-unix-domain-socket" (car endpoint)) (plist-put params :socket-file (cdr endpoint)) (thread-first - params - (plist-put :host (car endpoint)) - (plist-put :port (cdr endpoint))))))) + params + (plist-put :host (car endpoint)) + (plist-put :port (cdr endpoint))))))) (defun cider--update-cljs-init-function (params) "Update repl type and any init PARAMS for cljs connections. @@ -1729,20 +1729,20 @@ over to cljs. (plist-put params :cider-repl-cljs-upgrade-pending nil) (thread-first - params - (plist-put :cider-repl-cljs-upgrade-pending t) - (plist-put :repl-init-function - (lambda () - (cider--check-cljs cljs-type) - (cider-nrepl-send-request - (list "op" "eval" - "ns" (cider-current-ns) - "code" repl-init-form) - (cider-repl-handler (current-buffer))) - (when (and (buffer-live-p nrepl-server-buffer) - cider-offer-to-open-cljs-app-in-browser) - (cider--offer-to-open-app-in-browser nrepl-server-buffer)))) - (plist-put :repl-init-form repl-init-form)))))) + params + (plist-put :cider-repl-cljs-upgrade-pending t) + (plist-put :repl-init-function + (lambda () + (cider--check-cljs cljs-type) + (cider-nrepl-send-request + (list "op" "eval" + "ns" (cider-current-ns) + "code" repl-init-form) + (cider-repl-handler (current-buffer))) + (when (and (buffer-live-p nrepl-server-buffer) + cider-offer-to-open-cljs-app-in-browser) + (cider--offer-to-open-app-in-browser nrepl-server-buffer)))) + (plist-put :repl-init-form repl-init-form)))))) (defun cider--check-existing-session (params) "Ask for confirmation if a session with similar PARAMS already exists. diff --git a/doc/antora.yml b/doc/antora.yml index fd9dacd59..49f1f4b2b 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: ~ +version: 1.12 nav: - modules/ROOT/nav.adoc diff --git a/doc/modules/ROOT/pages/about/compatibility.adoc b/doc/modules/ROOT/pages/about/compatibility.adoc index e0541d422..6c7380bc9 100644 --- a/doc/modules/ROOT/pages/about/compatibility.adoc +++ b/doc/modules/ROOT/pages/about/compatibility.adoc @@ -161,6 +161,13 @@ Below you can find the official compatibility matrix for CIDER. | 8 | 1.8 +| 1.12 +| 26.1 +| 1.0 +| 0.44 +| 8 +| 1.8 + |=== TIP: You can also check the requirements of a particular CIDER version by inspecting From 5cbca647449e32926c35b20b9d3fc693078343ee Mon Sep 17 00:00:00 2001 From: vemv Date: Fri, 24 Nov 2023 11:13:31 +0100 Subject: [PATCH 020/212] 1.13.0-snapshot --- cider.el | 4 ++-- doc/antora.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cider.el b/cider.el index a758a199c..c980a1dea 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.12.0 +;; Version: 1.13.0-snapshot ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.12.0" +(defconst cider-version "1.13.0-snapshot" "The current version of CIDER.") (defconst cider-codename "Split" diff --git a/doc/antora.yml b/doc/antora.yml index 49f1f4b2b..fd9dacd59 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: 1.12 +version: ~ nav: - modules/ROOT/nav.adoc From 128bf920f0aa0b1edce9fdef39739a7b5ebaaf6e Mon Sep 17 00:00:00 2001 From: vemv Date: Fri, 24 Nov 2023 11:17:04 +0100 Subject: [PATCH 021/212] Reformat some `thread-first`s This style is closer to Clojure's, and indents consistently across more Emacs versions. --- cider.el | 154 +++++++++++++++++++++++++------------------------------ 1 file changed, 71 insertions(+), 83 deletions(-) diff --git a/cider.el b/cider.el index c980a1dea..10a3a9314 100644 --- a/cider.el +++ b/cider.el @@ -1344,11 +1344,10 @@ been determined." "Fill-in the passed in PARAMS plist needed to start an nREPL server. Updates :project-dir and :jack-in-cmd. Also checks whether a matching session already exists." - (thread-first - params - (cider--update-project-dir) - (cider--check-existing-session) - (cider--update-jack-in-cmd))) + (thread-first params + (cider--update-project-dir) + (cider--check-existing-session) + (cider--update-jack-in-cmd))) ;;;###autoload (defun cider-jack-in-clj (params) @@ -1387,11 +1386,10 @@ these parameters." (cider-jack-in-nrepl-middlewares (append cider-jack-in-nrepl-middlewares cider-jack-in-cljs-nrepl-middlewares)) (orig-buffer (current-buffer))) ;; cider--update-jack-in-cmd relies indirectly on the above dynamic vars - (let ((params (thread-first - params - (cider--update-project-dir) - (cider--check-existing-session) - (cider--update-jack-in-cmd)))) + (let ((params (thread-first params + (cider--update-project-dir) + (cider--check-existing-session) + (cider--update-jack-in-cmd)))) (nrepl-start-server-process (plist-get params :project-dir) (plist-get params :jack-in-cmd) @@ -1417,14 +1415,13 @@ only when the ClojureScript dependencies are met." (cider-jack-in-nrepl-middlewares (append cider-jack-in-nrepl-middlewares cider-jack-in-cljs-nrepl-middlewares)) (orig-buffer (current-buffer))) ;; cider--update-jack-in-cmd relies indirectly on the above dynamic vars - (let ((params (thread-first - params - (cider--update-project-dir) - (cider--check-existing-session) - (cider--update-jack-in-cmd) - (cider--update-cljs-type) - ;; already asked, don't ask on sibling connect - (plist-put :do-prompt nil)))) + (let ((params (thread-first params + (cider--update-project-dir) + (cider--check-existing-session) + (cider--update-jack-in-cmd) + (cider--update-cljs-type) + ;; already asked, don't ask on sibling connect + (plist-put :do-prompt nil)))) (nrepl-start-server-process (plist-get params :project-dir) (plist-get params :jack-in-cmd) @@ -1449,13 +1446,12 @@ server is created." (other-params (cider--gather-connect-params nil other-repl)) (ses-name (unless (nrepl-server-p other-repl) (sesman-session-name-for-object 'CIDER other-repl)))) - (thread-first - params - (cider--update-do-prompt) - (append other-params) - (plist-put :repl-init-function nil) - (plist-put :repl-type 'clj) - (plist-put :session-name ses-name))))) + (thread-first params + (cider--update-do-prompt) + (append other-params) + (plist-put :repl-init-function nil) + (plist-put :repl-type 'clj) + (plist-put :session-name ses-name))))) ;;;###autoload (defun cider-connect-sibling-cljs (params &optional other-repl) @@ -1474,14 +1470,13 @@ server buffer, in which case a new session for that server is created." (ses-name (unless (nrepl-server-p other-repl) (sesman-session-name-for-object 'CIDER other-repl)))) (cider-nrepl-connect - (thread-first - params - (cider--update-do-prompt) - (append other-params) - (cider--update-cljs-type) - (cider--update-cljs-init-function) - (plist-put :session-name ses-name) - (plist-put :repl-type 'cljs))))) + (thread-first params + (cider--update-do-prompt) + (append other-params) + (cider--update-cljs-type) + (cider--update-cljs-init-function) + (plist-put :session-name ses-name) + (plist-put :repl-type 'cljs))))) ;;;###autoload (defun cider-connect-clj (&optional params) @@ -1490,14 +1485,13 @@ PARAMS is a plist optionally containing :host, :port and :project-dir. On prefix argument, prompt for all the parameters." (interactive "P") (cider-nrepl-connect - (thread-first - params - (cider--update-project-dir) - (cider--update-host-port) - (cider--check-existing-session) - (plist-put :repl-init-function nil) - (plist-put :session-name nil) - (plist-put :repl-type 'clj)))) + (thread-first params + (cider--update-project-dir) + (cider--update-host-port) + (cider--check-existing-session) + (plist-put :repl-init-function nil) + (plist-put :session-name nil) + (plist-put :repl-type 'clj)))) ;;;###autoload (defun cider-connect-cljs (&optional params) @@ -1509,15 +1503,14 @@ On prefix, prompt for all the parameters regardless of their supplied or default values." (interactive "P") (cider-nrepl-connect - (thread-first - params - (cider--update-project-dir) - (cider--update-host-port) - (cider--check-existing-session) - (cider--update-cljs-type) - (cider--update-cljs-init-function) - (plist-put :session-name nil) - (plist-put :repl-type 'cljs)))) + (thread-first params + (cider--update-project-dir) + (cider--update-host-port) + (cider--check-existing-session) + (cider--update-cljs-type) + (cider--update-cljs-init-function) + (plist-put :session-name nil) + (plist-put :repl-type 'cljs)))) ;;;###autoload (defun cider-connect-clj&cljs (params &optional soft-cljs-start) @@ -1526,16 +1519,14 @@ PARAMS is a plist optionally containing :host, :port, :project-dir and :cljs-repl-type (e.g. 'shadow, 'node, 'figwheel, etc). When SOFT-CLJS-START is non-nil, don't start if ClojureScript requirements are not met." (interactive "P") - (let* ((params (thread-first - params - (cider--update-project-dir) - (cider--update-host-port) - (cider--check-existing-session) - (cider--update-cljs-type))) - (clj-params (thread-first - params - copy-sequence - (map-delete :cljs-repl-type))) + (let* ((params (thread-first params + (cider--update-project-dir) + (cider--update-host-port) + (cider--check-existing-session) + (cider--update-cljs-type))) + (clj-params (thread-first params + copy-sequence + (map-delete :cljs-repl-type))) (clj-repl (cider-connect-clj clj-params))) (when (if soft-cljs-start (cider--check-cljs (plist-get params :cljs-repl-type) 'no-error) @@ -1605,10 +1596,9 @@ Params is a plist with the following keys (non-exhaustive) (setq-local buffer-file-name nil)) (let ((default-directory proj-dir)) (hack-dir-local-variables-non-file-buffer) - (thread-first - params - (plist-put :project-dir proj-dir) - (plist-put :--context-buffer (current-buffer))))))))) + (thread-first params + (plist-put :project-dir proj-dir) + (plist-put :--context-buffer (current-buffer))))))))) (defun cider--update-cljs-type (params) "Update :cljs-repl-type in PARAMS." @@ -1704,10 +1694,9 @@ PARAMS is a plist with the following keys (non-exhaustive list) (cider-select-endpoint))))) (if (equal "local-unix-domain-socket" (car endpoint)) (plist-put params :socket-file (cdr endpoint)) - (thread-first - params - (plist-put :host (car endpoint)) - (plist-put :port (cdr endpoint))))))) + (thread-first params + (plist-put :host (car endpoint)) + (plist-put :port (cdr endpoint))))))) (defun cider--update-cljs-init-function (params) "Update repl type and any init PARAMS for cljs connections. @@ -1728,21 +1717,20 @@ over to cljs. (if (null repl-init-form) (plist-put params :cider-repl-cljs-upgrade-pending nil) - (thread-first - params - (plist-put :cider-repl-cljs-upgrade-pending t) - (plist-put :repl-init-function - (lambda () - (cider--check-cljs cljs-type) - (cider-nrepl-send-request - (list "op" "eval" - "ns" (cider-current-ns) - "code" repl-init-form) - (cider-repl-handler (current-buffer))) - (when (and (buffer-live-p nrepl-server-buffer) - cider-offer-to-open-cljs-app-in-browser) - (cider--offer-to-open-app-in-browser nrepl-server-buffer)))) - (plist-put :repl-init-form repl-init-form)))))) + (thread-first params + (plist-put :cider-repl-cljs-upgrade-pending t) + (plist-put :repl-init-function + (lambda () + (cider--check-cljs cljs-type) + (cider-nrepl-send-request + (list "op" "eval" + "ns" (cider-current-ns) + "code" repl-init-form) + (cider-repl-handler (current-buffer))) + (when (and (buffer-live-p nrepl-server-buffer) + cider-offer-to-open-cljs-app-in-browser) + (cider--offer-to-open-app-in-browser nrepl-server-buffer)))) + (plist-put :repl-init-form repl-init-form)))))) (defun cider--check-existing-session (params) "Ask for confirmation if a session with similar PARAMS already exists. From 120fd885d37c07137f1c162e8d522ab3eed1ac3f Mon Sep 17 00:00:00 2001 From: vemv Date: Fri, 24 Nov 2023 11:22:54 +0100 Subject: [PATCH 022/212] Reformat some `thread-last`s This style is closer to Clojure's, and indents consistently across more Emacs versions. --- cider.el | 75 +++++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/cider.el b/cider.el index 10a3a9314..601bc0399 100644 --- a/cider.el +++ b/cider.el @@ -601,16 +601,15 @@ returned by this function does not include keyword arguments." ("mx.cider/lein-enrich-classpath" "1.18.6"))) (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version)))))) - (thread-last - plugins - (seq-filter - (lambda (spec) - (if-let* ((pred (plist-get (seq-drop spec 2) :predicate))) - (funcall pred spec) - t))) - (mapcar - (lambda (spec) - (seq-take spec 2)))))) + (thread-last plugins + (seq-filter + (lambda (spec) + (if-let* ((pred (plist-get (seq-drop spec 2) :predicate))) + (funcall pred spec) + t))) + (mapcar + (lambda (spec) + (seq-take spec 2)))))) (defvar cider-jack-in-nrepl-middlewares nil "List of Clojure variable names. @@ -634,19 +633,18 @@ Added to `cider-jack-in-nrepl-middlewares' (which see) when doing "Return a normalized list of middleware variable names. See `cider-jack-in-nrepl-middlewares' for the format, except that the list returned by this function only contains strings." - (thread-last - cider-jack-in-nrepl-middlewares - (seq-filter - (lambda (spec) - (or (not (listp spec)) - (if-let* ((pred (plist-get (cdr spec) :predicate))) - (funcall pred spec) - t)))) - (mapcar - (lambda (spec) - (if (listp spec) - (car spec) - spec))))) + (thread-last cider-jack-in-nrepl-middlewares + (seq-filter + (lambda (spec) + (or (not (listp spec)) + (if-let* ((pred (plist-get (cdr spec) :predicate))) + (funcall pred spec) + t)))) + (mapcar + (lambda (spec) + (if (listp spec) + (car spec) + spec))))) (defun cider--list-as-boot-artifact (list) "Return a boot artifact string described by the elements of LIST. @@ -822,22 +820,21 @@ Does so by concatenating DEPENDENCIES, PARAMS and GLOBAL-OPTIONS into a suitable `clojure` invocation and quoting, also accounting for COMMAND if provided. The main is placed in an inline alias :cider/nrepl so that if your aliases contain any mains, the cider/nrepl one will be the one used." - (let* ((all-deps (thread-last - dependencies - (append (cider--jack-in-required-dependencies)) - ;; Duplicates are never OK since they would result in - ;; `java.lang.IllegalArgumentException: Duplicate key [...]`: - (cider--dedupe-deps) - (seq-map (lambda (dep) - (if (listp (cadr dep)) - (format "%s {%s}" - (car dep) - (seq-reduce - (lambda (acc v) - (concat acc (format " :%s \"%s\" " (car v) (cdr v)))) - (cadr dep) - "")) - (format "%s {:mvn/version \"%s\"}" (car dep) (cadr dep))))))) + (let* ((all-deps (thread-last dependencies + (append (cider--jack-in-required-dependencies)) + ;; Duplicates are never OK since they would result in + ;; `java.lang.IllegalArgumentException: Duplicate key [...]`: + (cider--dedupe-deps) + (seq-map (lambda (dep) + (if (listp (cadr dep)) + (format "%s {%s}" + (car dep) + (seq-reduce + (lambda (acc v) + (concat acc (format " :%s \"%s\" " (car v) (cdr v)))) + (cadr dep) + "")) + (format "%s {:mvn/version \"%s\"}" (car dep) (cadr dep))))))) (middleware (mapconcat (apply-partially #'format "%s") (cider-jack-in-normalized-nrepl-middlewares) From 0134a0bc09c8cd332b100cb1c37d375204253ab6 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 27 Nov 2023 10:25:11 +0200 Subject: [PATCH 023/212] Move a bit of related code together --- cider-test.el | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/cider-test.el b/cider-test.el index b5df76d35..558aa7bfd 100644 --- a/cider-test.el +++ b/cider-test.el @@ -117,11 +117,6 @@ to work against the correct REPL session.") "When theme is changed, update `cider-test-items-background-color'." (setq cider-test-items-background-color (cider-scale-background-color))) -(defun cider-test-toggle-fail-fast () - "Toggles `cider-test-fail-fast' t <-> nil for the current buffer." - (interactive) - (setq-local cider-test-fail-fast (not cider-test-fail-fast))) - ;;; Report mode & key bindings ;; ;; The primary mode of interacting with test results is the report buffer, which @@ -368,6 +363,16 @@ With the actual value, the outermost '(not ...)' s-expression is removed." ;;; Report rendering +(defcustom cider-test-fail-fast t + "Controls whether to stop a test run on failure/error." + :type 'boolean + :package-version '(cider . "1.8.0")) + +(defun cider-test-toggle-fail-fast () + "Toggles `cider-test-fail-fast' t <-> nil for the current buffer." + (interactive) + (setq-local cider-test-fail-fast (not cider-test-fail-fast))) + (defun cider-test-type-face (type) "Return the font lock face for the test result TYPE." (pcase type @@ -382,7 +387,9 @@ With the actual value, the outermost '(not ...)' s-expression is removed." `(:foreground ,(face-attribute face :background)))) (defun cider-test-render-summary (buffer summary &optional elapsed-time) - "Emit into BUFFER the report SUMMARY statistics." + "Emit into BUFFER the report SUMMARY statistics. + +If ELAPSED-TIME is provided it will be included in the summary." (with-current-buffer buffer (nrepl-dbind-response summary (ns var test pass fail error) (let ((ms (nrepl-dict-get elapsed-time "ms"))) @@ -689,11 +696,6 @@ The selectors can be either keywords or strings." (split-string (cider-read-from-minibuffer message)))) -(defcustom cider-test-fail-fast t - "Controls whether to stop a test run on failure/error." - :type 'boolean - :package-version '(cider . "1.8.0")) - (defun cider-test-execute (ns &optional tests silent prompt-for-filters) "Run tests for NS, which may be a keyword, optionally specifying TESTS. This tests a single NS, or multiple namespaces when using keywords `:project', From 511b242ed25cb42184f2d2109543350f641e26d2 Mon Sep 17 00:00:00 2001 From: ikappaki <34983288+ikappaki@users.noreply.github.com> Date: Sat, 2 Dec 2023 13:50:17 +0000 Subject: [PATCH 024/212] pwsh 7.3 quoting rules compatibility (#3593) Co-authored-by: ikappaki Co-authored-by: shishini --- CHANGELOG.md | 4 ++++ cider.el | 5 ++++- .../ROOT/pages/basics/up_and_running.adoc | 19 ++++++++++++++----- test/cider-tests.el | 6 +++--- test/integration/integration-tests.el | 6 +++++- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ce8adfae..f4fbcc50e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Changes + +- [#3588](https://github.com/clojure-emacs/cider/issues/3588): Compatibility with pwsh 7.3 quoting rules. + ## 1.12.0 (2023-11-24) ### Changes diff --git a/cider.el b/cider.el index 601bc0399..b673bdda7 100644 --- a/cider.el +++ b/cider.el @@ -810,7 +810,10 @@ rules to quote it." (defun cider--powershell-encode-command (cmd-params) "Base64 encode the powershell command and jack-in CMD-PARAMS for clojure-cli." (let* ((quoted-params cmd-params) - (command (format "clojure %s" quoted-params)) + ;; Also ensure compatibility with pwsh 7.3 quoting rules + ;; + ;; https://stackoverflow.com/a/59036879 + (command (format "$PSNativeCommandArgumentPassing = 'Legacy'; clojure %s" quoted-params)) (utf-16le-command (encode-coding-string command 'utf-16le))) (format "-encodedCommand %s" (base64-encode-string utf-16le-command t)))) diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index f212c8e51..c8e17cc31 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -208,11 +208,20 @@ so we'll examine them tool by tool. * `cider-clojure-cli-parameters` - the command-line parameters to start a REPL * `cider-clojure-cli-aliases` - a list of aliases to be used at jack-in time -To use `cider-jack-in` with `tools.deps` on Windows set the -`cider-clojure-cli-command` to `"powershell"`. This happens by default -if you are on Windows and no `clojure` executable is found. Using -`"powershell"` will Base64 encode the clojure launch command before -passing it to PowerShell and avoids shell-escaping issues. +On MS-Windows, CIDER will employ `PowerShell` to execute Clojure if no +`clojure` executable is found in the PATH (e.g. like the one supplied +by https://github.com/borkdude/deps.clj[deps.clj]). The default +executable used is `powershell` which is available on all Windows +platforms. Using `PowerShell` will Base64 encode the clojure launch +command before passing it to PowerShell and avoids shell-escaping +issues. + +The functionality of `cider-clojure-cli-command` has been verified +with the following alternatives + +* `pwsh`: This option proves beneficial when the user has installed the https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows[ClojureTools] module on pwsh in a directory not accessible by the system's PowerShell installation. +* `deps.exe`: This executable is part of the tools provided by + https://github.com/borkdude/deps.clj[deps.clj] as an alternative name for `clojure.exe`. NOTE: Alternatively you can use WSL (e.g. to run nREPL and Emacs there), which will likely result in a better overall development experience. diff --git a/test/cider-tests.el b/test/cider-tests.el index d89db352e..19f8d01b7 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -420,12 +420,12 @@ (expect (cider--powershell-encode-command "cmd-params") :to-equal (concat "-encodedCommand " ;; Eval to reproduce reference string below: (base64-encode-string (encode-coding-string "clojure cmd-params" 'utf-16le) t) - "YwBsAG8AagB1AHIAZQAgAGMAbQBkAC0AcABhAHIAYQBtAHMA"))) + "JABQAFMATgBhAHQAaQB2AGUAQwBvAG0AbQBhAG4AZABBAHIAZwB1AG0AZQBuAHQAUABhAHMAcwBpAG4AZwAgAD0AIAAnAEwAZQBnAGEAYwB5ACcAOwAgAGMAbABvAGoAdQByAGUAIABjAG0AZAAtAHAAYQByAGEAbQBzAA=="))) (it "escapes double quotes by repeating them" (expect (cider--powershell-encode-command "\"cmd-params\"") :to-equal (concat "-encodedCommand " ;; Eval to reproduce reference string below: (base64-encode-string (encode-coding-string "clojure "\"cmd-params\""" 'utf-16le) t) - "YwBsAG8AagB1AHIAZQAgACIAYwBtAGQALQBwAGEAcgBhAG0AcwAiAA==")))) + "JABQAFMATgBhAHQAaQB2AGUAQwBvAG0AbQBhAG4AZABBAHIAZwB1AG0AZQBuAHQAUABhAHMAcwBpAG4AZwAgAD0AIAAnAEwAZQBnAGEAYwB5ACcAOwAgAGMAbABvAGoAdQByAGUAIAAiAGMAbQBkAC0AcABhAHIAYQBtAHMAIgA=")))) (describe "cider--update-jack-in-cmd" (describe "when 'clojure-cli project type and \"powershell\" command" @@ -441,7 +441,7 @@ (expect (plist-get (cider--update-jack-in-cmd nil) :jack-in-cmd) :to-equal (concat "resolved-powershell -encodedCommand " ;; Eval to reproduce reference string below: (base64-encode-string (encode-coding-string "clojure "\"cmd-params"\"" 'utf-16le) t) - "YwBsAG8AagB1AHIAZQAgACIAYwBtAGQALQBwAGEAcgBhAG0AcwAiAA==")))) + "JABQAFMATgBhAHQAaQB2AGUAQwBvAG0AbQBhAG4AZABBAHIAZwB1AG0AZQBuAHQAUABhAHMAcwBpAG4AZwAgAD0AIAAnAEwAZQBnAGEAYwB5ACcAOwAgAGMAbABvAGoAdQByAGUAIAAiAGMAbQBkAC0AcABhAHIAYQBtAHMAIgA=")))) (describe "when 'clojure-cli project type" (it "uses main opts in an alias to prevent other mains from winning" (setq-local cider-jack-in-dependencies nil) diff --git a/test/integration/integration-tests.el b/test/integration/integration-tests.el index a337e63fb..c4ddf8cba 100644 --- a/test/integration/integration-tests.el +++ b/test/integration/integration-tests.el @@ -187,7 +187,11 @@ If CLI-COMMAND is nil, then use the default." (jack-in-clojure-cli-test nil)) (when (eq system-type 'windows-nt) - (it "to clojure tools cli (alternative deps.exe)" + (it "to clojure tools cli (alternative pwsh)" + (jack-in-clojure-cli-test "pwsh"))) + +(when (eq system-type 'windows-nt) + (it "to clojure tools cli (alternative deps.exe)" (jack-in-clojure-cli-test "deps.exe"))) (it "to leiningen" From c37d6340f85120f894852d3e6d93f3309c89e627 Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 3 Dec 2023 22:34:11 +0100 Subject: [PATCH 025/212] Bump the `parseedn` required version to 1.2.1 --- CHANGELOG.md | 3 ++- cider.el | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4fbcc50e..00fe4a96f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changes - [#3588](https://github.com/clojure-emacs/cider/issues/3588): Compatibility with pwsh 7.3 quoting rules. +- Bump the `parseedn` required version to 1.2.1. ## 1.12.0 (2023-11-24) @@ -186,7 +187,7 @@ but without connecting to the started nREPL server. - Improve `nrepl-dict` error reporting. - Bump the injected `piggieback` to [0.5.3](https://github.com/nrepl/piggieback/blob/0.5.3/CHANGES.md#053-2021-10-26). - Bump the `clojure-mode` required version to [5.17.1](https://github.com/clojure-emacs/clojure-mode/blob/v5.17.1/CHANGELOG.md#5171-2023-09-12), and use `clojure-find-ns` more safely, which fixes issues such as #[2849](https://github.com/clojure-emacs/cider/issues/2849). -- Bump the `parseedn` require version, and wrap its usage with a more informative `user-error`. +- Bump the `parseedn` required version, and wrap its usage with a more informative `user-error`. - Bump the injected `cider-nrepl` to [0.39.1](https://github.com/clojure-emacs/cider-nrepl/blob/v0.39.1/CHANGELOG.md#0391-2023-10-12). - Improves indentation, font-locking and other metadata support for ClojureScript. - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.16.1/CHANGELOG.md#0161-2023-10-05) diff --git a/cider.el b/cider.el index b673bdda7..ace5c2825 100644 --- a/cider.el +++ b/cider.el @@ -12,7 +12,7 @@ ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider ;; Version: 1.13.0-snapshot -;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) +;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider ;; This program is free software: you can redistribute it and/or modify From 25c51fd4b1246801ba3fa15c57b44d860772417c Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 3 Dec 2023 22:38:24 +0100 Subject: [PATCH 026/212] Bump the injected `enrich-classpath` to 1.19.0 https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.6...v1.19.0 --- CHANGELOG.md | 1 + cider.el | 2 +- clojure.sh | 2 +- doc/modules/ROOT/pages/config/basic_config.adoc | 2 +- test/cider-tests.el | 14 +++++++------- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00fe4a96f..5976fc3e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changes - [#3588](https://github.com/clojure-emacs/cider/issues/3588): Compatibility with pwsh 7.3 quoting rules. +- Bump the injected `enrich-classpath` to [1.19.0](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.6...v1.19.0). - Bump the `parseedn` required version to 1.2.1. ## 1.12.0 (2023-11-24) diff --git a/cider.el b/cider.el index ace5c2825..1c1aed821 100644 --- a/cider.el +++ b/cider.el @@ -598,7 +598,7 @@ returned by this function does not include keyword arguments." (let ((plugins (if cider-enrich-classpath (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version) - ("mx.cider/lein-enrich-classpath" "1.18.6"))) + ("mx.cider/lein-enrich-classpath" "1.19.0"))) (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version)))))) (thread-last plugins diff --git a/clojure.sh b/clojure.sh index f20a4f76b..9b8b3d2f7 100755 --- a/clojure.sh +++ b/clojure.sh @@ -37,7 +37,7 @@ else cd "$there" # enrich-classpath will emit a command starting by "clojure", or print a stacktrace: - output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.6"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") + output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.19.0"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") cmd=$(tail -n1 <(echo "$output")) cd "$here" diff --git a/doc/modules/ROOT/pages/config/basic_config.adoc b/doc/modules/ROOT/pages/config/basic_config.adoc index 5d09c59d9..e79cb3d49 100644 --- a/doc/modules/ROOT/pages/config/basic_config.adoc +++ b/doc/modules/ROOT/pages/config/basic_config.adoc @@ -44,7 +44,7 @@ With it enabled, `cider-jack-in` will activate enrich-classpath, given the follo * You are on macOS/Linux * You are launching a vanilla JVM repl (and not a cljs repl, or a clj+cljs repl) * You are using `cider-jack-in` / `cider-jack-in-clj` (and not `cider-connect`) - ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.18.6#emacs-cider-connect[own instructions]. + ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.19.0#emacs-cider-connect[own instructions]. ...these conditions will be progressively relaxed. diff --git a/test/cider-tests.el b/test/cider-tests.el index 19f8d01b7..fa0541f5d 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -156,7 +156,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -169,7 +169,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -181,7 +181,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -220,7 +220,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -255,7 +255,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) (it "can concat in a boot project" @@ -324,7 +324,7 @@ (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.44.0") - ("mx.cider/lein-enrich-classpath" "1.18.6"))) + ("mx.cider/lein-enrich-classpath" "1.19.0"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) (it "uses them in a lein project" @@ -336,7 +336,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.18.6\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless")))) From e5d7c5e13e954732615f15d6789bf46507f927d9 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 24 Dec 2023 09:30:02 +0200 Subject: [PATCH 027/212] [Docs] Add a missing space --- doc/modules/ROOT/pages/index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/index.adoc b/doc/modules/ROOT/pages/index.adoc index 7f7daf22f..3506f82eb 100644 --- a/doc/modules/ROOT/pages/index.adoc +++ b/doc/modules/ROOT/pages/index.adoc @@ -74,7 +74,7 @@ CIDER packs plenty of features. Here are some of them (in no particular order): * `clojure.spec` integration * Interactive debugger * ClojureScript support -* Support for xref:platforms/overview.adoc[alternative Clojure platforms](e.g. ClojureCLR, babashka, nbb & lumo) +* Support for xref:platforms/overview.adoc[alternative Clojure platforms] (e.g. ClojureCLR, babashka, nbb & lumo) And many many more... The rest of this manual will be exploring CIDER's features in great detail. From 07150f10bf920eb3e8f166592fac1aa8dcfc1e26 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 24 Dec 2023 09:35:23 +0200 Subject: [PATCH 028/212] [Docs] Expand the list of features on the home page --- doc/modules/ROOT/pages/index.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/modules/ROOT/pages/index.adoc b/doc/modules/ROOT/pages/index.adoc index 3506f82eb..5ddaadc42 100644 --- a/doc/modules/ROOT/pages/index.adoc +++ b/doc/modules/ROOT/pages/index.adoc @@ -69,10 +69,14 @@ CIDER packs plenty of features. Here are some of them (in no particular order): * Code completion * Code reloading * Definition & documentation lookup +* Enhanced syntax highlighting and indentation * Enhanced error reporting * `clojure.test` integration * `clojure.spec` integration * Interactive debugger +* Data Inspector +* Integration with Java logging frameworks +* Profiling & tracing * ClojureScript support * Support for xref:platforms/overview.adoc[alternative Clojure platforms] (e.g. ClojureCLR, babashka, nbb & lumo) From ee7bdbd034abfbd89cc52cb0725b2fdd76fb45e3 Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 2 Jan 2024 19:17:59 +0100 Subject: [PATCH 029/212] Introduce `cider-log-show` function (#3602) * Introduce `cider-log-show` function * Prefer logview-mode unconditionally, and warn when it's absent This way, users will know logview-mode exists. There's still fallback, and optionality. --- cider-log.el | 68 ++++++++-- cider-mode.el | 1 + .../images/cider-log-transient-mode.png | Bin 0 -> 21987 bytes doc/modules/ROOT/pages/debugging/logging.adoc | 117 ++++++++++++++---- 4 files changed, 153 insertions(+), 33 deletions(-) create mode 100644 doc/modules/ROOT/assets/images/cider-log-transient-mode.png diff --git a/cider-log.el b/cider-log.el index 62b903428..4e7a8d626 100644 --- a/cider-log.el +++ b/cider-log.el @@ -37,7 +37,12 @@ (require 'transient) (defcustom cider-log-framework-name nil - "The name of the current log framework." + "The name of the default log framework. + +You may want to set this in .dir-locals.el, +for a more streamlined setup. + +Example value: \"Logback\"." :group 'cider :package-version '(cider . "1.8.0") :safe #'stringp @@ -85,13 +90,20 @@ :safe #'integerp :type 'integer) -(defcustom cider-log-use-logview (fboundp 'logview-mode) - "Whether to use `logview-mode' or not." +(defcustom cider-log-use-logview t + "Whether to use `logview-mode'. + +It will not be used if the package hasn't been installed." :group 'cider :package-version '(cider . "1.8.0") :safe #'booleanp :type 'boolean) +(defun cider-log-use-logview () + "Whether to use `logview-mode'." + (and (fboundp 'logview-mode) + cider-log-use-logview)) + (defvar logview-mode-map) (declare-function logview--guess-submode "logview" () t) (declare-function logview-initialized-p "logview" () t) @@ -556,6 +568,8 @@ The KEYS are used to lookup the values and are joined by SEPARATOR." (when-let (appender (cider-log-appender-reload framework appender)) (cider-log-appender-consumer appender consumer))) +(declare-function cider-log-mode "cider-log") + (defun cider-log--consumer-add (framework appender consumer buffer) "Add the CONSUMER to the APPENDER of FRAMEWORK and write events to BUFFER." (cider-request:log-add-consumer @@ -567,7 +581,14 @@ The KEYS are used to lookup the values and are joined by SEPARATOR." (setq-local cider-log-framework framework) (setq-local cider-log-appender appender) (setq cider-log-consumer cider/log-add-consumer) - (switch-to-buffer buffer))) + (switch-to-buffer buffer) + (when (and cider-log-use-logview + (not (fboundp 'logview-mode))) + (message "[CIDER Log Mode] Please install the Logview package for best results.") + (cider--display-interactive-eval-result "Please install the Logview package for best results." + 'error + (point) + 'cider-error-overlay-face)))) ((member "cider/log-event" status) (let* ((consumer (nrepl-dict "id" cider/log-consumer)) (buffers (cider-log-consumer-buffers consumer))) @@ -580,7 +601,8 @@ The KEYS are used to lookup the values and are joined by SEPARATOR." (seq-doseq (buffer buffers) (with-current-buffer buffer (cider-log--insert-events buffer (list cider/log-event)) - (when (and cider-log-use-logview (not (logview-initialized-p))) + (when (and (cider-log-use-logview) + (not (logview-initialized-p))) (let ((framework cider-log-framework) (appender cider-log-appender) (consumer cider-log-consumer)) @@ -812,7 +834,9 @@ The KEYS are used to lookup the values and are joined by SEPARATOR." (defvar cider-log-mode-map (let ((map (make-sparse-keymap)) - (parent (if cider-log-use-logview logview-mode-map special-mode-map))) + (parent (if (cider-log-use-logview) + logview-mode-map + special-mode-map))) (set-keymap-parent map parent) (define-key map (kbd "C-c M-l a") #'cider-log-appender) (define-key map (kbd "C-c M-l c") #'cider-log-consumer) @@ -849,7 +873,7 @@ the CIDER Inspector and the CIDER stacktrace mode. \\{cider-log-mode-map}") -(if cider-log-use-logview +(if (cider-log-use-logview) (define-derived-mode cider-log-mode logview-mode "Cider Log" cider-log--mode-doc (cider-log--setup-mode)) (define-derived-mode cider-log-mode special-mode "Cider Log" cider-log--mode-doc @@ -1154,12 +1178,17 @@ the CIDER Inspector and the CIDER stacktrace mode. (let ((inhibit-read-only t)) (erase-buffer))))) +(defun cider-log--switch-to-buffer (buffer) + "Switch to the Cider log event BUFFER." + (when (get-buffer-create buffer) + (switch-to-buffer-other-window buffer) + (get-buffer buffer))) + (transient-define-suffix cider-log-switch-to-buffer (buffer) "Switch to the Cider log event BUFFER." :description "Switch to the log event buffer" (interactive (list cider-log-buffer)) - (when (get-buffer-create buffer) - (switch-to-buffer-other-window buffer))) + (cider-log--switch-to-buffer buffer)) (transient-define-suffix cider-log--do-search-events (framework appender filters) "Search the log events of FRAMEWORK and APPENDER which match FILTERS." @@ -1385,6 +1414,27 @@ the CIDER Inspector and the CIDER stacktrace mode. (cider-log--ensure-initialized framework appender) (transient-setup 'cider-log-event)) +;;;###autoload +(defun cider-log-show () + "Ensures the *cider-log* buffer is visible, +setting up a framework, appender and consumer if necessary. + +Honors the `cider-log-framework-name' customization variable. + +This function is offered as an alternative to workflows +based on `transient-mode'." + (interactive) + (cider-current-repl nil 'ensure) + (let ((framework (cider-log--framework)) + (appender (cider-log--appender)) + (new-default-directory (buffer-local-value 'default-directory (current-buffer)))) + (with-current-buffer (cider-log--switch-to-buffer cider-log-buffer) + (setq-local default-directory new-default-directory) ;; for Sesman + (cider-log--ensure-initialized framework appender) + (unless cider-log-consumer + (apply #'cider-log--ensure-initialized (cider-log--consumer-interactive-list)) + (call-interactively 'cider-log--do-add-consumer))))) + ;; Main Transient Menu ;;;###autoload (autoload 'cider-log "cider-log" "Show the Cider log menu." t) diff --git a/cider-mode.el b/cider-mode.el index 15024f96c..235ce6c5c 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -537,6 +537,7 @@ higher precedence." (define-key map (kbd "C-c M-l a") #'cider-log-appender) (define-key map (kbd "C-c M-l c") #'cider-log-consumer) (define-key map (kbd "C-c M-l e") #'cider-log-event) + (define-key map (kbd "C-c M-l s") #'cider-log-show) (define-key map (kbd "C-c M-l f") #'cider-log-framework) (define-key map (kbd "C-c M-l i") #'cider-log-info) (define-key map (kbd "C-c M-l l") #'cider-log) diff --git a/doc/modules/ROOT/assets/images/cider-log-transient-mode.png b/doc/modules/ROOT/assets/images/cider-log-transient-mode.png new file mode 100644 index 0000000000000000000000000000000000000000..549f15db79b6c4c9d9fd8ff9be3979e5a1dddcbc GIT binary patch literal 21987 zcmc$_V{~P~);8L)*>T6Vla6iMwrzH7btgNvZQJSC>?9rA_P2A+dCxiDeaF3j?;d0A zReRU0ss;o@iG$^DVsBJ`)5Zm@J| z;6_(TC>pgre0Wc#N}yx%P9mLuV@SI+V?HCsKZy>Yhp2>C!O@#TC@l3e z5$o*Yg3mpFN?I-y?^uF37F^|6-(n1w{in(<(N7Ao$T)n44@@tUyW9k7jy43k8^rMq z&q9gpP^r%fOk~jC6WXB@7%>4u>VPeaDNI4Dho?W0`JPkPNt@I&KCAA zkLi#-z^WE4RWw{QWM#OF?QQ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30b0e10..3ee443608 100644 --- a/doc/modules/ROOT/pages/debugging/logging.adoc +++ b/doc/modules/ROOT/pages/debugging/logging.adoc @@ -3,7 +3,7 @@ CIDER Log Mode allows you to capture, debug, inspect and view log events emitted by Java logging frameworks. The captured log events can -be searched, streamed to the client, pretty printed and are integrated +be searched, streamed to the client, pretty-printed, and are integrated with the CIDER link:inspector.html[Inspector] and link:../usage/dealing_with_errors.html[Stacktrace Mode]. Here is a screenshot of CIDER Log Mode in action. @@ -20,12 +20,12 @@ logging related actions. == Features -- Browse Javadocs and website of log framework. +- Browse Javadocs and website of the given log framework. - Search log events and show them in buffers. -- link:../usage/pretty_printing.html[Pretty Print] log events. -- Show log events in the CIDER link:inspector.html[Inspector] -- Show log event exceptions in the CIDER link:../usage/dealing_with_errors.html[Stacktrace Mode] -- Integration with https://github.com/doublep/logview[logview] +- link:../usage/pretty_printing.html[Pretty-print] log events. +- Show log events in the CIDER link:inspector.html[Inspector]. +- Show log event exceptions in the CIDER link:../usage/dealing_with_errors.html[Stacktrace Mode]. +- Integration with https://github.com/doublep/logview[logview]. == Dependencies @@ -33,13 +33,73 @@ https://github.com/doublep/logview[Logview] is an optional dependency of CIDER Log Mode. We recommend using it, since it is responsible for coloring the log events and it provides other useful features, such as syntax highlighting, filtering and more. It is used automatically when -available and its use can be customized via `cider-log-use-logview`. +available, and its use can be customized via `cider-log-use-logview`. -== Usage +== `transient-mode` -To use CIDER Log Mode, type kbd:[C-c M-l l] or kbd:[M-x cider-log] in -any buffer that has a CIDER https://github.com/vspinu/sesman[Sesman] -session attached to it. The first time you run the command, it will +It's worth pointing out that most features and workflows of Cider Log Mode are based on https://github.com/magit/transient[transient-mode]. + +A transient menu is the following widget: + +image::cider-log-transient-mode.png[CIDER Log transient menu] + +Its usage is mostly self-describing, since each command has its keybinding attached to the description. + +== Getting started + +To use CIDER Log Mode, there two main ways to get started: + +* `M-x cider-log-event`, which uses transient-mode and will not immediately show the logs (you should use transient-mode to show the `+*cider-log*+` buffer) +* `M-x cider-log-show` is a newer function that intends to be an "all-in-one" command, intended for a streamlined experience, which can be useful to get started, or for casual usage. +** It doesn't use transient-mode - it aims to do everything in one step +** It immediately shows the `+*cider-log*+` buffer + +NOTE: any of these commands will only succeed in +a buffer that has a CIDER repl (https://github.com/vspinu/sesman[Sesman] +session) attached to it. + +=== Via `cider-log-show` + +By using `M-x cider-log-show`, all setup and rendering will be performed for you in a single step that doesn't pop up a `transient-mode` menu: + +* A framework will be set up, automatically +** You may be prompted for a framework +** You can prevent the prompt by customizing `cider-log-framework-name` (best done in `dir-locals.el`) +* A log appender and a log consumer will be setup, automatically +* The `+*cider-log*+` buffer will be rendered. + +All these steps are idempotent, so it's safe to run `M-x cider-log-show` more than once. + +You can refine the setup afterwards (e.g. configuring filtering) by running `M-x cider-log`. + +=== Via `cider-log-event` + +The intended workflow for this function is as follows: + +* Run `M-x cider-log-event` +* A framework will be set up, automatically +** You may be prompted for a framework +** You can prevent the prompt by customizing `cider-log-framework-name` (best done in `dir-locals.el`) +* A log appender and a log consumer will be setup, automatically +* The `+*cider-log*+` buffer will _not_ be rendered +** For it to be rendered, press `s` (`Search log events`) within the transient-mode menu. + +NOTE: The `+*cider-log*+` buffer might initially be empty, and you may +see a `No log events found` message. This is because nothing has been +logged between adding the appender and searching for events. So, now +would be a good time to run some code that triggers a log event for +the selected framework. + +== Advanced usage + +`cider-log` is a function that can serve both to set up logging from scratch, +or for tweaking an existing setup (e.g. add filtering to a consumer). + +It's considered a lower-level approach. + +=== Setup via `cider-log` + +Type kbd:[C-c M-l l] or kbd:[M-x cider-log]. The first time you run the command, it will prompt you to select a log framework to use, and then attach a log appender to the root logger of the selected framework. After the log appender has been attached, the `cider-log` command will show a @@ -47,26 +107,30 @@ https://www.gnu.org/software/emacs/manual/html_mono/transient.html[Transient] menu, from which you can take further actions, like managing the log framework, appenders, consumers and events. -To view log events and stream them to your client, type kbd:[es] +You should add a log appender and a log consumer at this point - else no log entries will be possibly shown +(which is why `cider-log` is considered a lower-level workflow). + +After that, to view log events and stream them to your client, type kbd:[es] (Search log events) followed by kbd:[s]. This will open the `+*cider-log*+` buffer showing any log events captured thus far. It will also add a log consumer to this buffer, which receives newly-arriving log events. -NOTE: The `+*cider-log*+` buffer might initially be empty, and you may -see a `No log events found` message. This is because nothing has been -logged between adding the appender and searching for events. So, now -would be a good time to run some code that triggers a log event for -the selected framework. - === Keybindings |=== | Command | Keyboard shortcut | Description +| `cider-log-event` +| kbd:[C-c M-l e] +| Show the menu to manage log events via a transient-mode menu. This is one of the two main entrypoints to get started. + +| `cider-log-show` +| kbd:[C-c M-l s] +| Immediately shows the logs, without a transient-mode menu. This is one of the two main entrypoints to get started. | `cider-log` | kbd:[C-c M-l l] -| Show the CIDER log menu. +| Show the CIDER log menu. Please note that this is considered advanced usage. | `cider-log-framework` | kbd:[C-c M-l f] @@ -79,16 +143,12 @@ the selected framework. | `cider-log-consumer` | kbd:[C-c M-l c] | Show the menu to manage consumers listening to log events. - -| `cider-log-event` -| kbd:[C-c M-l e] -| Show the menu to manage log events. |=== == Log framework CIDER Log Mode supports log frameworks that allow reconfiguration at -run time. More specifically the framework should support attaching log +runtime. More specifically the framework should support attaching log appenders to loggers, in order to capture events. At the moment the following log frameworks are supported: @@ -103,6 +163,15 @@ https://stackoverflow.com/a/17842174/12711900[difficulties] with configuration changes made at runtime, which are wiped out by the Log4j2 reconfiguration mechanism. +Timbre support is WIP as well. + +TIP: If your logging framework of choice is not currently supported by CIDER Log Mode, +you can opt to use Clojure's official `tools.logging` façade in your project, such that you can locally, +unobstrusively tell it to use a supported framework (like Logback) instead of your project's default one. +Note that `tools.logging`'s choice of logging backend implementation can be controlled with the +`-Dclojure.tools.logging.factory` Java system property, which can be cleanly customized locally via Lein profiles, +or Clojure CLI aliases. + === Keybindings |=== From 5d68d88372be51ca31bdf1b662184a137bed7dbe Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 2 Jan 2024 19:25:29 +0100 Subject: [PATCH 030/212] Tweak `docs/cider/debugging/logging.html` --- doc/modules/ROOT/pages/debugging/logging.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/modules/ROOT/pages/debugging/logging.adoc b/doc/modules/ROOT/pages/debugging/logging.adoc index 3ee443608..e061b3e78 100644 --- a/doc/modules/ROOT/pages/debugging/logging.adoc +++ b/doc/modules/ROOT/pages/debugging/logging.adoc @@ -54,7 +54,7 @@ To use CIDER Log Mode, there two main ways to get started: ** It doesn't use transient-mode - it aims to do everything in one step ** It immediately shows the `+*cider-log*+` buffer -NOTE: any of these commands will only succeed in +NOTE: Any of these commands will only succeed in a buffer that has a CIDER repl (https://github.com/vspinu/sesman[Sesman] session) attached to it. @@ -70,7 +70,7 @@ By using `M-x cider-log-show`, all setup and rendering will be performed for you All these steps are idempotent, so it's safe to run `M-x cider-log-show` more than once. -You can refine the setup afterwards (e.g. configuring filtering) by running `M-x cider-log`. +You can refine the setup afterwards (e.g. configuring filtering) by running `M-x cider-log`, `M-x cider-log-consumer`, etc. === Via `cider-log-event` @@ -168,7 +168,7 @@ Timbre support is WIP as well. TIP: If your logging framework of choice is not currently supported by CIDER Log Mode, you can opt to use Clojure's official `tools.logging` façade in your project, such that you can locally, unobstrusively tell it to use a supported framework (like Logback) instead of your project's default one. -Note that `tools.logging`'s choice of logging backend implementation can be controlled with the +Note that its choice of logging backend implementation can be controlled with the `-Dclojure.tools.logging.factory` Java system property, which can be cleanly customized locally via Lein profiles, or Clojure CLI aliases. From 54952d14e0053bab3253bec81e18e0ed64b19465 Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 2 Jan 2024 20:26:58 +0100 Subject: [PATCH 031/212] Bump the copyright years --- README.md | 2 +- cider-apropos.el | 2 +- cider-browse-ns.el | 2 +- cider-browse-spec.el | 2 +- cider-cheatsheet.el | 2 +- cider-classpath.el | 2 +- cider-client.el | 2 +- cider-clojuredocs.el | 2 +- cider-common.el | 2 +- cider-completion-context.el | 2 +- cider-completion.el | 2 +- cider-connection.el | 2 +- cider-debug.el | 2 +- cider-doc.el | 2 +- cider-docstring.el | 2 +- cider-eldoc.el | 4 ++-- cider-eval.el | 4 ++-- cider-find.el | 2 +- cider-format.el | 2 +- cider-inspector.el | 4 ++-- cider-jar.el | 2 +- cider-log.el | 2 +- cider-macroexpansion.el | 4 ++-- cider-mode.el | 4 ++-- cider-ns.el | 2 +- cider-overlays.el | 2 +- cider-popup.el | 2 +- cider-profile.el | 2 +- cider-repl-history.el | 2 +- cider-repl.el | 4 ++-- cider-resolve.el | 2 +- cider-scratch.el | 2 +- cider-selector.el | 4 ++-- cider-stacktrace.el | 2 +- cider-test.el | 2 +- cider-tracing.el | 2 +- cider-util.el | 4 ++-- cider-xref-backend.el | 2 +- cider-xref.el | 2 +- cider.el | 4 ++-- doc/modules/ROOT/pages/about/license.adoc | 2 +- nrepl-client.el | 4 ++-- nrepl-dict.el | 4 ++-- test/cider-apropos-tests.el | 2 +- test/cider-browse-ns-tests.el | 2 +- test/cider-browse-spec-tests.el | 2 +- test/cider-classpath-tests.el | 2 +- test/cider-client-tests.el | 2 +- test/cider-clojuredocs-tests.el | 2 +- test/cider-common-tests.el | 2 +- test/cider-completion-context-tests.el | 2 +- test/cider-completion-tests.el | 2 +- test/cider-connection-tests.el | 2 +- test/cider-debug-tests.el | 2 +- test/cider-doc-tests.el | 2 +- test/cider-eldoc-tests.el | 2 +- test/cider-error-parsing-tests.el | 2 +- test/cider-eval-tests.el | 2 +- test/cider-find-tests.el | 2 +- test/cider-inspector-tests.el | 2 +- test/cider-interaction-tests.el | 2 +- test/cider-jar-tests.el | 2 +- test/cider-log-tests.el | 2 +- test/cider-ns-tests.el | 2 +- test/cider-overlay-tests.el | 2 +- test/cider-repl-tests.el | 2 +- test/cider-selector-tests.el | 2 +- test/cider-stacktrace-tests.el | 2 +- test/cider-test-tests.el | 2 +- test/cider-tests--no-auto.el | 2 +- test/cider-tests.el | 2 +- test/cider-util-tests.el | 2 +- test/enrich/cider-docstring-tests.el | 2 +- test/integration/integration-test-utils.el | 2 +- test/integration/integration-tests.el | 2 +- test/nrepl-bencode-tests.el | 2 +- test/nrepl-client-tests.el | 2 +- test/nrepl-dict-tests.el | 2 +- test/nrepl-server-mock.el | 2 +- test/utils/cider-connection-test-utils.el | 2 +- test/utils/nrepl-tests-utils.el | 2 +- 81 files changed, 92 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 9344c3d71..1e11c3c26 100644 --- a/README.md +++ b/README.md @@ -262,7 +262,7 @@ site. [[Become a sponsor](https://opencollective.com/cider#sponsor)] CIDER is distributed under the GNU General Public License, version 3. -Copyright © 2012-2023 Bozhidar Batsov, Artur Malabarba, Tim King, Phil Hagelberg and +Copyright © 2012-2024 Bozhidar Batsov, Artur Malabarba, Tim King, Phil Hagelberg and [contributors](https://github.com/clojure-emacs/cider/contributors). [badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg diff --git a/cider-apropos.el b/cider-apropos.el index 5cadc3de3..b94e27ed8 100644 --- a/cider-apropos.el +++ b/cider-apropos.el @@ -1,6 +1,6 @@ ;;; cider-apropos.el --- Apropos functionality for Clojure -*- lexical-binding: t -*- -;; Copyright © 2014-2023 Jeff Valk, Bozhidar Batsov and CIDER contributors +;; Copyright © 2014-2024 Jeff Valk, Bozhidar Batsov and CIDER contributors ;; ;; Author: Jeff Valk diff --git a/cider-browse-ns.el b/cider-browse-ns.el index 88811fdbe..4e9e6be79 100644 --- a/cider-browse-ns.el +++ b/cider-browse-ns.el @@ -1,6 +1,6 @@ ;;; cider-browse-ns.el --- CIDER namespace browser -*- lexical-binding: t; -*- -;; Copyright © 2014-2023 John Andrews, Bozhidar Batsov and CIDER contributors +;; Copyright © 2014-2024 John Andrews, Bozhidar Batsov and CIDER contributors ;; Author: John Andrews diff --git a/cider-browse-spec.el b/cider-browse-spec.el index 0ccf23902..7163a25f1 100644 --- a/cider-browse-spec.el +++ b/cider-browse-spec.el @@ -1,6 +1,6 @@ ;;; cider-browse-spec.el --- CIDER spec browser -*- lexical-binding: t; -*- -;; Copyright © 2017-2023 Juan Monetta, Bozhidar Batsov and CIDER contributors +;; Copyright © 2017-2024 Juan Monetta, Bozhidar Batsov and CIDER contributors ;; Author: Juan Monetta diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 533dae859..e4d1bc6c1 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -1,6 +1,6 @@ ;;; cider-cheatsheet.el --- Quick reference for Clojure -*- lexical-binding: t -*- -;; Copyright © 2019-2023 Kris Jenkins, Bozhidar Batsov and CIDER contributors +;; Copyright © 2019-2024 Kris Jenkins, Bozhidar Batsov and CIDER contributors ;; ;; Author: Kris Jenkins diff --git a/cider-classpath.el b/cider-classpath.el index 0b628eeb9..3ebe86502 100644 --- a/cider-classpath.el +++ b/cider-classpath.el @@ -1,6 +1,6 @@ ;;; cider-classpath.el --- Basic Java classpath browser -*- lexical-binding: t; -*- -;; Copyright © 2014-2023 Bozhidar Batsov and CIDER contributors +;; Copyright © 2014-2024 Bozhidar Batsov and CIDER contributors ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by diff --git a/cider-client.el b/cider-client.el index 20713c062..99e66844b 100644 --- a/cider-client.el +++ b/cider-client.el @@ -1,6 +1,6 @@ ;;; cider-client.el --- A layer of abstraction above low-level nREPL client code. -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov diff --git a/cider-clojuredocs.el b/cider-clojuredocs.el index 3e51a0757..e8b7772cb 100644 --- a/cider-clojuredocs.el +++ b/cider-clojuredocs.el @@ -1,6 +1,6 @@ ;;; cider-clojuredocs.el --- ClojureDocs integration -*- lexical-binding: t -*- -;; Copyright © 2014-2023 Bozhidar Batsov and CIDER contributors +;; Copyright © 2014-2024 Bozhidar Batsov and CIDER contributors ;; ;; Author: Bozhidar Batsov diff --git a/cider-common.el b/cider-common.el index 85a13d49c..f3e6582f9 100644 --- a/cider-common.el +++ b/cider-common.el @@ -1,6 +1,6 @@ ;;; cider-common.el --- Common use functions -*- lexical-binding: t; -*- -;; Copyright © 2015-2023 Artur Malabarba +;; Copyright © 2015-2024 Artur Malabarba ;; Author: Artur Malabarba diff --git a/cider-completion-context.el b/cider-completion-context.el index 7171788d7..1a72fa391 100644 --- a/cider-completion-context.el +++ b/cider-completion-context.el @@ -1,6 +1,6 @@ ;;; cider-completion-context.el --- Context parsing -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Bozhidar Batsov ;; Artur Malabarba diff --git a/cider-completion.el b/cider-completion.el index 9d55b1688..9f83e4715 100644 --- a/cider-completion.el +++ b/cider-completion.el @@ -1,6 +1,6 @@ ;;; cider-completion.el --- Smart REPL-powered code completion -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Bozhidar Batsov ;; Artur Malabarba diff --git a/cider-connection.el b/cider-connection.el index 4d08e0a75..71213d858 100644 --- a/cider-connection.el +++ b/cider-connection.el @@ -1,6 +1,6 @@ ;;; cider-connection.el --- Connection and session life-cycle management for CIDER -*- lexical-binding: t -*- ;; -;; Copyright © 2019-2023 Artur Malabarba, Bozhidar Batsov, Vitalie Spinu and CIDER contributors +;; Copyright © 2019-2024 Artur Malabarba, Bozhidar Batsov, Vitalie Spinu and CIDER contributors ;; ;; Author: Artur Malabarba ;; Bozhidar Batsov diff --git a/cider-debug.el b/cider-debug.el index 7df148cd0..f06a8c06b 100644 --- a/cider-debug.el +++ b/cider-debug.el @@ -1,6 +1,6 @@ ;;; cider-debug.el --- CIDER interaction with the cider.debug nREPL middleware -*- lexical-binding: t; -*- -;; Copyright © 2015-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2015-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; Author: Artur Malabarba diff --git a/cider-doc.el b/cider-doc.el index 3bf3ad24e..88a4ac17f 100644 --- a/cider-doc.el +++ b/cider-doc.el @@ -1,6 +1,6 @@ ;;; cider-doc.el --- CIDER documentation functionality -*- lexical-binding: t -*- -;; Copyright © 2014-2023 Bozhidar Batsov, Jeff Valk and CIDER contributors +;; Copyright © 2014-2024 Bozhidar Batsov, Jeff Valk and CIDER contributors ;; Author: Jeff Valk diff --git a/cider-docstring.el b/cider-docstring.el index c991615bd..0b3ceebaa 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -1,6 +1,6 @@ ;;; cider-docstring.el --- Docstring rendering -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov and CIDER contributors +;; Copyright © 2013-2024 Bozhidar Batsov and CIDER contributors ;; ;; Author: Bozhidar Batsov diff --git a/cider-eldoc.el b/cider-eldoc.el index a328f648c..f0ceeec8b 100644 --- a/cider-eldoc.el +++ b/cider-eldoc.el @@ -1,7 +1,7 @@ ;;; cider-eldoc.el --- eldoc support for Clojure -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/cider-eval.el b/cider-eval.el index 618889530..c14ab4c38 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -1,7 +1,7 @@ ;;; cider-eval.el --- Interactive evaluation (compilation) functionality -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/cider-find.el b/cider-find.el index 7df9e4cc8..0af706e24 100644 --- a/cider-find.el +++ b/cider-find.el @@ -1,6 +1,6 @@ ;;; cider-find.el --- Functionality for finding things -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Bozhidar Batsov ;; Artur Malabarba diff --git a/cider-format.el b/cider-format.el index eeb3562cc..2673430f5 100644 --- a/cider-format.el +++ b/cider-format.el @@ -1,6 +1,6 @@ ;;; cider-format.el --- Code and EDN formatting functionality -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Bozhidar Batsov ;; Artur Malabarba diff --git a/cider-inspector.el b/cider-inspector.el index 820fd35bd..103452c17 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -1,7 +1,7 @@ ;;; cider-inspector.el --- Object inspector -*- lexical-binding: t -*- -;; Copyright © 2013-2014 Vital Reactor, LLC -;; Copyright © 2014-2023 Bozhidar Batsov and CIDER contributors +;; Copyright © 2013-2024 Vital Reactor, LLC +;; Copyright © 2014-2024 Bozhidar Batsov and CIDER contributors ;; Author: Ian Eslick ;; Bozhidar Batsov diff --git a/cider-jar.el b/cider-jar.el index 667464263..006ad7ec8 100644 --- a/cider-jar.el +++ b/cider-jar.el @@ -1,6 +1,6 @@ ;;; cider-jar.el --- Jar functionality for Clojure -*- lexical-binding: t -*- -;; Copyright © 2022 Arne Brasseur +;; Copyright © 2022-2024 Arne Brasseur ;; ;; Author: Arne Brasseur diff --git a/cider-log.el b/cider-log.el index 4e7a8d626..b43eaa92e 100644 --- a/cider-log.el +++ b/cider-log.el @@ -1,6 +1,6 @@ ;;; cider-log.el --- Log inspection functionality for Clojure -*- lexical-binding: t -*- -;; Copyright © 2023 Bozhidar Batsov and CIDER contributors +;; Copyright © 2023-2024 Bozhidar Batsov and CIDER contributors ;; Author: r0man diff --git a/cider-macroexpansion.el b/cider-macroexpansion.el index 31f3e9671..e445c4331 100644 --- a/cider-macroexpansion.el +++ b/cider-macroexpansion.el @@ -1,7 +1,7 @@ ;;; cider-macroexpansion.el --- Macro expansion support -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/cider-mode.el b/cider-mode.el index 235ce6c5c..06ec27734 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -1,7 +1,7 @@ ;;; cider-mode.el --- Minor mode for REPL interactions -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/cider-ns.el b/cider-ns.el index 1d3274132..1eb244775 100644 --- a/cider-ns.el +++ b/cider-ns.el @@ -1,6 +1,6 @@ ;;; cider-ns.el --- Namespace manipulation functionality -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Bozhidar Batsov ;; Artur Malabarba diff --git a/cider-overlays.el b/cider-overlays.el index 487aec03d..6310bb0d3 100644 --- a/cider-overlays.el +++ b/cider-overlays.el @@ -1,6 +1,6 @@ ;;; cider-overlays.el --- Managing CIDER overlays -*- lexical-binding: t; -*- -;; Copyright © 2015-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2015-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; Author: Artur Malabarba diff --git a/cider-popup.el b/cider-popup.el index 5bf811951..5d7beb564 100644 --- a/cider-popup.el +++ b/cider-popup.el @@ -1,6 +1,6 @@ ;;; cider-popup.el --- Creating and quitting popup buffers -*- lexical-binding: t; -*- -;; Copyright © 2015-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2015-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; Author: Artur Malabarba diff --git a/cider-profile.el b/cider-profile.el index e2dd6fc6a..792d4b54e 100644 --- a/cider-profile.el +++ b/cider-profile.el @@ -1,6 +1,6 @@ ;;; cider-profile.el --- CIDER support for profiling -*- lexical-binding: t; -*- -;; Copyright © 2014-2023 Edwin Watkeys and CIDER contributors +;; Copyright © 2014-2024 Edwin Watkeys and CIDER contributors ;; Author: Edwin Watkeys ;; Juan E. Maya diff --git a/cider-repl-history.el b/cider-repl-history.el index e5044bf6e..ec19298ad 100644 --- a/cider-repl-history.el +++ b/cider-repl-history.el @@ -1,6 +1,6 @@ ;;; cider-repl-history.el --- REPL input history browser -*- lexical-binding: t; -*- -;; Copyright (c) 2017-2023 John Valente and browse-kill-ring authors +;; Copyright (c) 2017-2024 John Valente and browse-kill-ring authors ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by diff --git a/cider-repl.el b/cider-repl.el index 173b0dc54..675db2e28 100644 --- a/cider-repl.el +++ b/cider-repl.el @@ -1,7 +1,7 @@ ;;; cider-repl.el --- CIDER REPL mode interactions -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/cider-resolve.el b/cider-resolve.el index 783ddbf03..eaa49d630 100644 --- a/cider-resolve.el +++ b/cider-resolve.el @@ -1,6 +1,6 @@ ;;; cider-resolve.el --- Resolve clojure symbols according to current nREPL connection -*- lexical-binding: t; -*- -;; Copyright © 2015-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2015-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; Author: Artur Malabarba diff --git a/cider-scratch.el b/cider-scratch.el index ce6c7e489..07de719c6 100644 --- a/cider-scratch.el +++ b/cider-scratch.el @@ -1,6 +1,6 @@ ;;; cider-scratch.el --- *scratch* buffer for Clojure -*- lexical-binding: t -*- -;; Copyright © 2014-2023 Bozhidar Batsov and CIDER contributors +;; Copyright © 2014-2024 Bozhidar Batsov and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/cider-selector.el b/cider-selector.el index afe0b5679..b70e1e8eb 100644 --- a/cider-selector.el +++ b/cider-selector.el @@ -1,7 +1,7 @@ ;;; cider-selector.el --- Buffer selection command inspired by SLIME's selector -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/cider-stacktrace.el b/cider-stacktrace.el index 48349247f..930193897 100644 --- a/cider-stacktrace.el +++ b/cider-stacktrace.el @@ -1,6 +1,6 @@ ;;; cider-stacktrace.el --- Stacktrace navigator -*- lexical-binding: t -*- -;; Copyright © 2014-2023 Jeff Valk, Bozhidar Batsov and CIDER contributors +;; Copyright © 2014-2024 Jeff Valk, Bozhidar Batsov and CIDER contributors ;; Author: Jeff Valk diff --git a/cider-test.el b/cider-test.el index 558aa7bfd..b67021cea 100644 --- a/cider-test.el +++ b/cider-test.el @@ -1,6 +1,6 @@ ;;; cider-test.el --- Test result viewer -*- lexical-binding: t -*- -;; Copyright © 2014-2023 Jeff Valk, Bozhidar Batsov and CIDER contributors +;; Copyright © 2014-2024 Jeff Valk, Bozhidar Batsov and CIDER contributors ;; Author: Jeff Valk diff --git a/cider-tracing.el b/cider-tracing.el index f7a312e62..f466fc8f9 100644 --- a/cider-tracing.el +++ b/cider-tracing.el @@ -1,6 +1,6 @@ ;;; cider-tracing.el --- Executing tracing functionality -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Bozhidar Batsov ;; Artur Malabarba diff --git a/cider-util.el b/cider-util.el index df532596f..741882e9e 100644 --- a/cider-util.el +++ b/cider-util.el @@ -1,7 +1,7 @@ ;; cider-util.el --- Common utility functions that don't belong anywhere else -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/cider-xref-backend.el b/cider-xref-backend.el index 57954df14..4b3ca4b0d 100644 --- a/cider-xref-backend.el +++ b/cider-xref-backend.el @@ -1,6 +1,6 @@ ;;; cider-xref-backend.el --- CIDER's backend for Emacs' xref functionality -*- lexical-binding: t -*- -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Bozhidar Batsov ;; Artur Malabarba diff --git a/cider-xref.el b/cider-xref.el index 3d84b66e6..453d1ef41 100644 --- a/cider-xref.el +++ b/cider-xref.el @@ -1,6 +1,6 @@ ;;; cider-xref.el --- Xref functionality for Clojure -*- lexical-binding: t -*- -;; Copyright © 2019-2023 Bozhidar Batsov and CIDER contributors +;; Copyright © 2019-2024 Bozhidar Batsov and CIDER contributors ;; ;; Author: Bozhidar Batsov diff --git a/cider.el b/cider.el index 1c1aed821..e74b14d54 100644 --- a/cider.el +++ b/cider.el @@ -1,7 +1,7 @@ ;;; cider.el --- Clojure Interactive Development Environment that Rocks -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/doc/modules/ROOT/pages/about/license.adoc b/doc/modules/ROOT/pages/about/license.adoc index 3b57e0423..afc25969e 100644 --- a/doc/modules/ROOT/pages/about/license.adoc +++ b/doc/modules/ROOT/pages/about/license.adoc @@ -21,4 +21,4 @@ NOTE: Reach out to Bozhidar if you have any questions about licensing. == Copyright -© 2012-2023 Bozhidar Batsov, Artur Malabarba, Tim King, Phil Hagelberg and CIDER contributors. +© 2012-2024 Bozhidar Batsov, Artur Malabarba, Tim King, Phil Hagelberg and CIDER contributors. diff --git a/nrepl-client.el b/nrepl-client.el index 81bca0ef2..d707b92f7 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -1,7 +1,7 @@ ;;; nrepl-client.el --- Client for Clojure nREPL -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/nrepl-dict.el b/nrepl-dict.el index 9ba5bcb70..f1846d473 100644 --- a/nrepl-dict.el +++ b/nrepl-dict.el @@ -1,7 +1,7 @@ ;;; nrepl-dict.el --- Dictionary functions for Clojure nREPL -*- lexical-binding: t -*- -;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov -;; Copyright © 2013-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2012-2024 Tim King, Phil Hagelberg, Bozhidar Batsov +;; Copyright © 2013-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; ;; Author: Tim King ;; Phil Hagelberg diff --git a/test/cider-apropos-tests.el b/test/cider-apropos-tests.el index e832b4ad4..c8114459b 100644 --- a/test/cider-apropos-tests.el +++ b/test/cider-apropos-tests.el @@ -1,6 +1,6 @@ ;;; cider-apropos-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-browse-ns-tests.el b/test/cider-browse-ns-tests.el index 080c9c1f5..7fe5cf226 100644 --- a/test/cider-browse-ns-tests.el +++ b/test/cider-browse-ns-tests.el @@ -1,6 +1,6 @@ ;;; cider-browse-ns-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-browse-spec-tests.el b/test/cider-browse-spec-tests.el index e550f97ad..df359d792 100644 --- a/test/cider-browse-spec-tests.el +++ b/test/cider-browse-spec-tests.el @@ -1,6 +1,6 @@ ;;; cider-browse-spec-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 r0man, Bozhidar Batsov +;; Copyright © 2012-2024 r0man, Bozhidar Batsov ;; Author: r0man ;; Bozhidar Batsov diff --git a/test/cider-classpath-tests.el b/test/cider-classpath-tests.el index 5b41b267c..99aaf9857 100644 --- a/test/cider-classpath-tests.el +++ b/test/cider-classpath-tests.el @@ -1,6 +1,6 @@ ;;; cider-classpath-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-client-tests.el b/test/cider-client-tests.el index 1411827ab..99516cdd0 100644 --- a/test/cider-client-tests.el +++ b/test/cider-client-tests.el @@ -1,6 +1,6 @@ ;;; cider-client-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-clojuredocs-tests.el b/test/cider-clojuredocs-tests.el index 867e475b5..bac2a4e2e 100644 --- a/test/cider-clojuredocs-tests.el +++ b/test/cider-clojuredocs-tests.el @@ -1,6 +1,6 @@ ;;; cider-clojuredocs-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-common-tests.el b/test/cider-common-tests.el index de2d25e1b..3d42e0a41 100644 --- a/test/cider-common-tests.el +++ b/test/cider-common-tests.el @@ -1,6 +1,6 @@ ;;; cider-common-tests.el --- -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-completion-context-tests.el b/test/cider-completion-context-tests.el index fcb056705..aac6fcf9c 100644 --- a/test/cider-completion-context-tests.el +++ b/test/cider-completion-context-tests.el @@ -1,6 +1,6 @@ ;;; cider-completion-context-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Bozhidar Batsov +;; Copyright © 2012-2024 Bozhidar Batsov ;; Author: Bozhidar Batsov diff --git a/test/cider-completion-tests.el b/test/cider-completion-tests.el index 52d2f9a10..bfbba1ee7 100644 --- a/test/cider-completion-tests.el +++ b/test/cider-completion-tests.el @@ -1,6 +1,6 @@ ;;; cider-completion-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Bozhidar Batsov +;; Copyright © 2012-2024 Bozhidar Batsov ;; Author: Bozhidar Batsov diff --git a/test/cider-connection-tests.el b/test/cider-connection-tests.el index 612be61d7..37875eddc 100644 --- a/test/cider-connection-tests.el +++ b/test/cider-connection-tests.el @@ -1,7 +1,7 @@ ;; -*- lexical-binding: t; -*- ;;; cider-connection-tests.el -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov, Vitalie Spinu +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov, Vitalie Spinu ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-debug-tests.el b/test/cider-debug-tests.el index 34b69ef1d..2bb5d6e60 100644 --- a/test/cider-debug-tests.el +++ b/test/cider-debug-tests.el @@ -1,6 +1,6 @@ ;;; cider-debug-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-doc-tests.el b/test/cider-doc-tests.el index 38dcc89fd..bc272dc08 100644 --- a/test/cider-doc-tests.el +++ b/test/cider-doc-tests.el @@ -1,6 +1,6 @@ ;;; cider-doc-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2023 Bozhidar Batsov +;; Copyright © 2023-2024 Bozhidar Batsov ;; Author: Bozhidar Batsov diff --git a/test/cider-eldoc-tests.el b/test/cider-eldoc-tests.el index d60ebb601..5611df447 100644 --- a/test/cider-eldoc-tests.el +++ b/test/cider-eldoc-tests.el @@ -1,6 +1,6 @@ ;;; cider-eldoc-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-error-parsing-tests.el b/test/cider-error-parsing-tests.el index 72c4fb9ef..583e92b92 100644 --- a/test/cider-error-parsing-tests.el +++ b/test/cider-error-parsing-tests.el @@ -1,6 +1,6 @@ ;;; cider-error-parsing-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-eval-tests.el b/test/cider-eval-tests.el index b411d6413..113012d08 100644 --- a/test/cider-eval-tests.el +++ b/test/cider-eval-tests.el @@ -1,6 +1,6 @@ ;;; cider-eval-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Arne Brasseur +;; Copyright © 2012-2024 Arne Brasseur ;; Author: Arne Brasseur diff --git a/test/cider-find-tests.el b/test/cider-find-tests.el index 70efa73b5..465dfc5dc 100644 --- a/test/cider-find-tests.el +++ b/test/cider-find-tests.el @@ -1,6 +1,6 @@ ;;; cider-find-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Bozhidar Batsov +;; Copyright © 2012-2024 Bozhidar Batsov ;; Author: Bozhidar Batsov diff --git a/test/cider-inspector-tests.el b/test/cider-inspector-tests.el index d8bbd4f2a..0d2060de5 100644 --- a/test/cider-inspector-tests.el +++ b/test/cider-inspector-tests.el @@ -1,6 +1,6 @@ ;;; cider-inspectors-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Bozhidar Batsov +;; Copyright © 2012-2024 Bozhidar Batsov ;; Author: Bozhidar Batsov diff --git a/test/cider-interaction-tests.el b/test/cider-interaction-tests.el index 33c873dc3..f511267c8 100644 --- a/test/cider-interaction-tests.el +++ b/test/cider-interaction-tests.el @@ -1,6 +1,6 @@ ;;; cider-eval-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-jar-tests.el b/test/cider-jar-tests.el index d4ecdfef7..faf173109 100644 --- a/test/cider-jar-tests.el +++ b/test/cider-jar-tests.el @@ -1,6 +1,6 @@ ;;; cider-jar-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Arne Brasseur +;; Copyright © 2012-2024 Arne Brasseur ;; Author: Arne Brasseur diff --git a/test/cider-log-tests.el b/test/cider-log-tests.el index 9a8aa3048..200874c60 100644 --- a/test/cider-log-tests.el +++ b/test/cider-log-tests.el @@ -1,6 +1,6 @@ ;;; cider-log-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2023 Bozhidar Batsov and CIDER contributors +;; Copyright © 2023-2024 Bozhidar Batsov and CIDER contributors ;; Author: r0man diff --git a/test/cider-ns-tests.el b/test/cider-ns-tests.el index e7649ea8d..e34e0ba64 100644 --- a/test/cider-ns-tests.el +++ b/test/cider-ns-tests.el @@ -1,6 +1,6 @@ ;;; cider-ns-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2019-2023 Bozhidar Batsov +;; Copyright © 2019-2024 Bozhidar Batsov ;; Author: Bozhidar Batsov diff --git a/test/cider-overlay-tests.el b/test/cider-overlay-tests.el index 2b7450f6a..362e472ed 100644 --- a/test/cider-overlay-tests.el +++ b/test/cider-overlay-tests.el @@ -1,6 +1,6 @@ ;;; cider-overlay-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2015-2023 Bozhidar Batsov, Artur Malabarba and CIDER contributors +;; Copyright © 2015-2024 Bozhidar Batsov, Artur Malabarba and CIDER contributors ;; Author: Artur Malabarba diff --git a/test/cider-repl-tests.el b/test/cider-repl-tests.el index 4596d3e42..9d7535d30 100644 --- a/test/cider-repl-tests.el +++ b/test/cider-repl-tests.el @@ -1,6 +1,6 @@ ;;; cider-repl-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-selector-tests.el b/test/cider-selector-tests.el index 6bd11539b..0ed80387c 100644 --- a/test/cider-selector-tests.el +++ b/test/cider-selector-tests.el @@ -1,6 +1,6 @@ ;;; cider-selector-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-stacktrace-tests.el b/test/cider-stacktrace-tests.el index f68eada4d..d531a32df 100644 --- a/test/cider-stacktrace-tests.el +++ b/test/cider-stacktrace-tests.el @@ -1,6 +1,6 @@ ;;; cider-stacktrace-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-test-tests.el b/test/cider-test-tests.el index d56409175..4e636407f 100644 --- a/test/cider-test-tests.el +++ b/test/cider-test-tests.el @@ -1,6 +1,6 @@ ;;; cider-test-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2023 Bozhidar Batsov +;; Copyright © 2023-2024 Bozhidar Batsov ;; Author: Bozhidar Batsov diff --git a/test/cider-tests--no-auto.el b/test/cider-tests--no-auto.el index b76c7e8aa..9a5851a95 100644 --- a/test/cider-tests--no-auto.el +++ b/test/cider-tests--no-auto.el @@ -1,6 +1,6 @@ ;;; cider-tests--no-auto.el --- Non-automated tests -*- lexical-binding: t -*- -;; Copyright © 2014-2023 Jeff Valk, Bozhidar Batsov and CIDER contributors +;; Copyright © 2014-2024 Jeff Valk, Bozhidar Batsov and CIDER contributors ;; Author: Jeff Valk diff --git a/test/cider-tests.el b/test/cider-tests.el index fa0541f5d..4891c1864 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -1,6 +1,6 @@ ;;; cider-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/cider-util-tests.el b/test/cider-util-tests.el index d8997be85..543cb2e30 100644 --- a/test/cider-util-tests.el +++ b/test/cider-util-tests.el @@ -1,6 +1,6 @@ ;;; cider-util-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/enrich/cider-docstring-tests.el b/test/enrich/cider-docstring-tests.el index 04cc8f7f7..fa5de1709 100644 --- a/test/enrich/cider-docstring-tests.el +++ b/test/enrich/cider-docstring-tests.el @@ -1,7 +1,7 @@ ;; -*- lexical-binding: t; -*- ;;; cider-docstring-tests.el -;; Copyright © 2012-2023 Bozhidar Batsov +;; Copyright © 2012-2024 Bozhidar Batsov ;; Author: Bozhidar Batsov diff --git a/test/integration/integration-test-utils.el b/test/integration/integration-test-utils.el index 4f552663d..e31c757d3 100644 --- a/test/integration/integration-test-utils.el +++ b/test/integration/integration-test-utils.el @@ -1,6 +1,6 @@ ;;; integration-test-utils.el -*- lexical-binding: t; -*- -;; Copyright © 2022-2023 Ioannis Kappas +;; Copyright © 2022-2024 Ioannis Kappas ;; This file is NOT part of GNU Emacs. diff --git a/test/integration/integration-tests.el b/test/integration/integration-tests.el index c4ddf8cba..a2dac08c0 100644 --- a/test/integration/integration-tests.el +++ b/test/integration/integration-tests.el @@ -1,6 +1,6 @@ ;;; integration-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2022-2023 Ioannis Kappas +;; Copyright © 2022-2024 Ioannis Kappas ;; This file is NOT part of GNU Emacs. diff --git a/test/nrepl-bencode-tests.el b/test/nrepl-bencode-tests.el index 1960cd362..cb7b7d2ac 100644 --- a/test/nrepl-bencode-tests.el +++ b/test/nrepl-bencode-tests.el @@ -1,6 +1,6 @@ ;;; nrepl-bencode-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/nrepl-client-tests.el b/test/nrepl-client-tests.el index bb5775eb4..43c776e95 100644 --- a/test/nrepl-client-tests.el +++ b/test/nrepl-client-tests.el @@ -1,6 +1,6 @@ ;;; nrepl-client-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/nrepl-dict-tests.el b/test/nrepl-dict-tests.el index e7b1bb140..5337eec0d 100644 --- a/test/nrepl-dict-tests.el +++ b/test/nrepl-dict-tests.el @@ -1,6 +1,6 @@ ;;; nrepl-dict-tests.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/nrepl-server-mock.el b/test/nrepl-server-mock.el index 54643c083..4f5c96d66 100644 --- a/test/nrepl-server-mock.el +++ b/test/nrepl-server-mock.el @@ -1,6 +1,6 @@ ;; nrepl-server-mock.el -*- lexical-binding: t; -*- -;; Copyright © 2021-2023 Ioannis Kappas +;; Copyright © 2021-2024 Ioannis Kappas ;; This file is NOT part of GNU Emacs. diff --git a/test/utils/cider-connection-test-utils.el b/test/utils/cider-connection-test-utils.el index d181402f2..c6d8a1f7d 100644 --- a/test/utils/cider-connection-test-utils.el +++ b/test/utils/cider-connection-test-utils.el @@ -1,6 +1,6 @@ ;;; cider-connection-test-utils.el -*- lexical-binding: t; -*- -;; Copyright © 2012-2023 Tim King, Bozhidar Batsov +;; Copyright © 2012-2024 Tim King, Bozhidar Batsov ;; Author: Tim King ;; Bozhidar Batsov diff --git a/test/utils/nrepl-tests-utils.el b/test/utils/nrepl-tests-utils.el index ca3b9cc00..956fd91ab 100644 --- a/test/utils/nrepl-tests-utils.el +++ b/test/utils/nrepl-tests-utils.el @@ -1,6 +1,6 @@ ;;; nrepl-test-utils.el -*- lexical-binding: t; -*- -;; Copyright © 2021-2023 Ioannis Kappas +;; Copyright © 2021-2024 Ioannis Kappas ;; This file is NOT part of GNU Emacs. From d541bc145fe760866e9d47b1a60784a2da272427 Mon Sep 17 00:00:00 2001 From: Carsten Behring Date: Sat, 4 Nov 2023 21:50:32 +0100 Subject: [PATCH 032/212] Update up_and_running.adoc An other way to express the limit of cider-jack-in --- doc/modules/ROOT/pages/basics/up_and_running.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index c8e17cc31..6401ebe45 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -41,6 +41,12 @@ CIDER figures out this by parsing the output from the command and waiting for a TIP: You can see the exact command that `cider-jack-in` invoked in your minibuffer, while waiting for nREPL to start. You can also find this command in Emacs's `+*Messages*+` buffer. +IMPORTANT: `cider-jack-in` is mainly designed for local development with files on a local machine and +the nREPL process running on the same machine. It has as well features to support various remote / container +scenarious, see below. Due to the large variation of remote scenarious it cannot support all of them, +so in some cases a manual nREPL start and usage of `cider-connect` is needed. + + In some cases one project might have multiple project markers in it - e.g. `project.clj` and `deps.edn`. When this happens CIDER will prompt you to select the build tool to use. You can override this behavior by setting the variable `cider-preferred-build-tool`. While you can set it globally in your Emacs config, From 24b060ab8ac28922b0dddeed104572e98fc8a6ea Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 3 Jan 2024 19:41:02 +0200 Subject: [PATCH 033/212] Tweak some wording --- doc/modules/ROOT/pages/basics/up_and_running.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 6401ebe45..394da058f 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -41,12 +41,6 @@ CIDER figures out this by parsing the output from the command and waiting for a TIP: You can see the exact command that `cider-jack-in` invoked in your minibuffer, while waiting for nREPL to start. You can also find this command in Emacs's `+*Messages*+` buffer. -IMPORTANT: `cider-jack-in` is mainly designed for local development with files on a local machine and -the nREPL process running on the same machine. It has as well features to support various remote / container -scenarious, see below. Due to the large variation of remote scenarious it cannot support all of them, -so in some cases a manual nREPL start and usage of `cider-connect` is needed. - - In some cases one project might have multiple project markers in it - e.g. `project.clj` and `deps.edn`. When this happens CIDER will prompt you to select the build tool to use. You can override this behavior by setting the variable `cider-preferred-build-tool`. While you can set it globally in your Emacs config, @@ -58,6 +52,12 @@ most of the time you'd probably want to have a project-specific setting for it i (cider-preferred-build-tool . lein))) ---- +NOTE: `cider-jack-in` is mainly designed for local development (with files on a +local machine and the nREPL process running on the same machine). It does support +various common remote/container scenarios, as documented later in this section. Due +to the large variation of remote scenarios it cannot support all of them, so in +some cases a manual nREPL start and usage of `cider-connect` might be a better option. + === Auto-Injecting Dependencies While CIDER's core functionality requires nothing more than an nREPL server, From 66d091a1d6005cc284ed4cd325675ed6b2bedc3f Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 14 Jan 2024 23:46:56 +0100 Subject: [PATCH 034/212] Use cider-nrepl 0.45.0 https://github.com/clojure-emacs/cider-nrepl/blob/v0.45.0/CHANGELOG.md#0450-2024-01-14 --- CHANGELOG.md | 6 +++ cider-log.el | 2 +- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/about/compatibility.adoc | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- doc/modules/ROOT/pages/debugging/logging.adoc | 3 +- test/cider-tests.el | 44 +++++++++---------- 12 files changed, 44 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5976fc3e0..3f42e0fd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,14 @@ ### Changes - [#3588](https://github.com/clojure-emacs/cider/issues/3588): Compatibility with pwsh 7.3 quoting rules. +- Introduce the `cider-log-show` function. + - Please refer to the (slightly revamped) [CIDER Log Mode guide](https://docs.cider.mx/cider/debugging/logging.html). - Bump the injected `enrich-classpath` to [1.19.0](https://github.com/clojure-emacs/enrich-classpath/compare/v1.18.6...v1.19.0). - Bump the `parseedn` required version to 1.2.1. +- Bump the injected `cider-nrepl` to [0.45.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.45.0/CHANGELOG.md#0450-2024-01-14). + - Introduces Timbre compatibility for [CIDER Log Mode](https://docs.cider.mx/cider/debugging/logging.html). + - Fixes JS completions for nested objects. + - Bundles other fixes and reliability improvements. ## 1.12.0 (2023-11-24) diff --git a/cider-log.el b/cider-log.el index b43eaa92e..188e88930 100644 --- a/cider-log.el +++ b/cider-log.el @@ -42,7 +42,7 @@ You may want to set this in .dir-locals.el, for a more streamlined setup. -Example value: \"Logback\"." +Example values: \"Logback\", \"Timbre\"." :group 'cider :package-version '(cider . "1.8.0") :safe #'stringp diff --git a/cider.el b/cider.el index e74b14d54..760adb8f6 100644 --- a/cider.el +++ b/cider.el @@ -527,7 +527,7 @@ the artifact.") (defconst cider-latest-clojure-version "1.10.1" "Latest supported version of Clojure.") -(defconst cider-required-middleware-version "0.44.0" +(defconst cider-required-middleware-version "0.45.0" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index 9a1c1e966..19ceb7886 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.44.0"]]) + :plugins [[cider/cider-nrepl "0.45.0"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index ff1d91caf..250307e1f 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.44.0"] + :plugins [[cider/cider-nrepl "0.45.0"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/about/compatibility.adoc b/doc/modules/ROOT/pages/about/compatibility.adoc index 6c7380bc9..da9ba09c1 100644 --- a/doc/modules/ROOT/pages/about/compatibility.adoc +++ b/doc/modules/ROOT/pages/about/compatibility.adoc @@ -166,7 +166,7 @@ Below you can find the official compatibility matrix for CIDER. | 1.0 | 0.44 | 8 -| 1.8 +| 1.9 |=== diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 71b252eaa..91fca0b13 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.44.0"]] +:plugins [[cider/cider-nrepl "0.45.0"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.44.0"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.45.0"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.44.0"]]) + concat '[[cider/cider-nrepl "0.45.0"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.44.0"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.45.0"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.44.0"} + cider/cider-nrepl {:mvn/version "0.45.0"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.44.0' + devImplementation 'cider:cider-nrepl:0.45.0' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 394da058f..95653307c 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.44.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.45.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -318,7 +318,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.44.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.45.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index 1f1729ca9..244d33054 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.44.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.45.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index aa027f704..c8c14630a 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.44.0' + devImplementation 'cider:cider-nrepl:0.45.0' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/doc/modules/ROOT/pages/debugging/logging.adoc b/doc/modules/ROOT/pages/debugging/logging.adoc index e061b3e78..d7d72af61 100644 --- a/doc/modules/ROOT/pages/debugging/logging.adoc +++ b/doc/modules/ROOT/pages/debugging/logging.adoc @@ -155,6 +155,7 @@ At the moment the following log frameworks are supported: - https://docs.oracle.com/en/java/javase/19/core/java-logging-overview.html[Java Util Logging] - https://logback.qos.ch[Logback] +- https://github.com/taoensso/timbre[Timbre] There is some https://github.com/clojure-emacs/logjam/issues/2[work in progress] to support https://logging.apache.org/log4j/2.x/[Log4j] as @@ -163,8 +164,6 @@ https://stackoverflow.com/a/17842174/12711900[difficulties] with configuration changes made at runtime, which are wiped out by the Log4j2 reconfiguration mechanism. -Timbre support is WIP as well. - TIP: If your logging framework of choice is not currently supported by CIDER Log Mode, you can opt to use Clojure's official `tools.logging` façade in your project, such that you can locally, unobstrusively tell it to use a supported framework (like Logback) instead of your project's default one. diff --git a/test/cider-tests.el b/test/cider-tests.el index 4891c1864..a3814b82c 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.44.0") + (setq-local cider-injected-middleware-version "0.45.0") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -154,7 +154,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -167,7 +167,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -179,7 +179,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -192,7 +192,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.44.0") + (shell-quote-argument "cider/cider-nrepl:0.45.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -201,7 +201,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.44.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.45.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -218,7 +218,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -231,7 +231,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.44.0") + (shell-quote-argument "cider/cider-nrepl:0.45.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -253,7 +253,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -264,7 +264,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.44.0") + (shell-quote-argument "cider/cider-nrepl:0.45.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -272,7 +272,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.44.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.45.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -287,14 +287,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.44.0")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.45.0")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.44.0"))) + :to-equal '(("cider/cider-nrepl" "0.45.0"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -323,7 +323,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.44.0") + ("cider/cider-nrepl" "0.45.0") ("mx.cider/lein-enrich-classpath" "1.19.0"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -334,7 +334,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.44.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -352,7 +352,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.44.0") + (shell-quote-argument "cider/cider-nrepl:0.45.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -447,7 +447,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.44.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.45.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -461,7 +461,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.44.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.45.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -478,7 +478,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.44.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.45.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -488,7 +488,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.44.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.45.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -516,7 +516,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.44.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.45.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.44.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.45.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 9f7e55b08af9256213d90ce2d6492e98db854f2a Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 14 Jan 2024 23:51:45 +0100 Subject: [PATCH 035/212] 1.13.0 --- CHANGELOG.md | 2 ++ cider.el | 4 ++-- doc/antora.yml | 2 +- doc/modules/ROOT/pages/about/compatibility.adoc | 7 +++++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f42e0fd4..614d8d510 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master (unreleased) +## 1.13.0 (2024-01-14) + ### Changes - [#3588](https://github.com/clojure-emacs/cider/issues/3588): Compatibility with pwsh 7.3 quoting rules. diff --git a/cider.el b/cider.el index 760adb8f6..a70a16877 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.13.0-snapshot +;; Version: 1.13.0 ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.13.0-snapshot" +(defconst cider-version "1.13.0" "The current version of CIDER.") (defconst cider-codename "Split" diff --git a/doc/antora.yml b/doc/antora.yml index fd9dacd59..d4ed04e93 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: ~ +version: 1.13 nav: - modules/ROOT/nav.adoc diff --git a/doc/modules/ROOT/pages/about/compatibility.adoc b/doc/modules/ROOT/pages/about/compatibility.adoc index da9ba09c1..5eec32e82 100644 --- a/doc/modules/ROOT/pages/about/compatibility.adoc +++ b/doc/modules/ROOT/pages/about/compatibility.adoc @@ -168,6 +168,13 @@ Below you can find the official compatibility matrix for CIDER. | 8 | 1.9 +| 1.13 +| 26.1 +| 1.0 +| 0.44 +| 8 +| 1.9 + |=== TIP: You can also check the requirements of a particular CIDER version by inspecting From 8a223accffaaea9cb83a2e0ea5c515a9680d7a98 Mon Sep 17 00:00:00 2001 From: vemv Date: Mon, 15 Jan 2024 00:20:42 +0100 Subject: [PATCH 036/212] Update `cider-codename` --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index a70a16877..9a496bb9e 100644 --- a/cider.el +++ b/cider.el @@ -96,7 +96,7 @@ (defconst cider-version "1.13.0" "The current version of CIDER.") -(defconst cider-codename "Split" +(defconst cider-codename "Santiago" "Codename used to denote stable releases.") (defcustom cider-lein-command From 7272ee4fffe85c187becc9e418ff534b4925c3ab Mon Sep 17 00:00:00 2001 From: vemv Date: Mon, 15 Jan 2024 00:21:48 +0100 Subject: [PATCH 037/212] 1.14.0-snapshot --- cider.el | 4 ++-- doc/antora.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cider.el b/cider.el index 9a496bb9e..23eafacbd 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.13.0 +;; Version: 1.14.0-snapshot ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.13.0" +(defconst cider-version "1.14.0-snapshot" "The current version of CIDER.") (defconst cider-codename "Santiago" diff --git a/doc/antora.yml b/doc/antora.yml index d4ed04e93..fd9dacd59 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: 1.13 +version: ~ nav: - modules/ROOT/nav.adoc From 21cdfeb62035154519cf9811b217487b6219915f Mon Sep 17 00:00:00 2001 From: vemv Date: Mon, 15 Jan 2024 13:07:12 +0100 Subject: [PATCH 038/212] logging.adoc: add a note about Timbre compatibility --- doc/modules/ROOT/pages/debugging/logging.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/modules/ROOT/pages/debugging/logging.adoc b/doc/modules/ROOT/pages/debugging/logging.adoc index d7d72af61..02ff10ba9 100644 --- a/doc/modules/ROOT/pages/debugging/logging.adoc +++ b/doc/modules/ROOT/pages/debugging/logging.adoc @@ -157,6 +157,8 @@ At the moment the following log frameworks are supported: - https://logback.qos.ch[Logback] - https://github.com/taoensso/timbre[Timbre] +NOTE: if you choose Timbre, please make sure that your project's version roughly matches https://github.com/clojure-emacs/logjam/blob/master/project.clj[Logjam]'s expected version - otherwise incompatible changes may make Timbre not appear available as a CIDER Log Mode framework option. + There is some https://github.com/clojure-emacs/logjam/issues/2[work in progress] to support https://logging.apache.org/log4j/2.x/[Log4j] as well, but there are some From f7f8e2c5beec0d0d4b22859328312c5ad4b9a872 Mon Sep 17 00:00:00 2001 From: vemv Date: Wed, 17 Jan 2024 15:47:01 +0100 Subject: [PATCH 039/212] Avoid `cider--error-phase-of-last-exception` recursive loop (#3607) Fixes #3605 --- CHANGELOG.md | 4 ++++ cider-eval.el | 52 +++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 614d8d510..e0abe2391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Bugs fixed + +- [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop. + ## 1.13.0 (2024-01-14) ### Changes diff --git a/cider-eval.el b/cider-eval.el index c14ab4c38..240f2762b 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -764,7 +764,8 @@ and ON-SUCCESS-CALLBACK an optional callback. The handler simply inserts the result value in BUFFER." (let ((eval-buffer (current-buffer)) (res "") - (failed nil)) + (failed nil) + (error-phase-requested nil)) ;; avoid requesting the phase more than once - can happen if there are errors during the phase nrepl sync request. (nrepl-make-response-handler (or buffer eval-buffer) ;; value handler: (lambda (_buffer value) @@ -781,7 +782,10 @@ The handler simply inserts the result value in BUFFER." (when (and source-buffer (listp bounds)) ;; if it's a list, it represents bounds, otherwise it's a string (code) and we can't display the overlay (with-current-buffer source-buffer - (let* ((phase (cider--error-phase-of-last-exception buffer)) + (let* ((phase (if error-phase-requested + nil + (setq error-phase-requested t) + (cider--error-phase-of-last-exception buffer))) (end (or (car-safe (cdr-safe bounds)) bounds)) (end (when end (copy-marker end)))) @@ -845,12 +849,16 @@ REPL buffer. This is controlled via (when-let ((conn (with-current-buffer buffer (cider-current-repl)))) (when (cider-nrepl-op-supported-p "analyze-last-stacktrace" conn) - (when-let* ((result (nrepl-send-sync-request (thread-last (map-merge 'list - '(("op" "analyze-last-stacktrace")) - (cider--nrepl-print-request-map fill-column)) - (seq-mapcat #'identity)) - conn))) - (nrepl-dict-get result "phase")))))) + (let ((nrepl-err-handler (lambda (&rest _))) ;; ignore any errors during this request to avoid any recursion + (nrepl-sync-request-timeout 4)) ;; ensure that this feature cannot possibly create an overly laggy UX + (when-let* ((result (nrepl-send-sync-request (thread-last (map-merge 'list + '(("op" "analyze-last-stacktrace")) + (cider--nrepl-print-request-map fill-column)) + (seq-mapcat #'identity)) + conn + 'abort-on-input ;; favor responsiveness over this feature, in case something went wrong. + ))) + (nrepl-dict-get result "phase"))))))) (defcustom cider-inline-error-message-function #'cider--shorten-error-message "A function that will shorten a given error message, @@ -905,17 +913,24 @@ when `cider-auto-inspect-after-eval' is non-nil." (beg (when beg (copy-marker beg))) (end (when end (copy-marker end))) (fringed nil) - (res "")) + (res "") + (error-phase-requested nil)) ;; avoid requesting the phase more than once - can happen if there are errors during the phase nrepl sync request. (nrepl-make-response-handler (or buffer eval-buffer) + ;; value handler: (lambda (_buffer value) (setq res (concat res value)) (cider--display-interactive-eval-result res 'value end)) + ;; stdout handler: (lambda (_buffer out) (cider-emit-interactive-eval-output out)) + ;; stderr handler: (lambda (buffer err) (cider-emit-interactive-eval-err-output err) - (let ((phase (cider--error-phase-of-last-exception buffer))) + (let ((phase (if error-phase-requested + nil + (setq error-phase-requested t) + (cider--error-phase-of-last-exception buffer)))) (cider--maybe-display-error-as-overlay phase err end) @@ -927,6 +942,7 @@ when `cider-auto-inspect-after-eval' is non-nil." ;; the error is 'right there' in the current line ;; and needs no jumping: phase))) + ;; done handler: (lambda (buffer) (if beg (unless fringed @@ -946,7 +962,8 @@ when `cider-auto-inspect-after-eval' is non-nil." "Make a load file handler for BUFFER. Optional argument DONE-HANDLER lambda will be run once load is complete." (let ((eval-buffer (current-buffer)) - (res "")) + (res "") + (error-phase-requested nil)) ;; avoid requesting the phase more than once - can happen if there are errors during the phase nrepl sync request. (nrepl-make-response-handler (or buffer eval-buffer) (lambda (buffer value) (cider--display-interactive-eval-result value 'value) @@ -963,7 +980,10 @@ Optional argument DONE-HANDLER lambda will be run once load is complete." ;; 1.- Jump to the error line: (cider-handle-compilation-errors err eval-buffer) (with-current-buffer eval-buffer - (let* ((phase (cider--error-phase-of-last-exception buffer)) + (let* ((phase (if error-phase-requested + nil + (setq error-phase-requested t) + (cider--error-phase-of-last-exception buffer))) ;; 2.- Calculate the overlay position, which is the point (per the previous jump), ;; and then end-of-line (for ensuring the overlay will be rendered properly): (end (save-excursion @@ -1072,7 +1092,8 @@ and SOURCE-BUFFER the original buffer This is used by pretty-printing commands." ;; NOTE: cider-eval-register behavior is not implemented here for performance reasons. ;; See https://github.com/clojure-emacs/cider/pull/3162 - (let ((chosen-buffer (or buffer (current-buffer)))) + (let ((chosen-buffer (or buffer (current-buffer))) + (error-phase-requested nil)) ;; avoid requesting the phase more than once - can happen if there are errors during the phase nrepl sync request. (nrepl-make-response-handler chosen-buffer ;; value handler: @@ -1087,7 +1108,10 @@ This is used by pretty-printing commands." (when (and source-buffer (listp bounds)) ;; if it's a list, it represents bounds, otherwise it's a string (code) and we can't display the overlay (with-current-buffer source-buffer - (let* ((phase (cider--error-phase-of-last-exception buffer)) + (let* ((phase (if error-phase-requested + nil + (setq error-phase-requested t) + (cider--error-phase-of-last-exception buffer))) (end (or (car-safe (cdr-safe bounds)) bounds)) (end (when end (copy-marker end)))) From 60c9cea54315b08fb129cb57db5ade70ae28371a Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 21 Jan 2024 22:04:16 +0100 Subject: [PATCH 040/212] Don't void `nrepl-err-handler` (#3609) This was an extra measure included as part of https://github.com/clojure-emacs/cider/pull/3607 It resulted in `*cider-error*` not being shown, in certain scenarios. That particular measure wasn't critical in avoiding the issue tackled in that PR. --- cider-eval.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 240f2762b..723c9dcd1 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -849,8 +849,7 @@ REPL buffer. This is controlled via (when-let ((conn (with-current-buffer buffer (cider-current-repl)))) (when (cider-nrepl-op-supported-p "analyze-last-stacktrace" conn) - (let ((nrepl-err-handler (lambda (&rest _))) ;; ignore any errors during this request to avoid any recursion - (nrepl-sync-request-timeout 4)) ;; ensure that this feature cannot possibly create an overly laggy UX + (let ((nrepl-sync-request-timeout 4)) ;; ensure that this feature cannot possibly create an overly laggy UX (when-let* ((result (nrepl-send-sync-request (thread-last (map-merge 'list '(("op" "analyze-last-stacktrace")) (cider--nrepl-print-request-map fill-column)) From 7a83b0843cd67689c7c6b4813b23686bbc53403d Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 29 Jan 2024 15:25:10 +0200 Subject: [PATCH 041/212] Don't pass `:same` if context string hasn't changed (#3614) This has been a quite awkward premature optimization that turned up to be unnecessary. The support for it had been broken in Compliment 0.5.1. --- CHANGELOG.md | 1 + cider-completion-context.el | 28 ++++++++++---------------- test/cider-completion-context-tests.el | 9 ++++++++- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0abe2391..283fe107e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Bugs fixed - [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop. +- [#3613](https://github.com/clojure-emacs/cider/issues/3613): adapt `cider-completion-context.el` to upstream changes in Compliment. ## 1.13.0 (2024-01-14) diff --git a/cider-completion-context.el b/cider-completion-context.el index 1a72fa391..3ebbf203f 100644 --- a/cider-completion-context.el +++ b/cider-completion-context.el @@ -96,27 +96,21 @@ form, with symbol at point replaced by __prefix__." "__prefix__" (substring context (- pref-end expr-start))))))) -(defvar cider-completion-last-context nil) - (defun cider-completion-get-context (&optional info) "Extract context depending (maybe of INFO type). Output depends on `cider-completion-use-context' and the current major mode." - (let ((context (if cider-completion-use-context - ;; We use ignore-errors here since grabbing the context - ;; might fail because of unbalanced parens, or other - ;; technical reasons, yet we don't want to lose all - ;; completions and throw error to user because of that. - (or (ignore-errors - (if info - (cider-completion-get-info-context-at-point) - (cider-completion-get-context-at-point))) - "nil") - "nil"))) - (if (string= cider-completion-last-context context) - ":same" - (setq cider-completion-last-context context) - context))) + (if cider-completion-use-context + ;; We use ignore-errors here since grabbing the context + ;; might fail because of unbalanced parens, or other + ;; technical reasons, yet we don't want to lose all + ;; completions and throw error to user because of that. + (or (ignore-errors + (if info + (cider-completion-get-info-context-at-point) + (cider-completion-get-context-at-point))) + "nil") + "nil")) (provide 'cider-completion-context) ;;; cider-completion-context.el ends here diff --git a/test/cider-completion-context-tests.el b/test/cider-completion-context-tests.el index aac6fcf9c..e1e970451 100644 --- a/test/cider-completion-context-tests.el +++ b/test/cider-completion-context-tests.el @@ -45,4 +45,11 @@ (it "Returns different things depending on the :info param" (with-clojure-buffer "user> (.foo|bar \"\")" (expect (cider-completion-get-context) :to-equal "(__prefix__bar \"\")") - (expect (cider-completion-get-info-context-at-point) :to-equal "(__prefix__ \"\")")))))) + (expect (cider-completion-get-info-context-at-point) :to-equal "(__prefix__ \"\")"))))) + + (it "Returns the same context when invoked twice at the same place" + (with-clojure-buffer "(ns foo) + +(.foo| \"\")" + (expect (cider-completion-get-context) :to-equal "(__prefix__ \"\")") + (expect (cider-completion-get-context) :to-equal "(__prefix__ \"\")")))) From 9fb72b30abe1bed6451f25f238002ce5a44f804c Mon Sep 17 00:00:00 2001 From: vemv Date: Thu, 1 Feb 2024 16:14:38 +0100 Subject: [PATCH 042/212] Introduce `cider-clojure-runtime-error-regexp` --- cider-eval.el | 33 +++++++++++++++++++++++- test/cider-error-parsing-tests.el | 42 +++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/cider-eval.el b/cider-eval.el index 723c9dcd1..391f778b9 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -567,7 +567,10 @@ It delegates the actual error content to the eval or op handler." ;; old and the new format, by utilizing a combination of two different regular ;; expressions. -(defconst cider-clojure-1.10--location `("at (" +(defconst cider-clojure-1.10--location `((or "at (" + (sequence "at " + (minimal-match (one-or-more anything)) ;; the fully-qualified name of the function that triggered the error + " (")) (group-n 2 (minimal-match (zero-or-more anything))) ":" (group-n 3 (one-or-more digit)) @@ -626,6 +629,34 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" \"Syntax error compiling at (src/workspace_service.clj:227:3).\" \"Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\"") +(defconst cider--clojure-execution-error-regexp + (append `(sequence + "Execution error " + (or (sequence "(" + (minimal-match (one-or-more anything)) + ")") + (minimal-match (zero-or-more anything)))) + cider-clojure-1.10--location)) + +(defconst cider--clojure-spec-execution-error-regexp + (append `(sequence + "Execution error - invalid arguments to " + (minimal-match (one-or-more anything)) + " ") + cider-clojure-1.10--location)) + +(defconst cider-clojure-runtime-error-regexp + (eval + `(rx bol (or ,cider--clojure-execution-error-regexp + ,cider--clojure-spec-execution-error-regexp)) + t) + "Matches runtime errors, as oppsed to compile-time/macroexpansion-time errors. + +A few example values that will match: + +\"Execution error (ArithmeticException) at foo/foo (src/haystack/parser.cljc:4).\" +\"Execution error - invalid arguments to foo/bar at (src/haystack/parser.cljc:4).\"") + (defconst cider-module-info-regexp (rx " (" (minimal-match (one-or-more anything)) diff --git a/test/cider-error-parsing-tests.el b/test/cider-error-parsing-tests.el index 583e92b92..00ab7264d 100644 --- a/test/cider-error-parsing-tests.el +++ b/test/cider-error-parsing-tests.el @@ -143,6 +143,48 @@ (match-string 2 clojure-1.10-compiler-error)) :to-equal "src/haystack/parser.cljc")))) +(describe "cider-clojure-runtime-error-regexp" + (it "Recognizes a clojure-1.10 runtime error message" + + ;; Something like "(ArithmeticException)" will be absent for Exception and RuntimeException in particular + (let ((specimen "Execution error at foo/foo (src/haystack/parser.cljc:4).")) + (expect specimen :to-match cider-clojure-runtime-error-regexp) + (expect (progn + (string-match cider-clojure-runtime-error-regexp specimen) + (match-string 2 specimen)) + :to-equal "src/haystack/parser.cljc")) + + (let ((specimen "Execution error (ArithmeticException) at foo/foo (src/haystack/parser.cljc:4).")) + (expect specimen :to-match cider-clojure-runtime-error-regexp) + (expect (progn + (string-match cider-clojure-runtime-error-regexp specimen) + (match-string 2 specimen)) + :to-equal "src/haystack/parser.cljc")) + + ;; without foo/foo symbol + (let ((specimen "Execution error at (src/haystack/parser.cljc:4).")) + (expect specimen :to-match cider-clojure-runtime-error-regexp) + (expect (progn + (string-match cider-clojure-runtime-error-regexp specimen) + (match-string 2 specimen)) + :to-equal "src/haystack/parser.cljc")) + + ;; without foo/foo symbol + (let ((specimen "Execution error (ArithmeticException) at (src/haystack/parser.cljc:4).")) + (expect specimen :to-match cider-clojure-runtime-error-regexp) + (expect (progn + (string-match cider-clojure-runtime-error-regexp specimen) + (match-string 2 specimen)) + :to-equal "src/haystack/parser.cljc"))) + + (it "Recognizes a clojure-1.10 runtime spec validation error message" + (let ((specimen "Execution error - invalid arguments to foo/bar at (src/haystack/parser.cljc:4).")) + (expect specimen :to-match cider-clojure-runtime-error-regexp) + (expect (progn + (string-match cider-clojure-runtime-error-regexp specimen) + (match-string 2 specimen)) + :to-equal "src/haystack/parser.cljc")))) + (describe "cider-module-info-regexp" (it "Matches module info provided by Java" (expect " (java.lang.Long is in module java.base of loader 'bootstrap'; clojure.lang.IObj is in unnamed module of loader 'app')" From d7c7d994548efff6e32e664236ed79158d8d9a09 Mon Sep 17 00:00:00 2001 From: vemv Date: Thu, 1 Feb 2024 16:28:11 +0100 Subject: [PATCH 043/212] Avoid overlays and `message`s on stderr that is unrelated to exception handling Fixes #3587 --- CHANGELOG.md | 1 + cider-eval.el | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 283fe107e..b62dad31b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop. - [#3613](https://github.com/clojure-emacs/cider/issues/3613): adapt `cider-completion-context.el` to upstream changes in Compliment. +- [#3587](https://github.com/clojure-emacs/cider/issues/3587): avoid overlays and `message`s on stderr that is unrelated to exception handling. ## 1.13.0 (2024-01-14) diff --git a/cider-eval.el b/cider-eval.el index 391f778b9..3dcaeef72 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -913,13 +913,16 @@ and the suffix matched by `cider-module-info-regexp'." (defun cider--maybe-display-error-as-overlay (phase err end) "Possibly display ERR as an overlay honoring END, depending on the PHASE." - (when (or - ;; if we won't show *cider-error*, because of configuration, the overlay is adequate because it compensates for the lack of info in a compact manner: - (not cider-show-error-buffer) - (not (cider-connection-has-capability-p 'jvm-compilation-errors)) - ;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate: - (and cider-show-error-buffer - (member phase (cider-clojure-compilation-error-phases)))) + (when (and (or + ;; if we won't show *cider-error*, because of configuration, the overlay is adequate because it compensates for the lack of info in a compact manner: + (not cider-show-error-buffer) + (not (cider-connection-has-capability-p 'jvm-compilation-errors)) + ;; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate: + (and cider-show-error-buffer + (member phase (cider-clojure-compilation-error-phases)))) + ;; Only show overlays for things that do look like an exception (#3587): + (or (string-match-p cider-clojure-runtime-error-regexp err) + (string-match-p cider-clojure-compilation-regexp err))) ;; Display errors as temporary overlays (let ((cider-result-use-clojure-font-lock nil) (trimmed-err (funcall cider-inline-error-message-function err))) From 213576eb6c9a0fdc86f247022f74eb1e2d557bf1 Mon Sep 17 00:00:00 2001 From: vemv Date: Thu, 1 Feb 2024 17:15:03 +0100 Subject: [PATCH 044/212] Exclude reflection warnings from error overlays --- cider-eval.el | 19 ++++++++++++++- test/cider-error-parsing-tests.el | 39 ++++++++++++++++--------------- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 3dcaeef72..5cec76a79 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -615,6 +615,8 @@ It delegates the actual error content to the eval or op handler." (optional ":" (group-n 4 (one-or-more digit))) " - ")) +;; Please keep this in sync with `cider-clojure-compilation-error-regexp', +;; which is a subset of these regexes. (defconst cider-clojure-compilation-regexp (eval `(rx bol (or ,cider-clojure-1.9-error @@ -629,6 +631,21 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" \"Syntax error compiling at (src/workspace_service.clj:227:3).\" \"Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\"") +(defconst cider-clojure-compilation-error-regexp + (eval + `(rx bol (or ,cider-clojure-1.9-error + ,cider-clojure-1.10-error + ,cider-clojure-unexpected-error)) + t) + "Like `cider-clojure-compilation-regexp', +but excluding warnings such as reflection warnings. + +A few example values that will match: +\"CompilerException java.lang.RuntimeException: Unable to resolve symbol: \\ +lol in this context, compiling:(/foo/core.clj:10:1)\" +\"Syntax error compiling at (src/workspace_service.clj:227:3).\" +\"Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\"") + (defconst cider--clojure-execution-error-regexp (append `(sequence "Execution error " @@ -922,7 +939,7 @@ depending on the PHASE." (member phase (cider-clojure-compilation-error-phases)))) ;; Only show overlays for things that do look like an exception (#3587): (or (string-match-p cider-clojure-runtime-error-regexp err) - (string-match-p cider-clojure-compilation-regexp err))) + (string-match-p cider-clojure-compilation-error-regexp err))) ;; Display errors as temporary overlays (let ((cider-result-use-clojure-font-lock nil) (trimmed-err (funcall cider-inline-error-message-function err))) diff --git a/test/cider-error-parsing-tests.el b/test/cider-error-parsing-tests.el index 00ab7264d..e28f65e59 100644 --- a/test/cider-error-parsing-tests.el +++ b/test/cider-error-parsing-tests.el @@ -117,31 +117,32 @@ (expect (col-num info) :to-equal 43) (expect (face info) :to-equal 'cider-warning-highlight-face)))) -(describe "The cider compilation regex" +(describe "The cider compilation regexes" (it "Recognizes a clojure warning message" (let ((clojure-compiler-warning "Reflection warning, /tmp/foo/src/foo/core.clj:14:1 - call to java.lang.Integer ctor can't be resolved.")) (expect clojure-compiler-warning :to-match cider-clojure-compilation-regexp) (expect (progn (string-match cider-clojure-compilation-regexp clojure-compiler-warning) (match-string 1 clojure-compiler-warning)) :to-equal "warning"))) - (it "Recognizes a clojure-1.9 error message" - (let ((clojure-1.9-compiler-error "CompilerException java.lang.RuntimeException: Unable to resolve symbol: lol in this context, compiling:(/tmp/foo/src/foo/core.clj:10:1)")) - (expect clojure-1.9-compiler-error :to-match cider-clojure-compilation-regexp) - (expect (progn (string-match cider-clojure-compilation-regexp clojure-1.9-compiler-error) - (match-string 2 clojure-1.9-compiler-error)) - :to-equal "/tmp/foo/src/foo/core.clj"))) - (it "Recognizes a clojure-1.10 error message" - (let ((clojure-1.10-compiler-error "Syntax error compiling at (src/ardoq/service/workspace_service.clj:227:3).")) - (expect clojure-1.10-compiler-error :to-match cider-clojure-compilation-regexp) - (expect (progn (string-match cider-clojure-compilation-regexp clojure-1.10-compiler-error) - (match-string 2 clojure-1.10-compiler-error)) - :to-equal "src/ardoq/service/workspace_service.clj"))) - (it "Recognizes a clojure 'Unexpected error' message" - (let ((clojure-1.10-compiler-error "Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).")) - (expect clojure-1.10-compiler-error :to-match cider-clojure-compilation-regexp) - (expect (progn (string-match cider-clojure-compilation-regexp clojure-1.10-compiler-error) - (match-string 2 clojure-1.10-compiler-error)) - :to-equal "src/haystack/parser.cljc")))) + (dolist (regexp (list cider-clojure-compilation-regexp cider-clojure-compilation-error-regexp)) + (it "Recognizes a clojure-1.9 error message" + (let ((clojure-1.9-compiler-error "CompilerException java.lang.RuntimeException: Unable to resolve symbol: lol in this context, compiling:(/tmp/foo/src/foo/core.clj:10:1)")) + (expect clojure-1.9-compiler-error :to-match regexp) + (expect (progn (string-match regexp clojure-1.9-compiler-error) + (match-string 2 clojure-1.9-compiler-error)) + :to-equal "/tmp/foo/src/foo/core.clj"))) + (it "Recognizes a clojure-1.10 error message" + (let ((clojure-1.10-compiler-error "Syntax error compiling at (src/ardoq/service/workspace_service.clj:227:3).")) + (expect clojure-1.10-compiler-error :to-match regexp) + (expect (progn (string-match regexp clojure-1.10-compiler-error) + (match-string 2 clojure-1.10-compiler-error)) + :to-equal "src/ardoq/service/workspace_service.clj"))) + (it "Recognizes a clojure 'Unexpected error' message" + (let ((clojure-1.10-compiler-error "Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).")) + (expect clojure-1.10-compiler-error :to-match regexp) + (expect (progn (string-match regexp clojure-1.10-compiler-error) + (match-string 2 clojure-1.10-compiler-error)) + :to-equal "src/haystack/parser.cljc"))))) (describe "cider-clojure-runtime-error-regexp" (it "Recognizes a clojure-1.10 runtime error message" From 06dc45844ad05fe23fccb7dec1609404e3cda88e Mon Sep 17 00:00:00 2001 From: vemv Date: Thu, 1 Feb 2024 21:36:07 +0100 Subject: [PATCH 045/212] 1.13.1 --- CHANGELOG.md | 2 ++ cider.el | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b62dad31b..d3785bf55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master (unreleased) +## 1.13.1 (2024-02-01) + ### Bugs fixed - [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop. diff --git a/cider.el b/cider.el index 23eafacbd..86e7f10b9 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.14.0-snapshot +;; Version: 1.13.1 ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.14.0-snapshot" +(defconst cider-version "1.13.1" "The current version of CIDER.") (defconst cider-codename "Santiago" From aa26d62ac59930079e47e652ccd73e8e447defd5 Mon Sep 17 00:00:00 2001 From: vemv Date: Thu, 1 Feb 2024 21:38:45 +0100 Subject: [PATCH 046/212] 1.14.0-snapshot --- cider.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cider.el b/cider.el index 86e7f10b9..23eafacbd 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.13.1 +;; Version: 1.14.0-snapshot ;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.13.1" +(defconst cider-version "1.14.0-snapshot" "The current version of CIDER.") (defconst cider-codename "Santiago" From c0861efe4c199355e6c61be17d8251a80fc071f7 Mon Sep 17 00:00:00 2001 From: p4v4n Date: Tue, 13 Feb 2024 11:21:50 +0530 Subject: [PATCH 047/212] Update Eldev config (#3620) --- .circleci/config.yml | 4 ++-- Eldev | 5 +++-- Makefile | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ff4189d64..5e843a02f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,7 +48,7 @@ commands: steps: - run: name: Run Elisp-lint - command: eldev lint + command: eldev lint -c - run: name: Byte-compile .el files command: eldev -dtT compile --warnings-as-errors @@ -106,7 +106,7 @@ jobs: - run: name: Install Emacs latest command: | - choco install emacs + choco install emacs -y - setup-windows - test diff --git a/Eldev b/Eldev index 43a232c66..33656d2ea 100644 --- a/Eldev +++ b/Eldev @@ -1,8 +1,9 @@ -; -*- mode: emacs-lisp; lexical-binding: t; no-byte-compile: t -*- +; -*- mode: emacs-lisp; lexical-binding: t -*- -(eldev-require-version "0.6") +(eldev-require-version "1.8.2") (eldev-use-package-archive 'gnu) + ;; For compatibility; e.g. with MELPA Stable one test fails. (eldev-use-package-archive 'melpa-unstable) diff --git a/Makefile b/Makefile index 3c30afe99..2fc0ae757 100644 --- a/Makefile +++ b/Makefile @@ -7,13 +7,13 @@ # Remove byte-compilation artifacts, which can alter the result of the test suite: clean: - cd ~/.emacs.d; find . -type f -name "*.elc" -exec rm {} + + eldev clean # You can find a generic `eldev` installation script in https://github.com/emacs-eldev/eldev/blob/master/webinstall/eldev # (Don't use the one defined for CircleCI in your local machine) lint: clean - eldev lint + eldev lint -c # Checks for byte-compilation warnings. compile: clean From 66992f5b60b6ae5cdd7b1f38cc3cf1938e9e2f99 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 16 Feb 2024 10:09:03 +0200 Subject: [PATCH 048/212] [Docs] Extend the funding page --- doc/modules/ROOT/pages/contributing/funding.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/modules/ROOT/pages/contributing/funding.adoc b/doc/modules/ROOT/pages/contributing/funding.adoc index 4e782dff9..d5e343eb1 100644 --- a/doc/modules/ROOT/pages/contributing/funding.adoc +++ b/doc/modules/ROOT/pages/contributing/funding.adoc @@ -23,5 +23,7 @@ You can support the development of CIDER, https://github.com/clojure-emacs/cloju === Open Collective +People and companies supporting our collective will be featured on CIDER's README. + * https://opencollective.com/cider#backer[Become a backer] (for individuals) * https://opencollective.com/cider#sponsor[Become a sponsor] (for companies) From fd4862aa4433d04ec1e3ac50979c2a28f547b629 Mon Sep 17 00:00:00 2001 From: Danny Freeman Date: Mon, 11 Sep 2023 14:56:17 -0400 Subject: [PATCH 049/212] Add preliminary support for clojure-ts-mode This does NOT intended to break the dependency from cider to clojure-mode. It is intended to make CIDER work with clojure-ts-mode. Some functionality like clojure-find-ns, clojulore-find-def, etc will still require clojure-mode in order for CIDER to get it's work done. Adds util functions for checking if buffer is managed by a clojure mode --- CHANGELOG.md | 1 + cider-clojuredocs.el | 3 ++- cider-connection.el | 7 ++++--- cider-eval.el | 2 +- cider-mode.el | 22 ++++++++++++++++------ cider-ns.el | 2 +- cider-selector.el | 11 +++++++---- cider-util.el | 18 ++++++++++++++++-- cider.el | 33 +++++++++++++++++++++++---------- nrepl-client.el | 3 ++- 10 files changed, 73 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3785bf55..3180f5a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -155,6 +155,7 @@ but without connecting to the started nREPL server. - [#3352](https://github.com/clojure-emacs/cider/pull/3496): Introduce [`cider-eval-dwim`](https://docs.cider.mx/cider/usage/cider_mode.html#key-reference). - Add new customization variable [`cider-clojurec-eval-destination`](https://docs.cider.mx/cider/cljs/up_and_running.html#working-with-cljc-files) to allow specifying which REPL .cljc evals are sent to. - [#3354](https://github.com/clojure-emacs/cider/issues/3354): Add new customization variable [`cider-reuse-dead-repls`](https://docs.cider.mx/cider/usage/managing_connections.html#reusing-dead-repls) to control how dead REPL buffers are reused on new connections. +- Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) ### Bugs fixed diff --git a/cider-clojuredocs.el b/cider-clojuredocs.el index e8b7772cb..1c7af97c4 100644 --- a/cider-clojuredocs.el +++ b/cider-clojuredocs.el @@ -29,6 +29,7 @@ (require 'cider-common) (require 'subr-x) (require 'cider-popup) +(require 'cider-util) (require 'nrepl-dict) @@ -160,7 +161,7 @@ Prompts for the symbol to use, or uses the symbol at point, depending on the value of `cider-prompt-for-symbol'. With prefix arg ARG, does the opposite of what that option dictates." (interactive "P") - (when (derived-mode-p 'clojurescript-mode) + (when (cider-clojurescript-major-mode-p) (user-error "`cider-clojuredocs' doesn't support ClojureScript")) (funcall (cider-prompt-for-symbol-function arg) "ClojureDocs doc for" diff --git a/cider-connection.el b/cider-connection.el index 71213d858..598de4045 100644 --- a/cider-connection.el +++ b/cider-connection.el @@ -306,6 +306,7 @@ message in the REPL area." See command `cider-mode'." (interactive) (add-hook 'clojure-mode-hook #'cider-mode) + (add-hook 'clojure-ts-mode-hook #'cider-mode) (dolist (buffer (cider-util--clojure-buffers)) (with-current-buffer buffer (unless cider-mode @@ -800,9 +801,9 @@ multi. This function infers connection type based on the major mode. For the REPL type use the function `cider-repl-type'." (with-current-buffer (or buffer (current-buffer)) (cond - ((derived-mode-p 'clojurescript-mode) 'cljs) - ((derived-mode-p 'clojurec-mode) cider-clojurec-eval-destination) - ((derived-mode-p 'clojure-mode) 'clj) + ((cider-clojurescript-major-mode-p) 'cljs) + ((cider-clojurec-major-mode-p) cider-clojurec-eval-destination) + ((cider-clojure-major-mode-p) 'clj) (cider-repl-type)))) (defun cider-set-repl-type (&optional type) diff --git a/cider-eval.el b/cider-eval.el index 5cec76a79..b504e5b40 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -1572,7 +1572,7 @@ command `cider-debug-defun-at-point'." (interactive "P") (let ((inline-debug (eq 16 (car-safe debug-it)))) (when debug-it - (when (derived-mode-p 'clojurescript-mode) + (when (cider-clojurescript-major-mode-p) (when (y-or-n-p (concat "The debugger doesn't support ClojureScript yet, and we need help with that." " \nWould you like to read the Feature Request?")) (browse-url "https://github.com/clojure-emacs/cider/issues/1416")) diff --git a/cider-mode.el b/cider-mode.el index 06ec27734..c2d7f8281 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -550,14 +550,16 @@ higher precedence." (cider--menu-add-help-strings (symbol-value variable)))) map)) -;; This menu works as an easy entry-point into CIDER. Even if cider.el isn't -;; loaded yet, this will be shown in Clojure buffers next to the "Clojure" -;; menu. ;;;###autoload -(with-eval-after-load 'clojure-mode - (easy-menu-define cider-clojure-mode-menu-open clojure-mode-map +(defun cider--setup-menu-for-clojure-major-mode (mode-map) + "Setup a Cider menu for a Clojure major mode's MODE-MAP. + +This menu works as an easy entry-point into CIDER. Even if cider.el isn't +loaded yet, this will be shown in Clojure buffers next to the Clojure menu." + (easy-menu-define cider-clojure-mode-menu-open mode-map "Menu for Clojure mode. - This is displayed in `clojure-mode' buffers, if `cider-mode' is not active." + This is displayed in `clojure-mode' and `clojure-ts-mode' buffers, + if `cider-mode' is not active." `("CIDER" :visible (not cider-mode) ["Start a Clojure REPL" cider-jack-in-clj :help "Starts an nREPL server and connects a Clojure REPL to it."] @@ -572,6 +574,14 @@ higher precedence." "--" ["View user manual" cider-view-manual]))) +;;;###autoload +(with-eval-after-load 'clojure-mode + (cider--setup-menu-for-clojure-major-mode clojure-mode-map)) + +;;;###autoload +(with-eval-after-load 'clojure-ts-mode + (cider--setup-menu-for-clojure-major-mode clojure-ts-mode-map)) + ;;; Dynamic indentation (defcustom cider-dynamic-indentation t "Whether CIDER should aid Clojure(Script) indentation. diff --git a/cider-ns.el b/cider-ns.el index 1eb244775..9e938f36e 100644 --- a/cider-ns.el +++ b/cider-ns.el @@ -78,7 +78,7 @@ If t, save the files without confirmation." :group 'cider :package-version '(cider . "0.15.0")) -(defcustom cider-ns-save-files-on-refresh-modes '(clojure-mode) +(defcustom cider-ns-save-files-on-refresh-modes '(clojure-mode clojure-ts-mode) "Controls which files might be saved before refreshing. If a list of modes, any buffers visiting files on the classpath whose major mode is derived from any of the modes might be saved. diff --git a/cider-selector.el b/cider-selector.el index b70e1e8eb..a17aba3cf 100644 --- a/cider-selector.el +++ b/cider-selector.el @@ -49,15 +49,18 @@ DESCRIPTION is a one-line description of what the key selects.") Not meant to be set by users. It's used internally by `cider-selector'.") -(defun cider-selector--recently-visited-buffer (mode &optional consider-visible-p) - "Return the most recently visited buffer, deriving its `major-mode' from MODE. +(defun cider-selector--recently-visited-buffer (modes &optional consider-visible-p) + "Return the most recently visited buffer, deriving its `major-mode' from MODES. +MODES may be a symbol for a single mode, or a list of mode symbols. CONSIDER-VISIBLE-P will allow handling of visible windows as well. First pass only considers buffers that are not already visible. Second pass will attempt one of visible ones for scenarios where the window is visible, but not focused." (cl-loop for buffer in (buffer-list) when (and (with-current-buffer buffer - (derived-mode-p mode)) + (apply #'derived-mode-p (if (listp modes) + modes + (list modes)))) ;; names starting with space are considered hidden by Emacs (not (string-match-p "^ " (buffer-name buffer))) (or consider-visible-p @@ -134,7 +137,7 @@ is chosen. The returned buffer is selected with (def-cider-selector-method ?c "Most recently visited clojure-mode buffer." - (cider-selector--recently-visited-buffer 'clojure-mode)) + (cider-selector--recently-visited-buffer '(clojure-mode clojure-ts-mode))) (def-cider-selector-method ?e "Most recently visited emacs-lisp-mode buffer." diff --git a/cider-util.el b/cider-util.el index 741882e9e..0fa622e7c 100644 --- a/cider-util.el +++ b/cider-util.el @@ -57,10 +57,24 @@ Setting this to nil removes the fontification restriction." (maphash (lambda (k _v) (setq keys (cons k keys))) hashtable) keys)) +(defun cider-clojure-major-mode-p () + "Return non-nil if current buffer is managed by a Clojure major mode." + (derived-mode-p 'clojure-mode 'clojure-ts-mode)) + +(defun cider-clojurescript-major-mode-p () + "Return non-nil if current buffer is managed by a ClojureScript major mode." + (derived-mode-p 'clojurescript-mode 'clojurescript-ts-mode)) + +(defun cider-clojurec-major-mode-p () + "Return non-nil if current buffer is managed by a ClojureC major mode." + (derived-mode-p 'clojurec-mode 'clojurec-ts-mode)) + (defun cider-util--clojure-buffers () "Return a list of all existing `clojure-mode' buffers." (seq-filter - (lambda (buffer) (with-current-buffer buffer (derived-mode-p 'clojure-mode))) + (lambda (buffer) + (with-current-buffer buffer + (cider-clojure-major-mode-p))) (buffer-list))) (defun cider-current-dir () @@ -91,7 +105,7 @@ which nREPL uses for temporary evaluation file names." If BUFFER is provided act on that buffer instead." (with-current-buffer (or buffer (current-buffer)) - (or (derived-mode-p 'clojurec-mode)))) + (or (cider-clojurec-major-mode-p)))) ;;; Thing at point diff --git a/cider.el b/cider.el index 23eafacbd..0ba315444 100644 --- a/cider.el +++ b/cider.el @@ -2135,18 +2135,31 @@ alternative to the default is `cider-random-tip'." (add-hook 'cider-connected-hook #'cider--maybe-inspire-on-connect) +;;;###autoload +(defun cider--setup-clojure-major-mode (mode) + "Setup Cider key bindings and hooks for a Clojure major MODE." + (cl-flet ((concat-symbol (symbol suffix) + (intern (concat (symbol-name mode) suffix)))) + (let ((mode-map (eval (concat-symbol mode "-map")))) + (define-key mode-map (kbd "C-c M-x") #'cider) + (define-key mode-map (kbd "C-c M-j") #'cider-jack-in-clj) + (define-key mode-map (kbd "C-c M-J") #'cider-jack-in-cljs) + (define-key mode-map (kbd "C-c M-c") #'cider-connect-clj) + (define-key mode-map (kbd "C-c M-C") #'cider-connect-cljs) + (define-key mode-map (kbd "C-c C-x") 'cider-start-map) + (define-key mode-map (kbd "C-c C-s") 'sesman-map) + (require 'sesman) + (sesman-install-menu mode-map) + (add-hook (concat-symbol mode "-hook") + (lambda () (setq-local sesman-system 'CIDER)))))) + ;;;###autoload (with-eval-after-load 'clojure-mode - (define-key clojure-mode-map (kbd "C-c M-x") #'cider) - (define-key clojure-mode-map (kbd "C-c M-j") #'cider-jack-in-clj) - (define-key clojure-mode-map (kbd "C-c M-J") #'cider-jack-in-cljs) - (define-key clojure-mode-map (kbd "C-c M-c") #'cider-connect-clj) - (define-key clojure-mode-map (kbd "C-c M-C") #'cider-connect-cljs) - (define-key clojure-mode-map (kbd "C-c C-x") 'cider-start-map) - (define-key clojure-mode-map (kbd "C-c C-s") 'sesman-map) - (require 'sesman) - (sesman-install-menu clojure-mode-map) - (add-hook 'clojure-mode-hook (lambda () (setq-local sesman-system 'CIDER)))) + (cider--setup-clojure-major-mode 'clojure-mode)) + +;;;###autoload +(with-eval-after-load 'clojure-ts-mode + (cider--setup-clojure-major-mode 'clojure-ts-mode)) (provide 'cider) diff --git a/nrepl-client.el b/nrepl-client.el index d707b92f7..ed29fc8a1 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -77,6 +77,7 @@ (require 'sesman) (require 'tramp) +(require 'cider-util) ;;; Custom @@ -857,7 +858,7 @@ the corresponding type of response." value ns out err status id) (when (buffer-live-p buffer) (with-current-buffer buffer - (when (and ns (not (derived-mode-p 'clojure-mode))) + (when (and ns (not (cider-clojure-major-mode-p))) (cider-set-buffer-ns ns)))) (cond ((and content-type content-type-handler) (funcall content-type-handler buffer From c0bdf94a5e4c50128b7a31f29305b8aa9dfb8733 Mon Sep 17 00:00:00 2001 From: Danny Freeman Date: Tue, 12 Sep 2023 22:47:19 -0400 Subject: [PATCH 050/212] Address Linting warnings Address cl-flet lint warning ... with a simpler implementation of cider--setup-clojure-major-mode. Can't have cl-flet lint warnings if I don't use cl-flet. Add clojure-ts-mode dependency to Eldev Silence byte-compiler when optional clojure-ts-mode is not available The linter throws a warning when byte-compiling. Eldev doesn't support pulling in dependencies declared with `eldev-add-extra-dependencies` while running the `eldev compile` command. See https://emacs-eldev.github.io/eldev/#additional-dependencies This makes sense. If a user is byte compiling cider and they don't have clojure-ts-mode installed, they shouldn't see a byte compile warning for it. Make clojure-ts-mode dependency optional Tests will fail when using Emacs versions less than 29 because clojure-ts-mode requires Emacs 29 to work properly. That could be why tests fail in CI. This probably won't help with the linting issue --- Eldev | 1 + cider-mode.el | 4 +++- cider-selector.el | 4 ++-- cider.el | 35 +++++++++++++++++------------------ 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/Eldev b/Eldev index 33656d2ea..f0779a6e2 100644 --- a/Eldev +++ b/Eldev @@ -11,6 +11,7 @@ (eldev-add-loading-roots 'test "test/utils") (eldev-add-extra-dependencies 'runtime '(:package logview :optional t)) +(eldev-add-extra-dependencies 'runtime '(:package clojure-ts-mode :optional t)) ;; slightly increase the maximum (applies to checkdoc and the byte compiler alike) (setq byte-compile-docstring-max-column 100) diff --git a/cider-mode.el b/cider-mode.el index c2d7f8281..ceea16a42 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -580,7 +580,9 @@ loaded yet, this will be shown in Clojure buffers next to the Clojure menu." ;;;###autoload (with-eval-after-load 'clojure-ts-mode - (cider--setup-menu-for-clojure-major-mode clojure-ts-mode-map)) + (cider--setup-menu-for-clojure-major-mode + (with-suppressed-warnings ((free-vars clojure-ts-mode-map)) + clojure-ts-mode-map))) ;;; Dynamic indentation (defcustom cider-dynamic-indentation t diff --git a/cider-selector.el b/cider-selector.el index a17aba3cf..ec4a6503d 100644 --- a/cider-selector.el +++ b/cider-selector.el @@ -67,8 +67,8 @@ is visible, but not focused." (null (get-buffer-window buffer 'visible)))) return buffer finally (if consider-visible-p - (error "Can't find unshown buffer in %S" mode) - (cider-selector--recently-visited-buffer mode t)))) + (error "Can't find unshown buffer in %S" modes) + (cider-selector--recently-visited-buffer modes t)))) ;;;###autoload (defun cider-selector (&optional other-window) diff --git a/cider.el b/cider.el index 0ba315444..282ba74f2 100644 --- a/cider.el +++ b/cider.el @@ -2136,30 +2136,29 @@ alternative to the default is `cider-random-tip'." (add-hook 'cider-connected-hook #'cider--maybe-inspire-on-connect) ;;;###autoload -(defun cider--setup-clojure-major-mode (mode) - "Setup Cider key bindings and hooks for a Clojure major MODE." - (cl-flet ((concat-symbol (symbol suffix) - (intern (concat (symbol-name mode) suffix)))) - (let ((mode-map (eval (concat-symbol mode "-map")))) - (define-key mode-map (kbd "C-c M-x") #'cider) - (define-key mode-map (kbd "C-c M-j") #'cider-jack-in-clj) - (define-key mode-map (kbd "C-c M-J") #'cider-jack-in-cljs) - (define-key mode-map (kbd "C-c M-c") #'cider-connect-clj) - (define-key mode-map (kbd "C-c M-C") #'cider-connect-cljs) - (define-key mode-map (kbd "C-c C-x") 'cider-start-map) - (define-key mode-map (kbd "C-c C-s") 'sesman-map) - (require 'sesman) - (sesman-install-menu mode-map) - (add-hook (concat-symbol mode "-hook") - (lambda () (setq-local sesman-system 'CIDER)))))) +(defun cider--setup-clojure-major-mode (mode-map mode-hook) + "Setup Cider key bindings on a Clojure mode's MODE-MAP and hooks in MODE-HOOK." + (define-key mode-map (kbd "C-c M-x") #'cider) + (define-key mode-map (kbd "C-c M-j") #'cider-jack-in-clj) + (define-key mode-map (kbd "C-c M-J") #'cider-jack-in-cljs) + (define-key mode-map (kbd "C-c M-c") #'cider-connect-clj) + (define-key mode-map (kbd "C-c M-C") #'cider-connect-cljs) + (define-key mode-map (kbd "C-c C-x") 'cider-start-map) + (define-key mode-map (kbd "C-c C-s") 'sesman-map) + (require 'sesman) + (sesman-install-menu mode-map) + (add-hook mode-hook (lambda () (setq-local sesman-system 'CIDER)))) ;;;###autoload (with-eval-after-load 'clojure-mode - (cider--setup-clojure-major-mode 'clojure-mode)) + (cider--setup-clojure-major-mode clojure-mode-map 'clojure-mode-hook)) ;;;###autoload (with-eval-after-load 'clojure-ts-mode - (cider--setup-clojure-major-mode 'clojure-ts-mode)) + (cider--setup-clojure-major-mode + (with-suppressed-warnings ((free-vars clojure-ts-mode-map)) + clojure-ts-mode-map) + 'clojure-ts-mode-hook)) (provide 'cider) From 7b663516450f015701e84831ca27069bae8e0d3a Mon Sep 17 00:00:00 2001 From: Danny Freeman Date: Thu, 28 Sep 2023 22:38:47 -0400 Subject: [PATCH 051/212] Run tests against clojure-ts-mode Includes top level "main" tests, plus an additional clojure-ts-mode/* tests. This also tries to install the language grammar in the CI environment. Git and CC are required. This works in github actions --- .github/workflows/test.yml | 6 +- Eldev | 21 +++++-- test/cider-selector-tests.el | 28 +++------ test/cider-util-tests.el | 18 ++++++ .../cider-connection-ts-tests.el | 60 ++++++++++++++++++ .../cider-selector-ts-tests.el | 40 ++++++++++++ test/clojure-ts-mode/cider-util-ts-tests.el | 61 +++++++++++++++++++ test/utils/cider-selector-test-utils.el | 49 +++++++++++++++ 8 files changed, 256 insertions(+), 27 deletions(-) create mode 100644 test/clojure-ts-mode/cider-connection-ts-tests.el create mode 100644 test/clojure-ts-mode/cider-selector-ts-tests.el create mode 100644 test/clojure-ts-mode/cider-util-ts-tests.el create mode 100644 test/utils/cider-selector-test-utils.el diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f64e3cc75..9c9f177d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,4 +99,8 @@ jobs: cd dev; ../clojure.sh clojure -M:gen; cd - wc -l test/File.edn eldev -p -dtTC test --test-type enrich || eldev -p -dtTC test --test-type enrich - + + - name: Test clojure-ts-mode + if: startsWith (matrix.emacs_version, '29') + run: | + eldev -p -dtTC test --test-type clojure-ts-mode || eldev -p -dtTC test --test-type clojure-ts-mode diff --git a/Eldev b/Eldev index f0779a6e2..ca7620a0e 100644 --- a/Eldev +++ b/Eldev @@ -23,25 +23,34 @@ (setf eldev-standard-excludes `(:or ,eldev-standard-excludes ;; Avoid including files in test "projects". (eldev-pcase-exhaustive cider-test-type - (`main "./test/*/") - (`integration '("./test/" "!./test/integration")) - (`enrich '("./test/" "!./test/enrich")) - (`all '("./test/*/" "!./test/integration"))) + (`main "./test/*/") + (`integration '("./test/" "!./test/integration")) + (`enrich '("./test/" "!./test/enrich")) + (`clojure-ts-mode '("./test/*/" "!./test/clojure-ts-mode")) + (`all '("./test/*/" "!./test/integration"))) "test/integration/projects" ;; This file is _supposed_ to be excluded ;; from automated testing. "test/cider-tests--no-auto.el")) (eldev-defoption cider-test-selection (type) - "Select tests to run; type can be `main', `integration', `enrich' or `all'" + "Select tests to run; type can be `main', `integration', `enrich', `clojure-ts-mode' or `all'" :options (-T --test-type) :for-command test :value TYPE :default-value cider-test-type - (unless (memq (intern type) '(main integration enrich all)) + (unless (memq (intern type) '(main integration enrich clojure-ts-mode all)) (signal 'eldev-wrong-option-usage `("unknown test type `%s'" ,type))) (setf cider-test-type (intern type))) +(add-hook 'eldev-load-dependencies-hook + (lambda (type additional-sets) + (when (and (eq cider-test-type 'clojure-ts-mode) + (member 'runtime additional-sets)) + (message "Installing tree-sitter grammars") + (require 'clojure-ts-mode) + (clojure-ts--ensure-grammars)))) + (add-hook 'eldev-test-hook (lambda () (eldev-verbose "Using cider tests of type `%s'" cider-test-type))) diff --git a/test/cider-selector-tests.el b/test/cider-selector-tests.el index 0ed80387c..ac585efe7 100644 --- a/test/cider-selector-tests.el +++ b/test/cider-selector-tests.el @@ -29,39 +29,27 @@ (require 'buttercup) (require 'cider-selector) +(require 'cider-selector-test-utils "test/utils/cider-selector-test-utils") (require 'cider-connection-test-utils "test/utils/cider-connection-test-utils") ;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. ;; selector -(defun cider-invoke-selector-method-by-key (ch) - (let ((method (cl-find ch cider-selector-methods :key #'car))) - (funcall (cl-third method)))) - -(defun cider--test-selector-method (method buffer-mode buffer-name) - (with-temp-buffer - (rename-buffer buffer-name) - (setq major-mode buffer-mode) - (let ((expected-buffer (current-buffer))) - ;; switch to another buffer - (with-temp-buffer - (cider-invoke-selector-method-by-key method) - (expect (current-buffer) :to-equal expected-buffer))))) (describe "cider-seletor-method-c" (it "switches to most recently visited clojure-mode buffer" - (cider--test-selector-method ?c 'clojure-mode "*testfile*.clj"))) + (cider-test-selector-method ?c 'clojure-mode "*testfile*.clj"))) (describe "cider-seletor-method-e" (it "switches to most recently visited emacs-lisp-mode buffer" (kill-buffer "*scratch*") - (cider--test-selector-method ?e 'emacs-lisp-mode "*testfile*.el"))) + (cider-test-selector-method ?e 'emacs-lisp-mode "*testfile*.el"))) (describe "cider-seletor-method-r" :var (cider-current-repl) (it "switches to current REPL buffer" (spy-on 'cider-current-repl :and-return-value "*cider-repl xyz*") - (cider--test-selector-method ?r 'cider-repl-mode "*cider-repl xyz*"))) + (cider-test-selector-method ?r 'cider-repl-mode "*cider-repl xyz*"))) ;; FIXME: should work but doesn't with a nonsense error ;; (describe "cider-selector-method-m" @@ -70,18 +58,18 @@ ;; (with-repl-buffer "a-session" 'clj _ ;; (setq-local nrepl-messages-buffer buf) ;; (message "%S" (nrepl-messages-buffer (cider-current-repl))) -;; (cider--test-selector-method ?m nil "*nrepl-messages some-id*"))))) +;; (cider-test-selector-method ?m nil "*nrepl-messages some-id*"))))) (describe "cider-seletor-method-x" (it "switches to *cider-error* buffer" - (cider--test-selector-method ?x 'cider-stacktrace-mode "*cider-error*"))) + (cider-test-selector-method ?x 'cider-stacktrace-mode "*cider-error*"))) (describe "cider-seletor-method-d" (it "switches to *cider-doc* buffer" - (cider--test-selector-method ?d 'cider-stacktrace-mode "*cider-doc*"))) + (cider-test-selector-method ?d 'cider-stacktrace-mode "*cider-doc*"))) (describe "cider-seletor-method-s" :var (cider-scratch-find-or-create-buffer) (it "switches to *cider-scratch* buffer" (spy-on 'cider-scratch-find-or-create-buffer :and-return-value "*cider-scratch*") - (cider--test-selector-method ?s 'cider-docview-mode "*cider-scratch*"))) + (cider-test-selector-method ?s 'cider-docview-mode "*cider-scratch*"))) diff --git a/test/cider-util-tests.el b/test/cider-util-tests.el index 543cb2e30..9c2e612e0 100644 --- a/test/cider-util-tests.el +++ b/test/cider-util-tests.el @@ -374,3 +374,21 @@ and some other vars (like clojure.core/filter). (expect (cider--find-symbol-xref) :to-equal "clojure.core/map") (expect (cider--find-symbol-xref) :to-equal "clojure.core/filter") (expect (cider--find-symbol-xref) :to-equal nil)))) + +(describe "major-mode-predicates" + (with-temp-buffer + (it "matches clojure-mode" + (clojure-mode) + (expect (cider-clojure-major-mode-p) :to-be-truthy) + (expect (cider-clojurescript-major-mode-p) :not :to-be-truthy) + (expect (cider-clojurec-major-mode-p) :not :to-be-truthy)) + (it "matches clojurescript-mode" + (clojurescript-mode) + (expect (cider-clojure-major-mode-p) :to-be-truthy) + (expect (cider-clojurescript-major-mode-p) :to-be-truthy) + (expect (cider-clojurec-major-mode-p) :not :to-be-truthy)) + (it "matches clojurec-mode" + (clojurec-mode) + (expect (cider-clojure-major-mode-p) :to-be-truthy) + (expect (cider-clojurescript-major-mode-p) :not :to-be-truthy) + (expect (cider-clojurec-major-mode-p) :to-be-truthy)))) diff --git a/test/clojure-ts-mode/cider-connection-ts-tests.el b/test/clojure-ts-mode/cider-connection-ts-tests.el new file mode 100644 index 000000000..ad1fc1a23 --- /dev/null +++ b/test/clojure-ts-mode/cider-connection-ts-tests.el @@ -0,0 +1,60 @@ +;;; cider-connection-ts-tests.el -*- lexical-binding: t; -*- + +;; Copyright © 2012-2023 Tim King, Bozhidar Batsov + +;; Author: Tim King +;; Bozhidar Batsov +;; Artur Malabarba + +;; This file is NOT part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see `http://www.gnu.org/licenses/'. + +;;; Commentary: + +;; This file is part of CIDER + +;;; Code: + +(require 'buttercup) +(require 'clojure-ts-mode) +(require 'cider-connection) + +(describe "Enable cider-minor mode on clojure-ts-mode buffers" + (setq clojure-ts-mode-hook nil) + (with-temp-buffer + (clojure-ts-mode) + (it "should enable cider-mode in the clojure-ts-mode buffer" + (cider-enable-on-existing-clojure-buffers) + (expect local-minor-modes :to-contain 'cider-mode) + (expect clojure-ts-mode-hook :to-contain #'cider-mode)) + (it "should disable cider-mode in the clojure-ts-mode-buffer" + (cider-disable-on-existing-clojure-buffers) + (expect local-minor-modes :not :to-contain 'cider-mode)))) + +(describe "cider-repl-type-for-buffers" + (it "correctly detects corresponding repl type based on clojure-ts-* major mode" + (with-temp-buffer + (clojure-ts-mode) + (expect (cider-repl-type-for-buffer) :to-be 'clj)) + (with-temp-buffer + (clojurescript-ts-mode) + (expect (cider-repl-type-for-buffer) :to-be 'cljs)) + (with-temp-buffer + (clojurec-ts-mode) + (expect (cider-repl-type-for-buffer) :to-be 'multi)))) + +(provide 'cider-connection-ts-tests) + +;;; clojure-connection-ts-tests.el ends here diff --git a/test/clojure-ts-mode/cider-selector-ts-tests.el b/test/clojure-ts-mode/cider-selector-ts-tests.el new file mode 100644 index 000000000..a2a6a4b38 --- /dev/null +++ b/test/clojure-ts-mode/cider-selector-ts-tests.el @@ -0,0 +1,40 @@ +;;; cider-selector-ts-tests.el -*- lexical-binding: t; -*- + +;; Copyright © 2012-2023 Tim King, Bozhidar Batsov + +;; Author: Tim King +;; Bozhidar Batsov +;; Artur Malabarba + +;; This file is NOT part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see `http://www.gnu.org/licenses/'. + +;;; Commentary: + +;; This file is part of CIDER + +;;; Code: + +(require 'buttercup) +(require 'clojure-ts-mode) +(require 'cider-selector-test-utils "test/cider-selector-tests") + +(describe "cider-seletor-method-c" + (it "switches to most recently visited clojure-ts-mode buffer" + (cider-test-selector-method ?c 'clojure-ts-mode "*treesitter-test*.clj"))) + +(provide 'cider-selector-ts-tests) + +;;; clojure-selector-ts-tests.el ends here diff --git a/test/clojure-ts-mode/cider-util-ts-tests.el b/test/clojure-ts-mode/cider-util-ts-tests.el new file mode 100644 index 000000000..109b14b71 --- /dev/null +++ b/test/clojure-ts-mode/cider-util-ts-tests.el @@ -0,0 +1,61 @@ +;;; cider-util-ts-tests.el -*- lexical-binding: t; -*- + +;; Copyright © 2012-2023 Tim King, Bozhidar Batsov + +;; Author: Tim King +;; Bozhidar Batsov +;; Artur Malabarba + +;; This file is NOT part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see `http://www.gnu.org/licenses/'. + + +;;; Commentary: + +;; This file is part of CIDER + +;;; Code: + +(require 'buttercup) +(require 'clojure-ts-mode) +(require 'cider-util) + +(describe "clojure-ts-mode activation" + (it "test suite installs the tree-sitter-clojure grammar" + (with-temp-buffer + (clojure-ts-mode) + (expect (treesit-ready-p 'clojure))))) + +(describe "major-mode-predicates" + (with-temp-buffer + (it "matches clojure-ts-mode" + (clojure-ts-mode) + (expect (cider-clojure-major-mode-p) :to-be-truthy) + (expect (cider-clojurescript-major-mode-p) :not :to-be-truthy) + (expect (cider-clojurec-major-mode-p) :not :to-be-truthy)) + (it "matches clojurescript-ts-mode" + (clojurescript-ts-mode) + (expect (cider-clojure-major-mode-p) :to-be-truthy) + (expect (cider-clojurescript-major-mode-p) :to-be-truthy) + (expect (cider-clojurec-major-mode-p) :not :to-be-truthy)) + (it "matches clojurec-ts-mode" + (clojurec-ts-mode) + (expect (cider-clojure-major-mode-p) :to-be-truthy) + (expect (cider-clojurescript-major-mode-p) :not :to-be-truthy) + (expect (cider-clojurec-major-mode-p) :to-be-truthy)))) + +(provide 'cider-ts-util-tests) + +;;; cider-util-ts-tests.el ends here diff --git a/test/utils/cider-selector-test-utils.el b/test/utils/cider-selector-test-utils.el new file mode 100644 index 000000000..86f9bc59c --- /dev/null +++ b/test/utils/cider-selector-test-utils.el @@ -0,0 +1,49 @@ +;;; cider-selector-test-utils.el -*- lexical-binding: t; -*- + +;; Copyright © 2012-2023 Tim King, Bozhidar Batsov + +;; Author: Tim King +;; Bozhidar Batsov +;; Artur Malabarba + +;; This file is NOT part of GNU Emacs. + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see `http://www.gnu.org/licenses/'. + +;;; Commentary: + +;; This file is part of CIDER + +;;; Code: + +(require 'buttercup) +(require 'cider-selector) + +(defun cider-invoke-selector-method-by-key (ch) + (let ((method (cl-find ch cider-selector-methods :key #'car))) + (funcall (cl-third method)))) + +(defun cider-test-selector-method (method buffer-mode buffer-name) + (with-temp-buffer + (rename-buffer buffer-name) + (setq major-mode buffer-mode) + (let ((expected-buffer (current-buffer))) + ;; switch to another buffer + (with-temp-buffer + (cider-invoke-selector-method-by-key method) + (expect (current-buffer) :to-equal expected-buffer))))) + +(provide 'cider-selector-test-utils) + +;;; clojure-selector-test-utilss.el ends here From 821d538508dff5177cdc32b2cba2f9925ccf8bad Mon Sep 17 00:00:00 2001 From: Danny Freeman Date: Sat, 30 Sep 2023 22:30:51 -0400 Subject: [PATCH 052/212] Update documentation to reflect clojure-ts-mode support Particularly the caveats page, where we describe some of the things clojure-ts-mode is currently lacking. --- CHANGELOG.md | 3 +++ doc/modules/ROOT/pages/additional_packages.adoc | 2 +- doc/modules/ROOT/pages/caveats.adoc | 14 ++++++++++++++ doc/modules/ROOT/pages/index.adoc | 7 +++---- doc/modules/ROOT/pages/usage/cider_mode.adoc | 9 ++++++++- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3180f5a10..72acdeab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -156,6 +156,9 @@ but without connecting to the started nREPL server. - Add new customization variable [`cider-clojurec-eval-destination`](https://docs.cider.mx/cider/cljs/up_and_running.html#working-with-cljc-files) to allow specifying which REPL .cljc evals are sent to. - [#3354](https://github.com/clojure-emacs/cider/issues/3354): Add new customization variable [`cider-reuse-dead-repls`](https://docs.cider.mx/cider/usage/managing_connections.html#reusing-dead-repls) to control how dead REPL buffers are reused on new connections. - Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) +- [#3461](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) + - The clojure-mode dependency is still required for CIDER to function + - some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with clojure-ts-mode (yet). ### Bugs fixed diff --git a/doc/modules/ROOT/pages/additional_packages.adoc b/doc/modules/ROOT/pages/additional_packages.adoc index 6dce41e71..1e1e0a142 100644 --- a/doc/modules/ROOT/pages/additional_packages.adoc +++ b/doc/modules/ROOT/pages/additional_packages.adoc @@ -2,7 +2,7 @@ There are many additional Emacs packages that can enhance your Clojure programming experience. The majority of the minor modes listed here should be enabled for both -`cider-repl-mode` and `clojure-mode` for optimal effects. +`cider-repl-mode`, `clojure-mode`, and `clojure-ts-mode` for optimal effects. The packages listed here belong to three categories: diff --git a/doc/modules/ROOT/pages/caveats.adoc b/doc/modules/ROOT/pages/caveats.adoc index 6eb754121..93ec79200 100644 --- a/doc/modules/ROOT/pages/caveats.adoc +++ b/doc/modules/ROOT/pages/caveats.adoc @@ -83,3 +83,17 @@ provide the dependencies by editing your `~/.lein/profiles.clj` as described in the xref:basics/middleware_setup.adoc#setting-up-a-standalone-repl[standalone REPL] section. * Adjust the value of `cider-injected-nrepl-version` to the same nREPL version as the one that's bundled with Leiningen. + +== Clojure-ts-mode integration + +Cider has basic support for working with +https://github.com/clojure-emacs/clojure-ts-mode[clojure-ts-mode] buffers, but it still depends on +https://github.com/clojure-emacs/clojure-mode[clojure-mode] for certain functionality, like +extracting information about clojure code out of the buffer. We hope to make clojure-ts-mode capable +of providing cider with all the functionality it needs to interact with clojure buffers, but that +will take some time. + +Additionally, some features like +xref:config/indentation.adoc#dynamic-indentation[`cider-dynamic-indentation`] +and xref:config/syntax_highlighting.adoc#dynamic-syntax-highlighting[`cider-font-lock-dynamically`] +are not supported by clojure-ts-mode. diff --git a/doc/modules/ROOT/pages/index.adoc b/doc/modules/ROOT/pages/index.adoc index 5ddaadc42..394fe12cf 100644 --- a/doc/modules/ROOT/pages/index.adoc +++ b/doc/modules/ROOT/pages/index.adoc @@ -5,10 +5,9 @@ that **R**ocks! CIDER extends Emacs with support for xref:usage/interactive_programming.adoc[interactive programming] in Clojure. The features are centered around xref:usage/cider_mode.adoc[cider-mode], an Emacs minor-mode that complements -https://github.com/clojure-emacs/clojure-mode[clojure-mode]. While `clojure-mode` supports editing Clojure source files, -`cider-mode` adds support for interacting with a running Clojure process for -compilation, debugging, definition and documentation lookup, running tests and -so on. +https://github.com/clojure-emacs/clojure-mode[clojure-mode] and https://github.com/clojure-emacs/clojure-ts-mode[clojure-ts-mode]. +While `clojure-mode` supports editing Clojure source files, `cider-mode` adds support for interacting with a running Clojure process for +compilation, debugging, definition and documentation lookup, running tests and so on. .Inspired by SLIME **** diff --git a/doc/modules/ROOT/pages/usage/cider_mode.adoc b/doc/modules/ROOT/pages/usage/cider_mode.adoc index c70dd5a2d..a1282fd53 100644 --- a/doc/modules/ROOT/pages/usage/cider_mode.adoc +++ b/doc/modules/ROOT/pages/usage/cider_mode.adoc @@ -18,7 +18,14 @@ it, so you can be productive. (add-hook 'clojure-mode-hook #'cider-mode) ---- -NOTE: There's no need to enable it explicitly for modes derived from `clojure-mode` like `clojurescript-mode`. +or if you are using `clojure-ts-mode` + +[source,lisp] +---- +(add-hook 'clojure-ts-mode-hook #'cider-mode) +---- + +NOTE: There's no need to enable it explicitly for modes derived from `clojure-mode` or `clojure-ts-mode` like `clojurescript-mode` and `clojurescript-ts-mode`. == Disabling cider-mode From dcf67dd9939697248d9fb17b3d2e14d638ce01f3 Mon Sep 17 00:00:00 2001 From: Danny Freeman Date: Sun, 1 Oct 2023 12:52:50 -0400 Subject: [PATCH 053/212] Documentation adjustments --- CHANGELOG.md | 1 + doc/modules/ROOT/pages/usage/cider_mode.adoc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72acdeab7..1f5adbff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -157,6 +157,7 @@ but without connecting to the started nREPL server. - [#3354](https://github.com/clojure-emacs/cider/issues/3354): Add new customization variable [`cider-reuse-dead-repls`](https://docs.cider.mx/cider/usage/managing_connections.html#reusing-dead-repls) to control how dead REPL buffers are reused on new connections. - Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) - [#3461](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) +- [#3461](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER with [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) - The clojure-mode dependency is still required for CIDER to function - some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with clojure-ts-mode (yet). diff --git a/doc/modules/ROOT/pages/usage/cider_mode.adoc b/doc/modules/ROOT/pages/usage/cider_mode.adoc index a1282fd53..7206cc7d7 100644 --- a/doc/modules/ROOT/pages/usage/cider_mode.adoc +++ b/doc/modules/ROOT/pages/usage/cider_mode.adoc @@ -18,7 +18,7 @@ it, so you can be productive. (add-hook 'clojure-mode-hook #'cider-mode) ---- -or if you are using `clojure-ts-mode` +or if you are using `clojure-ts-mode`: [source,lisp] ---- From 4931b2c9f1481736691b74ee9775a6d9f44d67b6 Mon Sep 17 00:00:00 2001 From: Danny Freeman Date: Sun, 1 Oct 2023 12:54:15 -0400 Subject: [PATCH 054/212] Remove extremely obvious comments --- test/clojure-ts-mode/cider-connection-ts-tests.el | 2 -- test/clojure-ts-mode/cider-selector-ts-tests.el | 2 -- test/clojure-ts-mode/cider-util-ts-tests.el | 2 -- test/integration/integration-tests.el | 2 -- 4 files changed, 8 deletions(-) diff --git a/test/clojure-ts-mode/cider-connection-ts-tests.el b/test/clojure-ts-mode/cider-connection-ts-tests.el index ad1fc1a23..f39103729 100644 --- a/test/clojure-ts-mode/cider-connection-ts-tests.el +++ b/test/clojure-ts-mode/cider-connection-ts-tests.el @@ -56,5 +56,3 @@ (expect (cider-repl-type-for-buffer) :to-be 'multi)))) (provide 'cider-connection-ts-tests) - -;;; clojure-connection-ts-tests.el ends here diff --git a/test/clojure-ts-mode/cider-selector-ts-tests.el b/test/clojure-ts-mode/cider-selector-ts-tests.el index a2a6a4b38..b7fb126b4 100644 --- a/test/clojure-ts-mode/cider-selector-ts-tests.el +++ b/test/clojure-ts-mode/cider-selector-ts-tests.el @@ -36,5 +36,3 @@ (cider-test-selector-method ?c 'clojure-ts-mode "*treesitter-test*.clj"))) (provide 'cider-selector-ts-tests) - -;;; clojure-selector-ts-tests.el ends here diff --git a/test/clojure-ts-mode/cider-util-ts-tests.el b/test/clojure-ts-mode/cider-util-ts-tests.el index 109b14b71..3c537b90f 100644 --- a/test/clojure-ts-mode/cider-util-ts-tests.el +++ b/test/clojure-ts-mode/cider-util-ts-tests.el @@ -57,5 +57,3 @@ (expect (cider-clojurec-major-mode-p) :to-be-truthy)))) (provide 'cider-ts-util-tests) - -;;; cider-util-ts-tests.el ends here diff --git a/test/integration/integration-tests.el b/test/integration/integration-tests.el index a2dac08c0..e0ed66b79 100644 --- a/test/integration/integration-tests.el +++ b/test/integration/integration-tests.el @@ -553,5 +553,3 @@ If CLI-COMMAND is nil, then use the default." ;; wait for the REPL to exit (cider-itu-poll-until (not (eq (process-status nrepl-proc) 'run)) 15) (expect (member (process-status nrepl-proc) '(exit signal))))))))))) - -;;; integration-tests.el ends here From e0ce74d212d9650d81217387cd494ba57cd4483d Mon Sep 17 00:00:00 2001 From: Dieter Komendera Date: Sun, 18 Feb 2024 20:17:08 +0100 Subject: [PATCH 055/212] Reflect changes in derived clojure-ts-mode names --- cider-util.el | 4 ++-- doc/modules/ROOT/pages/usage/cider_mode.adoc | 2 +- test/clojure-ts-mode/cider-connection-ts-tests.el | 4 ++-- test/clojure-ts-mode/cider-util-ts-tests.el | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cider-util.el b/cider-util.el index 0fa622e7c..8316af962 100644 --- a/cider-util.el +++ b/cider-util.el @@ -63,11 +63,11 @@ Setting this to nil removes the fontification restriction." (defun cider-clojurescript-major-mode-p () "Return non-nil if current buffer is managed by a ClojureScript major mode." - (derived-mode-p 'clojurescript-mode 'clojurescript-ts-mode)) + (derived-mode-p 'clojurescript-mode 'clojure-ts-clojurescript-mode)) (defun cider-clojurec-major-mode-p () "Return non-nil if current buffer is managed by a ClojureC major mode." - (derived-mode-p 'clojurec-mode 'clojurec-ts-mode)) + (derived-mode-p 'clojurec-mode 'clojure-ts-clojurec-mode)) (defun cider-util--clojure-buffers () "Return a list of all existing `clojure-mode' buffers." diff --git a/doc/modules/ROOT/pages/usage/cider_mode.adoc b/doc/modules/ROOT/pages/usage/cider_mode.adoc index 7206cc7d7..1353921e9 100644 --- a/doc/modules/ROOT/pages/usage/cider_mode.adoc +++ b/doc/modules/ROOT/pages/usage/cider_mode.adoc @@ -25,7 +25,7 @@ or if you are using `clojure-ts-mode`: (add-hook 'clojure-ts-mode-hook #'cider-mode) ---- -NOTE: There's no need to enable it explicitly for modes derived from `clojure-mode` or `clojure-ts-mode` like `clojurescript-mode` and `clojurescript-ts-mode`. +NOTE: There's no need to enable it explicitly for modes derived from `clojure-mode` or `clojure-ts-mode` like `clojurescript-mode` and `clojure-ts-clojurescript-mode`. == Disabling cider-mode diff --git a/test/clojure-ts-mode/cider-connection-ts-tests.el b/test/clojure-ts-mode/cider-connection-ts-tests.el index f39103729..499e59486 100644 --- a/test/clojure-ts-mode/cider-connection-ts-tests.el +++ b/test/clojure-ts-mode/cider-connection-ts-tests.el @@ -49,10 +49,10 @@ (clojure-ts-mode) (expect (cider-repl-type-for-buffer) :to-be 'clj)) (with-temp-buffer - (clojurescript-ts-mode) + (clojure-ts-clojurescript-mode) (expect (cider-repl-type-for-buffer) :to-be 'cljs)) (with-temp-buffer - (clojurec-ts-mode) + (clojure-ts-clojurec-mode) (expect (cider-repl-type-for-buffer) :to-be 'multi)))) (provide 'cider-connection-ts-tests) diff --git a/test/clojure-ts-mode/cider-util-ts-tests.el b/test/clojure-ts-mode/cider-util-ts-tests.el index 3c537b90f..186eb6aaa 100644 --- a/test/clojure-ts-mode/cider-util-ts-tests.el +++ b/test/clojure-ts-mode/cider-util-ts-tests.el @@ -45,13 +45,13 @@ (expect (cider-clojure-major-mode-p) :to-be-truthy) (expect (cider-clojurescript-major-mode-p) :not :to-be-truthy) (expect (cider-clojurec-major-mode-p) :not :to-be-truthy)) - (it "matches clojurescript-ts-mode" - (clojurescript-ts-mode) + (it "matches clojure-ts-clojurescript-mode" + (clojure-ts-clojurescript-mode) (expect (cider-clojure-major-mode-p) :to-be-truthy) (expect (cider-clojurescript-major-mode-p) :to-be-truthy) (expect (cider-clojurec-major-mode-p) :not :to-be-truthy)) - (it "matches clojurec-ts-mode" - (clojurec-ts-mode) + (it "matches clojure-ts-clojurec-mode" + (clojure-ts-clojurec-mode) (expect (cider-clojure-major-mode-p) :to-be-truthy) (expect (cider-clojurescript-major-mode-p) :not :to-be-truthy) (expect (cider-clojurec-major-mode-p) :to-be-truthy)))) From e6ad3ae81041d1ec56a773d8b18ea65a6a90edea Mon Sep 17 00:00:00 2001 From: Dieter Komendera Date: Sun, 18 Feb 2024 21:00:11 +0100 Subject: [PATCH 056/212] Update changelog --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f5adbff4..137171b38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## master (unreleased) +- [#3622](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) + - The clojure-mode dependency is still required for CIDER to function + - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with clojure-ts-mode (yet). + + ## 1.13.1 (2024-02-01) ### Bugs fixed @@ -155,11 +160,6 @@ but without connecting to the started nREPL server. - [#3352](https://github.com/clojure-emacs/cider/pull/3496): Introduce [`cider-eval-dwim`](https://docs.cider.mx/cider/usage/cider_mode.html#key-reference). - Add new customization variable [`cider-clojurec-eval-destination`](https://docs.cider.mx/cider/cljs/up_and_running.html#working-with-cljc-files) to allow specifying which REPL .cljc evals are sent to. - [#3354](https://github.com/clojure-emacs/cider/issues/3354): Add new customization variable [`cider-reuse-dead-repls`](https://docs.cider.mx/cider/usage/managing_connections.html#reusing-dead-repls) to control how dead REPL buffers are reused on new connections. -- Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) -- [#3461](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) -- [#3461](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER with [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) - - The clojure-mode dependency is still required for CIDER to function - - some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with clojure-ts-mode (yet). ### Bugs fixed From c5e575ed1bb8d86274f03bfbfb7eb670b353e12e Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 19 Feb 2024 10:15:31 +0200 Subject: [PATCH 057/212] [Docs] Add more documentation about the clojure-ts-mode support --- README.md | 15 ++++++++------- doc/modules/ROOT/pages/caveats.adoc | 12 +++++++----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1e11c3c26..cac850436 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ CIDER is the **C**lojure(Script) **I**nteractive **D**evelopment **E**nvironment that **R**ocks! CIDER extends Emacs with support for [interactive -programming](https://docs.cider.mx/cider/usage/interactive_programming.html) -in Clojure. The features are centered around `cider-mode`, an Emacs -minor-mode that complements [clojure-mode][]. While `clojure-mode` -supports editing Clojure source files, `cider-mode` adds support for -interacting with a running Clojure process for compilation, code -completion, debugging, definition and documentation lookup, running -tests and so on. +programming](https://docs.cider.mx/cider/usage/interactive_programming.html) in +Clojure. The features are centered around `cider-mode`, an Emacs minor-mode that +complements [clojure-mode][] and [clojure-ts-mode][]. While `clojure-mode` and +`clojure-ts-mode` support editing Clojure source files, `cider-mode` adds +support for interacting with a running Clojure process for compilation, code +completion, debugging, definition and documentation lookup, running tests and so +on. ---------- [![OpenCollective](https://opencollective.com/cider/backers/badge.svg)](#open-collective-backers) @@ -270,4 +270,5 @@ Copyright © 2012-2024 Bozhidar Batsov, Artur Malabarba, Tim King, Phil Hagelber [Sly]: https://github.com/joaotavora/sly [Geiser]: https://github.com/jaor/geiser [clojure-mode]: https://github.com/clojure-emacs/clojure-mode +[clojure-ts-mode]: https://github.com/clojure-emacs/clojure-ts-mode [inf-clojure]: https://github.com/clojure-emacs/inf-clojure diff --git a/doc/modules/ROOT/pages/caveats.adoc b/doc/modules/ROOT/pages/caveats.adoc index 93ec79200..53c6c0c82 100644 --- a/doc/modules/ROOT/pages/caveats.adoc +++ b/doc/modules/ROOT/pages/caveats.adoc @@ -84,16 +84,18 @@ the xref:basics/middleware_setup.adoc#setting-up-a-standalone-repl[standalone RE * Adjust the value of `cider-injected-nrepl-version` to the same nREPL version as the one that's bundled with Leiningen. -== Clojure-ts-mode integration +== clojure-ts-mode integration -Cider has basic support for working with +NOTE: `clojure-ts-mode` support was introduced in CIDER 1.14. + +CIDER has basic support for working with https://github.com/clojure-emacs/clojure-ts-mode[clojure-ts-mode] buffers, but it still depends on https://github.com/clojure-emacs/clojure-mode[clojure-mode] for certain functionality, like -extracting information about clojure code out of the buffer. We hope to make clojure-ts-mode capable -of providing cider with all the functionality it needs to interact with clojure buffers, but that +extracting information about Clojure code out of the buffer. We hope to make `clojure-ts-mode` capable +of providing CIDER with all the functionality it needs to interact with Clojure buffers, but that will take some time. Additionally, some features like xref:config/indentation.adoc#dynamic-indentation[`cider-dynamic-indentation`] and xref:config/syntax_highlighting.adoc#dynamic-syntax-highlighting[`cider-font-lock-dynamically`] -are not supported by clojure-ts-mode. +are not supported by `clojure-ts-mode`. From 105847f6ac70e046ba18374883443ad8834c0406 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 19 Feb 2024 10:18:52 +0200 Subject: [PATCH 058/212] Pick a codename for the next stable release --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index 282ba74f2..3b12fa6e2 100644 --- a/cider.el +++ b/cider.el @@ -96,7 +96,7 @@ (defconst cider-version "1.14.0-snapshot" "The current version of CIDER.") -(defconst cider-codename "Santiago" +(defconst cider-codename "Cogne" "Codename used to denote stable releases.") (defcustom cider-lein-command From 1aad1ce6f0645c2efb35b5d0115b804415b2a2cf Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 20 Feb 2024 09:20:30 +0200 Subject: [PATCH 059/212] Bump the injected nREPL to 1.1.1 --- CHANGELOG.md | 15 ++++++++++----- cider.el | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 137171b38..1d89b88ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,22 @@ ## master (unreleased) -- [#3622](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) +### New features + +- [#3622](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) - The clojure-mode dependency is still required for CIDER to function - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with clojure-ts-mode (yet). +### Changes + +- Bump the injected nREPL to 1.1.1. ## 1.13.1 (2024-02-01) ### Bugs fixed -- [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop. -- [#3613](https://github.com/clojure-emacs/cider/issues/3613): adapt `cider-completion-context.el` to upstream changes in Compliment. +- [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop. +- [#3613](https://github.com/clojure-emacs/cider/issues/3613): adapt `cider-completion-context.el` to upstream changes in Compliment. - [#3587](https://github.com/clojure-emacs/cider/issues/3587): avoid overlays and `message`s on stderr that is unrelated to exception handling. ## 1.13.0 (2024-01-14) @@ -37,7 +42,7 @@ - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html#usage): introduce `1` keybinding which performs `cider-inspector-tap-at-point`. - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html#usage): introduce `o` keybinding which performs `cider-inspector-open-thing-at-point`. - CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html#usage): introduce `:` keybinding which performs `cider-inspect-expr-from-inspector`. -- CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): retain [`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html) values across screens. +- CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): retain [`truncate-lines`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html) values across screens. - [#3580](https://github.com/clojure-emacs/cider/issues/3580): `cider-test`: make test vars in [test results reports](https://docs.cider.mx/cider/testing/test_reports.html) clickable. - As defined in the newly introduced `cider-test-var-keymap` var. - [#3582](https://github.com/clojure-emacs/cider/issues/3582): Handle `cider-clojure-compilation-error-phases` values that have been customized to `t`. @@ -67,7 +72,7 @@ - This info is available when [enrich-classpath](https://docs.cider.mx/cider/config/basic_config.html#use-enrich-classpath) is active. - [#3495](https://github.com/clojure-emacs/cider/issues/3495): possibly display error overlays on [`cider-load-buffer`](https://docs.cider.mx/cider/usage/code_evaluation.html#basic-evaluation). - `cider-popup-buffer-display`: honor `special-display-buffer-names` if customized for a given CIDER buffer name (e.g. `*cider-inspect*`), avoiding the double-rendering of the given buffer. -- [#3572](https://github.com/clojure-emacs/cider/issues/3572): `lein.sh`: honor `XDG_CACHE_HOME`. +- [#3572](https://github.com/clojure-emacs/cider/issues/3572): `lein.sh`: honor `XDG_CACHE_HOME`. - Bump the injected `cider-nrepl` to [0.43.1](https://github.com/clojure-emacs/cider-nrepl/blob/v0.43.1/CHANGELOG.md#0431-2023-11-07). - Improves performance for exception handling and other use cases. - Fixes [`cider-inspector-refresh`](https://docs.cider.mx/cider/debugging/inspector.html#usage) diff --git a/cider.el b/cider.el index 3b12fa6e2..75f5f56e9 100644 --- a/cider.el +++ b/cider.el @@ -498,7 +498,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.0.0" +(defcustom cider-injected-nrepl-version "1.1.1" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." From dc58ed1a411e6fe6f0350435aa4c56ec6edf59bf Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 20 Feb 2024 09:21:00 +0200 Subject: [PATCH 060/212] Tweak a changelog entry --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d89b88ef..1363ed43f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ ### New features -- [#3622](https://github.com/clojure-emacs/cider/pull/3461) Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) - - The clojure-mode dependency is still required for CIDER to function - - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with clojure-ts-mode (yet). +- [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) + - The `clojure-mode` dependency is still required for CIDER to function + - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with `clojure-ts-mode` (yet). ### Changes From 89e66b34adb96a461a54600fc5f6fa281e7bc6e8 Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 5 Mar 2024 05:28:10 +0100 Subject: [PATCH 061/212] Use cider-nrepl 0.46.0 https://github.com/clojure-emacs/cider-nrepl/blob/1cc9b2/CHANGELOG.md#0460-2024-0305 --- CHANGELOG.md | 9 ++-- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 41 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1363ed43f..96ee21708 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,16 @@ ### New features -- [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode) - - The `clojure-mode` dependency is still required for CIDER to function +- [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode). + - The `clojure-mode` dependency is still required for CIDER to function. - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with `clojure-ts-mode` (yet). ### Changes -- Bump the injected nREPL to 1.1.1. +- Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). +- Bump the injected `cider-nrepl` to [0.46.0](https://github.com/clojure-emacs/cider-nrepl/blob/1cc9b2/CHANGELOG.md#0460-2024-0305). + - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.0/CHANGELOG.md#0230-2024-03-03). + - Updates [Logjam](https://github.com/clojure-emacs/logjam/blob/v0.3.0/CHANGELOG.md#030-2024-03-03). ## 1.13.1 (2024-02-01) diff --git a/cider.el b/cider.el index 75f5f56e9..025cd4a30 100644 --- a/cider.el +++ b/cider.el @@ -527,7 +527,7 @@ the artifact.") (defconst cider-latest-clojure-version "1.10.1" "Latest supported version of Clojure.") -(defconst cider-required-middleware-version "0.45.0" +(defconst cider-required-middleware-version "0.46.0" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index 19ceb7886..7d3de4d31 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.45.0"]]) + :plugins [[cider/cider-nrepl "0.46.0"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index 250307e1f..00c7c6540 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.45.0"] + :plugins [[cider/cider-nrepl "0.46.0"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 91fca0b13..384a74d5e 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.45.0"]] +:plugins [[cider/cider-nrepl "0.46.0"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.45.0"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.46.0"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.45.0"]]) + concat '[[cider/cider-nrepl "0.46.0"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.45.0"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.46.0"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.45.0"} + cider/cider-nrepl {:mvn/version "0.46.0"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.45.0' + devImplementation 'cider:cider-nrepl:0.46.0' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 95653307c..849de0873 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.45.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.46.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -318,7 +318,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.45.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.46.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index 244d33054..36be3a40a 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.45.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.46.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index c8c14630a..71a140397 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.45.0' + devImplementation 'cider:cider-nrepl:0.46.0' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index a3814b82c..e33763ac0 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.45.0") + (setq-local cider-injected-middleware-version "0.46.0") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -154,7 +154,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -167,7 +167,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -179,7 +179,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -192,7 +192,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.45.0") + (shell-quote-argument "cider/cider-nrepl:0.46.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -201,7 +201,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.45.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.46.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -218,7 +218,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -231,7 +231,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.45.0") + (shell-quote-argument "cider/cider-nrepl:0.46.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -253,7 +253,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -264,7 +264,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.45.0") + (shell-quote-argument "cider/cider-nrepl:0.46.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -272,7 +272,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.45.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.46.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -287,14 +287,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.45.0")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.46.0")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.45.0"))) + :to-equal '(("cider/cider-nrepl" "0.46.0"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -323,7 +323,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.45.0") + ("cider/cider-nrepl" "0.46.0") ("mx.cider/lein-enrich-classpath" "1.19.0"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -334,7 +334,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.45.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -352,7 +352,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.45.0") + (shell-quote-argument "cider/cider-nrepl:0.46.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -447,7 +447,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.45.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.46.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -461,7 +461,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.45.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.46.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -478,7 +478,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.45.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.46.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -488,7 +488,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.45.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.46.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -516,7 +516,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.45.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.46.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.45.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.46.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From cfe2de3b94e9a326fe2e8524bc73876436fe5886 Mon Sep 17 00:00:00 2001 From: vemv Date: Wed, 6 Mar 2024 05:25:21 +0100 Subject: [PATCH 062/212] `cider-ns-refresh`: jump to the relevant file/line on errors (#3627) Fixes #3626 --- CHANGELOG.md | 1 + cider-ns.el | 31 +++++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96ee21708..ade86966e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Changes +- [#3626](https://github.com/clojure-emacs/cider/issues/3626): `cider-ns-refresh`: jump to the relevant file/line on errors. - Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). - Bump the injected `cider-nrepl` to [0.46.0](https://github.com/clojure-emacs/cider-nrepl/blob/1cc9b2/CHANGELOG.md#0460-2024-0305). - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.0/CHANGELOG.md#0230-2024-03-03). diff --git a/cider-ns.el b/cider-ns.el index 9e938f36e..81b0cd81b 100644 --- a/cider-ns.el +++ b/cider-ns.el @@ -118,6 +118,27 @@ namespace-qualified function of zero arity." :group 'cider :package-version '(cider . "0.10.0")) +(defun cider-ns--present-error (error) + "Render the `ERROR' stacktrace, +and jump to the adequate file/line location." + (let* ((buf) + (jump-args (seq-some (lambda (cause-dict) ;; a dict representing an exception cause + (nrepl-dbind-response cause-dict (file-url line column) + (when (and file-url + ;; jars are unlikely sources of user errors, so we favor the next `cause-dict': + (not (string-prefix-p "jar:" file-url)) + line) + (setq buf (cider--find-buffer-for-file file-url)) + (list buf (cons line column))))) + error))) + (when jump-args + (apply #'cider-jump-to jump-args)) + (cider--render-stacktrace-causes error) + ;; Select the window displaying the 'culprit' buffer so that the user can immediately fix it, + ;; as most times the displayed stacktrace doesn't need much inspection: + (when buf + (select-window (get-buffer-window buf))))) + (defun cider-ns-refresh--handle-response (response log-buffer) "Refresh LOG-BUFFER with RESPONSE." (nrepl-dbind-response response (out err reloading status error error-ns after before) @@ -168,8 +189,9 @@ namespace-qualified function of zero arity." (with-current-buffer cider-ns-refresh-log-buffer (goto-char (point-max)))) - (when (member "error" status) - (cider--render-stacktrace-causes error)))) + (when (and (member "error" status) + error) + (cider-ns--present-error error)))) (defun cider-ns-refresh--save-modified-buffers () "Ensure any relevant modified buffers are saved before refreshing. @@ -219,10 +241,11 @@ indirectly load via require\"." ;;;###autoload (defun cider-ns-refresh (&optional mode) - "Reload modified and unloaded namespaces on the classpath. + "Reload modified and unloaded namespaces, using the Reloaded Workflow. +Uses the configured 'refresh dirs' \(defaults to the classpath dirs). With a single prefix argument, or if MODE is `refresh-all', reload all -namespaces on the classpath unconditionally. +namespaces on the classpath dirs unconditionally. With a double prefix argument, or if MODE is `clear', clear the state of the namespace tracker before reloading. This is useful for recovering from From 9edb2d20c3436708a79d4b5bf561e2b4c40b4867 Mon Sep 17 00:00:00 2001 From: vemv Date: Thu, 7 Mar 2024 11:02:36 +0100 Subject: [PATCH 063/212] `cider-ns-refresh`: summarize errors as an overlay Fixes #3628 --- CHANGELOG.md | 1 + cider-ns.el | 19 ++++- test/cider-ns-tests.el | 169 ++++++++++++++++++++++++++++++++++++++++ test/cider_ns_tests.clj | 2 + 4 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 test/cider_ns_tests.clj diff --git a/CHANGELOG.md b/CHANGELOG.md index ade86966e..14fd4a477 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Changes - [#3626](https://github.com/clojure-emacs/cider/issues/3626): `cider-ns-refresh`: jump to the relevant file/line on errors. +- [#3628](https://github.com/clojure-emacs/cider/issues/3628): `cider-ns-refresh`: summarize errors as an overlay. - Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). - Bump the injected `cider-nrepl` to [0.46.0](https://github.com/clojure-emacs/cider-nrepl/blob/1cc9b2/CHANGELOG.md#0460-2024-0305). - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.0/CHANGELOG.md#0230-2024-03-03). diff --git a/cider-ns.el b/cider-ns.el index 81b0cd81b..51ab0ed12 100644 --- a/cider-ns.el +++ b/cider-ns.el @@ -120,7 +120,8 @@ namespace-qualified function of zero arity." (defun cider-ns--present-error (error) "Render the `ERROR' stacktrace, -and jump to the adequate file/line location." +and jump to the adequate file/line location, +presenting the error message as an overlay." (let* ((buf) (jump-args (seq-some (lambda (cause-dict) ;; a dict representing an exception cause (nrepl-dbind-response cause-dict (file-url line column) @@ -132,7 +133,21 @@ and jump to the adequate file/line location." (list buf (cons line column))))) error))) (when jump-args - (apply #'cider-jump-to jump-args)) + (apply #'cider-jump-to jump-args) + (when-let ((message (seq-some (lambda (cause-dict) + (nrepl-dbind-response cause-dict (message) + message)) + ;; `reverse' the causes as the first one typically is a CompilerException, which the second one is the actual exception: + (reverse error)))) + (with-current-buffer buf + (let ((cider-result-use-clojure-font-lock nil) + (trimmed-err (funcall cider-inline-error-message-function message))) + (cider--display-interactive-eval-result trimmed-err + 'error + (save-excursion + (end-of-defun) + (point)) + 'cider-error-overlay-face))))) (cider--render-stacktrace-causes error) ;; Select the window displaying the 'culprit' buffer so that the user can immediately fix it, ;; as most times the displayed stacktrace doesn't need much inspection: diff --git a/test/cider-ns-tests.el b/test/cider-ns-tests.el index e34e0ba64..ab98499be 100644 --- a/test/cider-ns-tests.el +++ b/test/cider-ns-tests.el @@ -34,3 +34,172 @@ (it "raises a user error if cider is not connected" (spy-on 'cider-connected-p :and-return-value nil) (expect (cider-ns-refresh) :to-throw 'user-error))) + +(defvar cider-ns-tests--sample-file-url + "file:test/cider_ns_tests.clj") + +(defvar cider-ns-tests--sample-causes + `((dict "class" "clojure.lang.Compiler$CompilerException" "column" 0 "compile-like" "false" "data" "{:clojure.error/phase :read-source, + :clojure.error/line 23, + :clojure.error/column 0, + :clojure.error/source \"gpml/handler/chat.clj\"}" "file" "gpml/handler/chat.clj" "file-url" ,cider-ns-tests--sample-file-url "line" 23 "location" + (dict "clojure.error/column" 0 "clojure.error/line" 23 "clojure.error/phase" "read-source" "clojure.error/source" "gpml/handler/chat.clj") + "message" "Syntax error reading source at (gpml/handler/chat.clj:23:0)." "path" "gpml/handler/chat.clj" "phase" "read-source" "stacktrace" + ((dict "class" "clojure.lang.Compiler" "file" "Compiler.java" "file-url" nil "flags" + ("tooling" "java") + "line" 7643 "method" "load" "name" "clojure.lang.Compiler/load" "type" "java") + (dict "class" "clojure.lang.RT" "file" "RT.java" "file-url" nil "flags" + ("tooling" "java") + "line" 381 "method" "loadResourceScript" "name" "clojure.lang.RT/loadResourceScript" "type" "java") + (dict "class" "clojure.lang.RT" "file" "RT.java" "file-url" nil "flags" + ("dup" "tooling" "java") + "line" 372 "method" "loadResourceScript" "name" "clojure.lang.RT/loadResourceScript" "type" "java") + (dict "class" "clojure.lang.RT" "file" "RT.java" "file-url" nil "flags" + ("tooling" "java") + "line" 459 "method" "load" "name" "clojure.lang.RT/load" "type" "java") + (dict "class" "clojure.lang.RT" "file" "RT.java" "file-url" nil "flags" + ("dup" "tooling" "java") + "line" 424 "method" "load" "name" "clojure.lang.RT/load" "type" "java") + (dict "class" "clojure.core$load$fn__6924" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load/fn" "line" 6167 "method" "invoke" "name" "clojure.core$load$fn__6924/invoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load") + (dict "class" "clojure.core$load" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load" "line" 6166 "method" "invokeStatic" "name" "clojure.core$load/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load") + (dict "class" "clojure.core$load" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load" "line" 6150 "method" "doInvoke" "name" "clojure.core$load/doInvoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load") + (dict "class" "clojure.lang.RestFn" "file" "RestFn.java" "file-url" nil "flags" + ("tooling" "java") + "line" 411 "method" "invoke" "name" "clojure.lang.RestFn/invoke" "type" "java") + (dict "class" "clojure.core$load_one" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-one" "line" 5939 "method" "invokeStatic" "name" "clojure.core$load_one/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-one") + (dict "class" "clojure.core$load_one" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-one" "line" 5934 "method" "invoke" "name" "clojure.core$load_one/invoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-one") + (dict "class" "clojure.core$load_lib$fn__6866" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-lib/fn" "line" 5981 "method" "invoke" "name" "clojure.core$load_lib$fn__6866/invoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-lib") + (dict "class" "clojure.core$load_lib" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-lib" "line" 5980 "method" "invokeStatic" "name" "clojure.core$load_lib/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-lib") + (dict "class" "clojure.core$load_lib" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-lib" "line" 5959 "method" "doInvoke" "name" "clojure.core$load_lib/doInvoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-lib") + (dict "class" "clojure.lang.RestFn" "file" "RestFn.java" "file-url" nil "flags" + ("tooling" "java") + "line" 145 "method" "applyTo" "name" "clojure.lang.RestFn/applyTo" "type" "java") + (dict "class" "clojure.core$apply" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("tooling" "clj") + "fn" "apply" "line" 669 "method" "invokeStatic" "name" "clojure.core$apply/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/apply") + (dict "class" "clojure.core$load_libs" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-libs" "line" 6022 "method" "invokeStatic" "name" "clojure.core$load_libs/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-libs") + (dict "class" "clojure.core$load_libs" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-libs" "line" 6006 "method" "doInvoke" "name" "clojure.core$load_libs/doInvoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-libs") + (dict "class" "clojure.lang.RestFn" "file" "RestFn.java" "file-url" nil "flags" + ("tooling" "java") + "line" 140 "method" "applyTo" "name" "clojure.lang.RestFn/applyTo" "type" "java") + (dict "class" "clojure.core$apply" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("tooling" "clj") + "fn" "apply" "line" 669 "method" "invokeStatic" "name" "clojure.core$apply/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/apply") + (dict "class" "clojure.core$require" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "require" "line" 6044 "method" "invokeStatic" "name" "clojure.core$require/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/require") + (dict "class" "clojure.core$require" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("dup" "clj") + "fn" "require" "line" 6044 "method" "doInvoke" "name" "clojure.core$require/doInvoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/require") + (dict "class" "clojure.lang.RestFn" "file" "RestFn.java" "file-url" nil "flags" + ("tooling" "java") + "line" 424 "method" "invoke" "name" "clojure.lang.RestFn/invoke" "type" "java"))) + (dict "class" "java.lang.RuntimeException" "compile-like" "false" "message" "Invalid token: :::a" "phase" nil "stacktrace" + ((dict "class" "clojure.lang.Util" "file" "Util.java" "file-url" nil "flags" + ("java") + "line" 221 "method" "runtimeException" "name" "clojure.lang.Util/runtimeException" "type" "java") + (dict "class" "clojure.lang.LispReader" "file" "LispReader.java" "file-url" nil "flags" + ("java") + "line" 412 "method" "interpretToken" "name" "clojure.lang.LispReader/interpretToken" "type" "java") + (dict "class" "clojure.lang.LispReader" "file" "LispReader.java" "file-url" nil "flags" + ("java") + "line" 305 "method" "read" "name" "clojure.lang.LispReader/read" "type" "java") + (dict "class" "clojure.lang.LispReader" "file" "LispReader.java" "file-url" nil "flags" + ("dup" "java") + "line" 216 "method" "read" "name" "clojure.lang.LispReader/read" "type" "java") + (dict "class" "clojure.lang.Compiler" "file" "Compiler.java" "file-url" nil "flags" + ("tooling" "java") + "line" 7631 "method" "load" "name" "clojure.lang.Compiler/load" "type" "java") + (dict "class" "clojure.lang.RT" "file" "RT.java" "file-url" nil "flags" + ("tooling" "java") + "line" 381 "method" "loadResourceScript" "name" "clojure.lang.RT/loadResourceScript" "type" "java") + (dict "class" "clojure.lang.RT" "file" "RT.java" "file-url" nil "flags" + ("dup" "tooling" "java") + "line" 372 "method" "loadResourceScript" "name" "clojure.lang.RT/loadResourceScript" "type" "java") + (dict "class" "clojure.lang.RT" "file" "RT.java" "file-url" nil "flags" + ("tooling" "java") + "line" 459 "method" "load" "name" "clojure.lang.RT/load" "type" "java") + (dict "class" "clojure.lang.RT" "file" "RT.java" "file-url" nil "flags" + ("dup" "tooling" "java") + "line" 424 "method" "load" "name" "clojure.lang.RT/load" "type" "java") + (dict "class" "clojure.core$load$fn__6924" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load/fn" "line" 6167 "method" "invoke" "name" "clojure.core$load$fn__6924/invoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load") + (dict "class" "clojure.core$load" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load" "line" 6166 "method" "invokeStatic" "name" "clojure.core$load/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load") + (dict "class" "clojure.core$load" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load" "line" 6150 "method" "doInvoke" "name" "clojure.core$load/doInvoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load") + (dict "class" "clojure.lang.RestFn" "file" "RestFn.java" "file-url" nil "flags" + ("tooling" "java") + "line" 411 "method" "invoke" "name" "clojure.lang.RestFn/invoke" "type" "java") + (dict "class" "clojure.core$load_one" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-one" "line" 5939 "method" "invokeStatic" "name" "clojure.core$load_one/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-one") + (dict "class" "clojure.core$load_one" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-one" "line" 5934 "method" "invoke" "name" "clojure.core$load_one/invoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-one") + (dict "class" "clojure.core$load_lib$fn__6866" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-lib/fn" "line" 5981 "method" "invoke" "name" "clojure.core$load_lib$fn__6866/invoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-lib") + (dict "class" "clojure.core$load_lib" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-lib" "line" 5980 "method" "invokeStatic" "name" "clojure.core$load_lib/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-lib") + (dict "class" "clojure.core$load_lib" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-lib" "line" 5959 "method" "doInvoke" "name" "clojure.core$load_lib/doInvoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-lib") + (dict "class" "clojure.lang.RestFn" "file" "RestFn.java" "file-url" nil "flags" + ("tooling" "java") + "line" 145 "method" "applyTo" "name" "clojure.lang.RestFn/applyTo" "type" "java") + (dict "class" "clojure.core$apply" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("tooling" "clj") + "fn" "apply" "line" 669 "method" "invokeStatic" "name" "clojure.core$apply/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/apply") + (dict "class" "clojure.core$load_libs" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-libs" "line" 6022 "method" "invokeStatic" "name" "clojure.core$load_libs/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-libs") + (dict "class" "clojure.core$load_libs" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "load-libs" "line" 6006 "method" "doInvoke" "name" "clojure.core$load_libs/doInvoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/load-libs") + (dict "class" "clojure.lang.RestFn" "file" "RestFn.java" "file-url" nil "flags" + ("tooling" "java") + "line" 140 "method" "applyTo" "name" "clojure.lang.RestFn/applyTo" "type" "java") + (dict "class" "clojure.core$apply" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("tooling" "clj") + "fn" "apply" "line" 669 "method" "invokeStatic" "name" "clojure.core$apply/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/apply") + (dict "class" "clojure.core$require" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("clj") + "fn" "require" "line" 6044 "method" "invokeStatic" "name" "clojure.core$require/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/require") + (dict "class" "clojure.core$require" "file" "core.clj" "file-url" "jar:file:/Users/vemv/.m2/repository/org/clojure/clojure/1.12.900/clojure-1.12.900.jar!/clojure/core.clj" "flags" + ("dup" "clj") + "fn" "require" "line" 6044 "method" "doInvoke" "name" "clojure.core$require/doInvoke" "ns" "clojure.core" "type" "clj" "var" "clojure.core/require") + (dict "class" "clojure.lang.RestFn" "file" "RestFn.java" "file-url" nil "flags" + ("tooling" "java") + "line" 424 "method" "invoke" "name" "clojure.lang.RestFn/invoke" "type" "java") )))) + +(describe "cider-ns--present-error" + (it "Works without throwing errors" + (with-clojure-buffer "" + (cider-ns--present-error cider-ns-tests--sample-causes) + (when-let ((b (get-buffer "*cider-error*"))) ;; Clean it up for other tests + (kill-buffer b))))) diff --git a/test/cider_ns_tests.clj b/test/cider_ns_tests.clj new file mode 100644 index 000000000..66c0395a7 --- /dev/null +++ b/test/cider_ns_tests.clj @@ -0,0 +1,2 @@ +(ns cider-ns-tests + "Supports cider-ns-tests.el") From 23540fdfcdac02b2d18e51a170cd07b32d20e80d Mon Sep 17 00:00:00 2001 From: Benjamin <38900087+benjamin-asdf@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:41:17 +0100 Subject: [PATCH 064/212] Add scittle to runtime versions (#3600) --- CHANGELOG.md | 6 ++++++ cider-connection.el | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14fd4a477..2626c7999 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.0/CHANGELOG.md#0230-2024-03-03). - Updates [Logjam](https://github.com/clojure-emacs/logjam/blob/v0.3.0/CHANGELOG.md#030-2024-03-03). + +### Bugs fixed + +- [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack in when using `cider-jack-in-clj`. + + ## 1.13.1 (2024-02-01) ### Bugs fixed diff --git a/cider-connection.el b/cider-connection.el index 598de4045..a72e014e5 100644 --- a/cider-connection.el +++ b/cider-connection.el @@ -347,6 +347,7 @@ See `cider-connection-capabilities'." ('clojure '(clojure jvm-compilation-errors)) ('babashka '(babashka jvm-compilation-errors)) ('nbb '(cljs)) + ('scittle '(cljs)) (_ '())) (when (eq cider-repl-type 'cljs) @@ -457,12 +458,19 @@ But helps us know if this is a nbb repl, or not." (when nrepl-versions (nrepl-dict-get nrepl-versions "nbb-nrepl")))) +(defun cider--scittle-nrepl-version () + "Retrieve the underlying connection's scittle version." + (with-current-buffer (cider-current-repl) + (when nrepl-versions + (nrepl-dict-get nrepl-versions "scittle-nrepl")))) + (defun cider-runtime () "Return the runtime of the nREPl server." (cond ((cider--clojure-version) 'clojure) ((cider--babashka-version) 'babashka) ((cider--nbb-nrepl-version) 'nbb) + ((cider--scittle-nrepl-version) 'scittle) (t 'generic))) (defun cider-runtime-clojure-p () From 6403a8d8b59f1e9f2e02cec976e577dd098f44c1 Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 10 Mar 2024 20:15:19 +0100 Subject: [PATCH 065/212] Use cider-nrepl 0.47.0 (#3631) --- CHANGELOG.md | 6 +-- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2626c7999..410510837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,10 +13,10 @@ - [#3626](https://github.com/clojure-emacs/cider/issues/3626): `cider-ns-refresh`: jump to the relevant file/line on errors. - [#3628](https://github.com/clojure-emacs/cider/issues/3628): `cider-ns-refresh`: summarize errors as an overlay. - Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). -- Bump the injected `cider-nrepl` to [0.46.0](https://github.com/clojure-emacs/cider-nrepl/blob/1cc9b2/CHANGELOG.md#0460-2024-0305). - - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.0/CHANGELOG.md#0230-2024-03-03). +- Bump the injected `cider-nrepl` to [0.47.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.47.0/CHANGELOG.md#0470-2024-03-10). + - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.2/CHANGELOG.md#0232-2024-03-10). - Updates [Logjam](https://github.com/clojure-emacs/logjam/blob/v0.3.0/CHANGELOG.md#030-2024-03-03). - + - Updates [Compliment](https://github.com/alexander-yakushev/compliment/blob/951604/CHANGELOG.md#master-unreleased). ### Bugs fixed diff --git a/cider.el b/cider.el index 025cd4a30..dc94d5218 100644 --- a/cider.el +++ b/cider.el @@ -527,7 +527,7 @@ the artifact.") (defconst cider-latest-clojure-version "1.10.1" "Latest supported version of Clojure.") -(defconst cider-required-middleware-version "0.46.0" +(defconst cider-required-middleware-version "0.47.0" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index 7d3de4d31..f119a37a2 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.46.0"]]) + :plugins [[cider/cider-nrepl "0.47.0"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index 00c7c6540..b4581ca7f 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.46.0"] + :plugins [[cider/cider-nrepl "0.47.0"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 384a74d5e..842f332d5 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.46.0"]] +:plugins [[cider/cider-nrepl "0.47.0"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.46.0"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.47.0"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.46.0"]]) + concat '[[cider/cider-nrepl "0.47.0"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.46.0"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.47.0"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.46.0"} + cider/cider-nrepl {:mvn/version "0.47.0"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.46.0' + devImplementation 'cider:cider-nrepl:0.47.0' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 849de0873..03d8deaaf 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.46.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.47.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -318,7 +318,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.46.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.47.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index 36be3a40a..36e925009 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.46.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.47.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index 71a140397..7b057c45e 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.46.0' + devImplementation 'cider:cider-nrepl:0.47.0' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index e33763ac0..15c1540de 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.46.0") + (setq-local cider-injected-middleware-version "0.47.0") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -154,7 +154,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -167,7 +167,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -179,7 +179,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -192,7 +192,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.46.0") + (shell-quote-argument "cider/cider-nrepl:0.47.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -201,7 +201,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.46.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.47.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -218,7 +218,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -231,7 +231,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.46.0") + (shell-quote-argument "cider/cider-nrepl:0.47.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -253,7 +253,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -264,7 +264,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.46.0") + (shell-quote-argument "cider/cider-nrepl:0.47.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -272,7 +272,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.46.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.47.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -287,14 +287,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.46.0")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.47.0")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.46.0"))) + :to-equal '(("cider/cider-nrepl" "0.47.0"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -323,7 +323,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.46.0") + ("cider/cider-nrepl" "0.47.0") ("mx.cider/lein-enrich-classpath" "1.19.0"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -334,7 +334,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.46.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -352,7 +352,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.46.0") + (shell-quote-argument "cider/cider-nrepl:0.47.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -447,7 +447,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.46.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.47.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -461,7 +461,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.46.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.47.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -478,7 +478,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.46.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.47.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -488,7 +488,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.46.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.47.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -516,7 +516,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.46.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.47.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.46.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.47.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From c4fa1a84a3b3d03ef5f61cc5d33ff4e91b9a1dce Mon Sep 17 00:00:00 2001 From: filipesilva Date: Sun, 10 Mar 2024 20:25:49 +0100 Subject: [PATCH 066/212] Support new `cider.clj-reload/reload` cider-nrepl middlewarex --- CHANGELOG.md | 3 ++ cider-ns.el | 33 ++++++++++++++++--- .../ROOT/pages/usage/misc_features.adoc | 17 ++++++++++ 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 410510837..d17f69c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ - [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode). - The `clojure-mode` dependency is still required for CIDER to function. - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with `clojure-ts-mode` (yet). +- [#3624](https://github.com/clojure-emacs/cider/pull/3624): Support new `cider.clj-reload/reload` cider-nrepl middleware. + - adds `cider-ns-refresh-tool` defcustom, defaulting to `'tools.namespace`. + - you can change it to `'clj-reload` to use [clj-reload](https://github.com/tonsky/clj-reload) instead of [tools.namespace](https://github.com/clojure/tools.namespace). ### Changes diff --git a/cider-ns.el b/cider-ns.el index 51ab0ed12..70e06d0be 100644 --- a/cider-ns.el +++ b/cider-ns.el @@ -118,6 +118,14 @@ namespace-qualified function of zero arity." :group 'cider :package-version '(cider . "0.10.0")) +(defcustom cider-ns-code-reload-tool 'tools.namespace + "Which tool to use for ns refresh. +Current options: tools.namespace and clj-reload." + :group 'cider + :type '(choice (const :tag "tools.namespace https://github.com/clojure/tools.namespace" tools.namespace) + (const :tag "clj-reload https://github.com/tonsky/clj-reload" clj-reload)) + :package-version '(cider . "1.14.0")) + (defun cider-ns--present-error (error) "Render the `ERROR' stacktrace, and jump to the adequate file/line location, @@ -156,7 +164,7 @@ presenting the error message as an overlay." (defun cider-ns-refresh--handle-response (response log-buffer) "Refresh LOG-BUFFER with RESPONSE." - (nrepl-dbind-response response (out err reloading status error error-ns after before) + (nrepl-dbind-response response (out err reloading progress status error error-ns after before) (cl-flet* ((log (message &optional face) (cider-emit-into-popup-buffer log-buffer message face t)) @@ -184,6 +192,9 @@ presenting the error message as an overlay." (reloading (log-echo (format "Reloading %s\n" reloading) 'font-lock-string-face)) + (progress + (log-echo progress 'font-lock-string-face)) + ((member "reloading" (nrepl-dict-keys response)) (log-echo "Nothing to reload\n" 'font-lock-string-face)) @@ -223,6 +234,19 @@ Its behavior is controlled by `cider-ns-save-files-on-refresh' and (file-in-directory-p buffer-file-name dir)) dirs))))))) +(defun cider-ns--reload-op (op-name) + "Return the reload operation to use. +Based on OP-NAME and the value of cider-ns-code-reload-tool defcustom." + (list "op" + (if (eq cider-ns-code-reload-tool 'tools.namespace) + (cond ((string= op-name "reload") "refresh") + ((string= op-name "reload-all") "refresh-all") + ((string= op-name "reload-clear") "refresh-clear")) + + (cond ((string= op-name "reload") "cider.clj-reload/reload") + ((string= op-name "reload-all") "cider.clj-reload/reload-all") + ((string= op-name "reload-clear") "cider.clj-reload/reload-clear"))))) + ;;;###autoload (defun cider-ns-reload (&optional prompt) "Send a (require 'ns :reload) to the REPL. @@ -275,9 +299,10 @@ refresh functions (defined in `cider-ns-refresh-before-fn' and (interactive "p") (cider-ensure-connected) (cider-ensure-op-supported "refresh") + (cider-ensure-op-supported "cider.clj-reload/reload") (cider-ns-refresh--save-modified-buffers) (let ((clear? (member mode '(clear 16))) - (refresh-all? (member mode '(refresh-all 4))) + (all? (member mode '(refresh-all 4))) (inhibit-refresh-fns (member mode '(inhibit-fns -1)))) (cider-map-repls :clj (lambda (conn) @@ -292,11 +317,11 @@ refresh functions (defined in `cider-ns-refresh-before-fn' and nil t)) (when clear? - (cider-nrepl-send-sync-request '("op" "refresh-clear") conn)) + (cider-nrepl-send-sync-request (cider-ns--reload-op "reload-clear") conn)) (cider-nrepl-send-request (thread-last (map-merge 'list - `(("op" ,(if refresh-all? "refresh-all" "refresh"))) + `(,(cider-ns--reload-op (if all? "reload-all" "reload"))) (cider--nrepl-print-request-map fill-column) (when (and (not inhibit-refresh-fns) cider-ns-refresh-before-fn) `(("before" ,cider-ns-refresh-before-fn))) diff --git a/doc/modules/ROOT/pages/usage/misc_features.adoc b/doc/modules/ROOT/pages/usage/misc_features.adoc index 96f0bfc6a..cfa2f93ea 100644 --- a/doc/modules/ROOT/pages/usage/misc_features.adoc +++ b/doc/modules/ROOT/pages/usage/misc_features.adoc @@ -130,6 +130,23 @@ and `cider-ns-reload-all` commands can be used instead. These commands invoke Clojure's `+(require ... :reload)+` and `+(require ... :reload-all)+` commands at the REPL. +You can also use https://github.com/tonsky/clj-reload[clj-reload] instead. +It provides support for +https://github.com/tonsky/clj-reload/blob/469da68/README.md#usage-keeping-vars-between-reloads[keeping vars between reloads] +among some +https://github.com/tonsky/clj-reload/blob/469da68/README.md#comparison-toolsnamespace[other differences] +from `tools.namespace`. + +[source,lisp] +---- +(setq cider-ns-code-reload-tool 'clj-reload) +---- + +With `clj-reload` you should set the source dirs as described in +https://github.com/tonsky/clj-reload/blob/469da68/README.md##usage[the usage docs] +. If you don't set them manually, it will default to the current project's resource dirs in the same +way `tools.namespace` does. + == CIDER Selector The `cider-selector` (kbd:[C-c M-s]) command allows you to quickly navigate to From 1401e26e2d373e00a064ae8fc7240e083200c5c6 Mon Sep 17 00:00:00 2001 From: vemv Date: Thu, 14 Mar 2024 20:04:44 +0100 Subject: [PATCH 067/212] Fix typo: `seletor` -> `selector` --- test/cider-selector-tests.el | 12 ++++++------ test/clojure-ts-mode/cider-selector-ts-tests.el | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/cider-selector-tests.el b/test/cider-selector-tests.el index ac585efe7..76243e68f 100644 --- a/test/cider-selector-tests.el +++ b/test/cider-selector-tests.el @@ -36,16 +36,16 @@ ;; selector -(describe "cider-seletor-method-c" +(describe "cider-selector-method-c" (it "switches to most recently visited clojure-mode buffer" (cider-test-selector-method ?c 'clojure-mode "*testfile*.clj"))) -(describe "cider-seletor-method-e" +(describe "cider-selector-method-e" (it "switches to most recently visited emacs-lisp-mode buffer" (kill-buffer "*scratch*") (cider-test-selector-method ?e 'emacs-lisp-mode "*testfile*.el"))) -(describe "cider-seletor-method-r" +(describe "cider-selector-method-r" :var (cider-current-repl) (it "switches to current REPL buffer" (spy-on 'cider-current-repl :and-return-value "*cider-repl xyz*") @@ -60,15 +60,15 @@ ;; (message "%S" (nrepl-messages-buffer (cider-current-repl))) ;; (cider-test-selector-method ?m nil "*nrepl-messages some-id*"))))) -(describe "cider-seletor-method-x" +(describe "cider-selector-method-x" (it "switches to *cider-error* buffer" (cider-test-selector-method ?x 'cider-stacktrace-mode "*cider-error*"))) -(describe "cider-seletor-method-d" +(describe "cider-selector-method-d" (it "switches to *cider-doc* buffer" (cider-test-selector-method ?d 'cider-stacktrace-mode "*cider-doc*"))) -(describe "cider-seletor-method-s" +(describe "cider-selector-method-s" :var (cider-scratch-find-or-create-buffer) (it "switches to *cider-scratch* buffer" (spy-on 'cider-scratch-find-or-create-buffer :and-return-value "*cider-scratch*") diff --git a/test/clojure-ts-mode/cider-selector-ts-tests.el b/test/clojure-ts-mode/cider-selector-ts-tests.el index b7fb126b4..86aeb4847 100644 --- a/test/clojure-ts-mode/cider-selector-ts-tests.el +++ b/test/clojure-ts-mode/cider-selector-ts-tests.el @@ -31,7 +31,7 @@ (require 'clojure-ts-mode) (require 'cider-selector-test-utils "test/cider-selector-tests") -(describe "cider-seletor-method-c" +(describe "cider-selector-method-c" (it "switches to most recently visited clojure-ts-mode buffer" (cider-test-selector-method ?c 'clojure-ts-mode "*treesitter-test*.clj"))) From c07ace554458cd8f2522dff9164cb7b298bee6fe Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Thu, 6 Jul 2023 06:38:17 +0900 Subject: [PATCH 068/212] Display debug-on-exception messages --- cider-debug.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cider-debug.el b/cider-debug.el index f06a8c06b..9918531d7 100644 --- a/cider-debug.el +++ b/cider-debug.el @@ -132,7 +132,10 @@ configure `cider-debug-prompt' instead." (member "stack" status)) ;; TODO: Make the error buffer a bit friendlier when we're just printing ;; the stack. - (cider--render-stacktrace-causes causes)) + (nrepl-dbind-response response (causes caught-msg) + (if cider-show-error-buffer + (cider--render-stacktrace-causes causes) + (cider--debug-display-result-overlay nil caught-msg)))) (when (member "need-debug-input" status) (cider--handle-debug response)) (when (member "done" status) @@ -154,15 +157,17 @@ configure `cider-debug-prompt' instead." #("." 0 1 (display (left-fringe right-triangle))) "Used as an overlay's before-string prop to place a fringe arrow.") -(defun cider--debug-display-result-overlay (value) +(defun cider--debug-display-result-overlay (value caught) "Place an overlay at point displaying VALUE." (when cider-debug-use-overlays ;; This is cosmetic, let's ensure it doesn't break the session no matter what. (ignore-errors ;; Result - (cider--make-result-overlay (cider-font-lock-as-clojure value) + (cider--make-result-overlay (or caught (cider-font-lock-as-clojure value)) :where (point-marker) :type 'debug-result + :prepend-face (if caught 'cider-error-overlay-face + 'cider-result-overlay-face) 'before-string cider--fringe-arrow-string) ;; Code (cider--make-overlay (save-excursion (clojure-backward-logical-sexp 1) (point)) @@ -652,7 +657,7 @@ is a coordinate measure in sexps." RESPONSE is a message received from the nrepl describing the input needed. It is expected to contain at least \"key\", \"input-type\", and \"prompt\", and possibly other entries depending on the input-type." - (nrepl-dbind-response response (debug-value key input-type prompt inspect) + (nrepl-dbind-response response (debug-value key input-type prompt inspect caught-msg) (condition-case-unless-debug e (progn (pcase input-type @@ -674,7 +679,7 @@ needed. It is expected to contain at least \"key\", \"input-type\", and ;; flicker even if we immediately recreate the overlays. (cider--debug-remove-overlays) (when cider-debug-use-overlays - (cider--debug-display-result-overlay debug-value)) + (cider--debug-display-result-overlay debug-value caught-msg)) (setq cider--debug-mode-response response) (cider--debug-mode 1))) (when inspect @@ -766,7 +771,7 @@ The boolean value of FORCE will be sent in the reply." ;; Is HERE inside the sexp being debugged? (when (or (< here (point)) (save-excursion - (forward-sexp 1) + (clojure-forward-logical-sexp 1) (> here (point)))) (user-error "Point is outside the sexp being debugged")) ;; Move forward until start of sexp. From f24060eb8be8084d318337873df1f9b5c3dd58e3 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Tue, 26 Mar 2024 00:08:08 +0800 Subject: [PATCH 069/212] Fix lint warnings --- cider-debug.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cider-debug.el b/cider-debug.el index 9918531d7..5b9a69b38 100644 --- a/cider-debug.el +++ b/cider-debug.el @@ -125,17 +125,16 @@ configure `cider-debug-prompt' instead." (defun cider--debug-response-handler (response) "Handles RESPONSE from the cider.debug middleware." - (nrepl-dbind-response response (status id causes) + (nrepl-dbind-response response (status id causes caught-msg) (when (member "enlighten" status) (cider--handle-enlighten response)) (when (or (member "eval-error" status) (member "stack" status)) ;; TODO: Make the error buffer a bit friendlier when we're just printing ;; the stack. - (nrepl-dbind-response response (causes caught-msg) - (if cider-show-error-buffer - (cider--render-stacktrace-causes causes) - (cider--debug-display-result-overlay nil caught-msg)))) + (if cider-show-error-buffer + (cider--render-stacktrace-causes causes) + (cider--debug-display-result-overlay nil caught-msg))) (when (member "need-debug-input" status) (cider--handle-debug response)) (when (member "done" status) @@ -158,7 +157,8 @@ configure `cider-debug-prompt' instead." "Used as an overlay's before-string prop to place a fringe arrow.") (defun cider--debug-display-result-overlay (value caught) - "Place an overlay at point displaying VALUE." + "Place an overlay at point displaying VALUE. +When CAUGHT is non-nil, display it as an error message overlay." (when cider-debug-use-overlays ;; This is cosmetic, let's ensure it doesn't break the session no matter what. (ignore-errors From bf26bc658dde4e9fcd5a72bab0e95f588ef0a30a Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Tue, 26 Mar 2024 00:11:20 +0800 Subject: [PATCH 070/212] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d17f69c16..470e425d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### New features +- [#3366](https://github.com/clojure-emacs/cider/pull/3366): Support display of error overlays with #dbg! and #break! reader macros. - [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode). - The `clojure-mode` dependency is still required for CIDER to function. - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with `clojure-ts-mode` (yet). From bd72fe197b48a8fe9247e429ef5017d079cbbbef Mon Sep 17 00:00:00 2001 From: Daniel Slutsky Date: Sun, 31 Mar 2024 00:26:14 +0300 Subject: [PATCH 071/212] Update additional_packages.adoc Added information about clay.el, a CIDER extension to support Clay - a tool for data visualization and literate programming. --- doc/modules/ROOT/pages/additional_packages.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/modules/ROOT/pages/additional_packages.adoc b/doc/modules/ROOT/pages/additional_packages.adoc index 1e1e0a142..f074a4a67 100644 --- a/doc/modules/ROOT/pages/additional_packages.adoc +++ b/doc/modules/ROOT/pages/additional_packages.adoc @@ -95,6 +95,13 @@ https://github.com/jonase/kibit[kibit]. http://clojure-emacs.github.io/sayid/[sayid] is a powerful alternative of CIDER's built-in basic tracing functionality. +=== clay + +https://github.com/scicloj/clay.el[clay.el] provides CIDER support for https://scicloj.github.io/clay/[Clay], +a minimalistic tool for data visualization and literate programming. +It provides interactive functions for sending a single Clojure form to be visualized in the browser, +and for rendering a whole namespace as a notebook (or slideshow) in different formats. + == Generic Emacs Extensions Most packages in the following list are standard Emacs minor modes that work @@ -207,3 +214,4 @@ forms directly in the REPL. It's basically a simple alternative of CIDER, which provides a subset of CIDER's functionality. + From 7439167ca666e19819929fafc0377815a783b7fe Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 17 Apr 2024 10:24:34 +0300 Subject: [PATCH 072/212] [Docs] Extend the "Wording with docs" section --- .../usage/working_with_documentation.adoc | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/doc/modules/ROOT/pages/usage/working_with_documentation.adoc b/doc/modules/ROOT/pages/usage/working_with_documentation.adoc index 3cace4ae4..fe72f33f5 100644 --- a/doc/modules/ROOT/pages/usage/working_with_documentation.adoc +++ b/doc/modules/ROOT/pages/usage/working_with_documentation.adoc @@ -11,16 +11,39 @@ press kbd:[C-c C-d C-d] then. This open a documentation buffer containing all the relevant information about the thing referenced by the symbol (special form, var, Java method, etc). +TIP: You can also use the keybinding kbd:[C-c C-d d]. Most CIDER keymaps +provide two versions of the same keybinding (with or without the final `Control`), +as some people prefer to keep holding `Control` and some don't. + +Normally the command operates on the symbol at point. If invoked with a prefix argument, or no symbol is found at point, it will prompt for a symbol. + +NOTE: If using `enrich-classpath`, Java doc comments are available and rendered in the same way that Clojure docstrings are. +They're often much more handy than opening Javadoc in a browser. Starting from CIDER 1.8.0, +the HTML-like language that they use is nicely rendered into syntax-colored strings, well-aligned tables, etc + == JavaDoc CIDER provides a quick access to the online Javadoc documentation -via the command `cider-javadoc`. +via the command `cider-javadoc` (kbd:[C-c C-d j] or kbd:[C-c C-d C-j]), using your default browser. -This requires `enrich-classpath` to be enabled. +Normally the command operates on the symbol at point. If invoked with a prefix argument, or no symbol is found at point, it will prompt for a symbol. -NOTE: if using `enrich-classpath`, Java doc comments are available and rendered in the same way that Clojure docstrings are. -They're often much more handy than opening Javadoc in a browser. Starting from CIDER 1.8.0, -the HTML-like language that they use is nicely rendered into syntax-colored strings, well-aligned tables, etc +If you don't want CIDER to use an external browser to display the JavaDoc you can use the built-in +EWW browser instead like this: + +[source,lisp] +---- +(setq browse-url-browser-function 'eww-browse-url) +---- + +== Searching in Docstrings + +CIDER provides a handy alternative of `clojure.repl/find-doc` - `cider-apropos-documentation` (kbd:[C-c C-d f] or +kbd:[C-c C-d C-f]). This allows you to search in the docstrings of all loaded vars with the results presented +in Emacs's `apropos` interface. + +Alternatively you can use `cider-apropos-documentation-select` (kbd:[C-c C-d e] or kbd:[C-c C-d C-e]), which presents you the matching +results as a list in the minibuffer, so you can quickly select what you need (especially if you're using some package like `ido` or `vertico`). == ClojureDocs From d6d16e3da34f74f12285b6216c3f9a64a0501d11 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 17 Apr 2024 10:41:51 +0300 Subject: [PATCH 073/212] [Docs] Move "code reloading" docs to their own section --- doc/modules/ROOT/nav.adoc | 1 + .../ROOT/pages/usage/code_reloading.adoc | 116 ++++++++++++++++++ .../ROOT/pages/usage/misc_features.adoc | 97 --------------- 3 files changed, 117 insertions(+), 97 deletions(-) create mode 100644 doc/modules/ROOT/pages/usage/code_reloading.adoc diff --git a/doc/modules/ROOT/nav.adoc b/doc/modules/ROOT/nav.adoc index 121efcc78..06035fd88 100644 --- a/doc/modules/ROOT/nav.adoc +++ b/doc/modules/ROOT/nav.adoc @@ -20,6 +20,7 @@ ** xref:usage/cider_mode.adoc[Using cider-mode] ** xref:usage/code_evaluation.adoc[Code Evaluation] ** xref:usage/code_completion.adoc[Code Completion] +** xref:usage/code_reloading.adoc[Code Reloading] ** xref:usage/pretty_printing.adoc[Pretty Printing] ** xref:usage/dealing_with_errors.adoc[Dealing with Errors] ** xref:usage/working_with_documentation.adoc[Working with Documentation] diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc new file mode 100644 index 000000000..4be5f5b7b --- /dev/null +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -0,0 +1,116 @@ += Code Reloading + +While Clojure's and CIDER's interactive programming style means you'll +restart your application far less often than with other languages and +development environments, sometimes you'll want to clean everything up +and reload one or more namespaces to ensure that they are up to date +and there are no temporary definitions hanging around. + +== "Reloaded" Workflow + +Typing kbd:[C-c M-n r] or kbd:[C-c M-n M-r] will invoke +`cider-ns-refresh` and reload all modified Clojure files on the +classpath. + +Adding a prefix argument, kbd:[C-u C-c M-n r], will reload all +the namespaces on the classpath unconditionally, regardless of their +modification status. + +Adding a double prefix argument, kbd:[C-u C-u M-n r], will first +clear the state of the namespace tracker before reloading. This is +useful for recovering from some classes of error that normal reloads +would otherwise not recover from. A good example is circular +dependencies. The trade-off is that stale code from any deleted files +may not be completely unloaded. + +`cider-ns-refresh` wraps +https://github.com/clojure/tools.namespace[clojure.tools.namespace], and as +such the same +https://github.com/clojure/tools.namespace#reloading-code-motivation[benefits] +and +https://github.com/clojure/tools.namespace#reloading-code-preparing-your-application[caveats] +regarding writing reloadable code also apply. + +The above three operations are analogous to +http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh[`clojure.tools.namespace.repl/refresh`], +http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh-all[`clojure.tools.namespace.repl/refresh-all`] +and +http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/clear[`clojure.tools.namespace.repl/clear`] +(followed by a normal refresh), respectively. + +=== Configuration + +You can define Clojure functions to be called before reloading, and after a +successful reload, when using `cider-ns-refresh`: + +[source,lisp] +---- +(setq cider-ns-refresh-before-fn "user/stop-system!" + cider-ns-refresh-after-fn "user/start-system!") +---- + +These must be set to the namespace-qualified names of vars bound to +functions of no arguments. The functions must be synchronous +(blocking), and are expected to be side-effecting - they will always +be executed serially, without retries. + +By default, messages regarding the status of the in-progress reload +will be displayed in the echo area after you call +`cider-ns-refresh`. The same information will also be recorded in the +`+*cider-ns-refresh-log*+` buffer, along with anything printed to +`+*out*+` or `+*err*+` by `cider-ns-refresh-before-fn` and +`cider-ns-refresh-start-fn`. + +You can make the `+*cider-ns-refresh-log*+` buffer display automatically +after you call `cider-ns-refresh` by setting the +`cider-ns-refresh-show-log-buffer` variable to a non-nil value. This +will also prevent any related messages from also being displayed in +the echo area. + +[source,lisp] +---- +(setq cider-ns-refresh-show-log-buffer t) +---- + +By default, CIDER will prompt for whether to save all modified `clojure-mode` +buffers visiting files on the classpath. You can customize this behavior with +`cider-ns-save-files-on-refresh` and `cider-ns-save-files-on-refresh-modes`. + +=== Using clj-reload + +You can also use https://github.com/tonsky/clj-reload[clj-reload] instead. +It provides support for +https://github.com/tonsky/clj-reload/blob/469da68/README.md#usage-keeping-vars-between-reloads[keeping vars between reloads] +among some +https://github.com/tonsky/clj-reload/blob/469da68/README.md#comparison-toolsnamespace[other differences] +from `tools.namespace`. + +[source,lisp] +---- +(setq cider-ns-code-reload-tool 'clj-reload) +---- + +With `clj-reload` you should set the source dirs as described in +https://github.com/tonsky/clj-reload/blob/469da68/README.md##usage[the usage docs] +. If you don't set them manually, it will default to the current project's resource dirs in the same +way `tools.namespace` does. + +== Basic Code Reloading + +Sometimes, `cider-ns-refresh` may not work for you. If you're looking +for a bit more forceful reloading the `cider-ns-reload` +and `cider-ns-reload-all` commands can be used instead. These commands +invoke Clojure's `+(require ... :reload)+` and `+(require +... :reload-all)+` commands at the REPL. + +TIP: Theses commands don't depend on `cider-nrepl`, so they are always available. + +== Keybindings + +|=== +| Command | Keyboard shortcut | Description + +| `cider-ns-refresh` +| kbd:[C-c M-n r] + +kbd:[C-c M-n M-r] +| Reload all modified Clojure files on the classpath. Adding a prefix argument, kbd:[C-u C-c M-n r], will reload all the namespaces on the classpath unconditionally, regardless of their modification status. Adding a double prefix argument, kbd:[C-u C-u M-n r], will first clear the state of the namespace tracker before reloading. diff --git a/doc/modules/ROOT/pages/usage/misc_features.adoc b/doc/modules/ROOT/pages/usage/misc_features.adoc index cfa2f93ea..414758792 100644 --- a/doc/modules/ROOT/pages/usage/misc_features.adoc +++ b/doc/modules/ROOT/pages/usage/misc_features.adoc @@ -50,103 +50,6 @@ Don't forget you also have a couple of third-party alternative: - The much more sophisticated AST-powered "find usages" provided by `clj-refactor.el` - https://github.com/bbatsov/projectile[Projectile's] "grep in project" (`projectile-grep`, typically bound to kbd:[C-c p g]) -== Reloading Code - -While Clojure's and CIDER's interactive programming style means you'll -restart your application far less often than with other languages and -development environments, sometimes you'll want to clean everything up -and reload one or more namespaces to ensure that they are up to date -and there are no temporary definitions hanging around. - -Typing kbd:[C-c M-n r] or kbd:[C-c M-n M-r] will invoke -`cider-ns-refresh` and reload all modified Clojure files on the -classpath. - -Adding a prefix argument, kbd:[C-u C-c M-n r], will reload all -the namespaces on the classpath unconditionally, regardless of their -modification status. - -Adding a double prefix argument, kbd:[C-u C-u M-n r], will first -clear the state of the namespace tracker before reloading. This is -useful for recovering from some classes of error that normal reloads -would otherwise not recover from. A good example is circular -dependencies. The trade-off is that stale code from any deleted files -may not be completely unloaded. - -`cider-ns-refresh` wraps -https://github.com/clojure/tools.namespace[clojure.tools.namespace], and as -such the same -https://github.com/clojure/tools.namespace#reloading-code-motivation[benefits] -and -https://github.com/clojure/tools.namespace#reloading-code-preparing-your-application[caveats] -regarding writing reloadable code also apply. - -The above three operations are analogous to -http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh[`clojure.tools.namespace.repl/refresh`], -http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh-all[`clojure.tools.namespace.repl/refresh-all`] -and -http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/clear[`clojure.tools.namespace.repl/clear`] -(followed by a normal refresh), respectively. - -You can define Clojure functions to be called before reloading, and after a -successful reload, when using `cider-ns-refresh`: - -[source,lisp] ----- -(setq cider-ns-refresh-before-fn "user/stop-system!" - cider-ns-refresh-after-fn "user/start-system!") ----- - -These must be set to the namespace-qualified names of vars bound to -functions of no arguments. The functions must be synchronous -(blocking), and are expected to be side-effecting - they will always -be executed serially, without retries. - -By default, messages regarding the status of the in-progress reload -will be displayed in the echo area after you call -`cider-ns-refresh`. The same information will also be recorded in the -`+*cider-ns-refresh-log*+` buffer, along with anything printed to -`+*out*+` or `+*err*+` by `cider-ns-refresh-before-fn` and -`cider-ns-refresh-start-fn`. - -You can make the `+*cider-ns-refresh-log*+` buffer display automatically -after you call `cider-ns-refresh` by setting the -`cider-ns-refresh-show-log-buffer` variable to a non-nil value. This -will also prevent any related messages from also being displayed in -the echo area. - -[source,lisp] ----- -(setq cider-ns-refresh-show-log-buffer t) ----- - -By default, CIDER will prompt for whether to save all modified `clojure-mode` -buffers visiting files on the classpath. You can customize this behavior with -`cider-ns-save-files-on-refresh` and `cider-ns-save-files-on-refresh-modes`. - -Sometimes, `cider-ns-refresh` may not work for you. If you're looking -for a bit more forceful reloading the `cider-ns-reload` -and `cider-ns-reload-all` commands can be used instead. These commands -invoke Clojure's `+(require ... :reload)+` and `+(require -... :reload-all)+` commands at the REPL. - -You can also use https://github.com/tonsky/clj-reload[clj-reload] instead. -It provides support for -https://github.com/tonsky/clj-reload/blob/469da68/README.md#usage-keeping-vars-between-reloads[keeping vars between reloads] -among some -https://github.com/tonsky/clj-reload/blob/469da68/README.md#comparison-toolsnamespace[other differences] -from `tools.namespace`. - -[source,lisp] ----- -(setq cider-ns-code-reload-tool 'clj-reload) ----- - -With `clj-reload` you should set the source dirs as described in -https://github.com/tonsky/clj-reload/blob/469da68/README.md##usage[the usage docs] -. If you don't set them manually, it will default to the current project's resource dirs in the same -way `tools.namespace` does. - == CIDER Selector The `cider-selector` (kbd:[C-c M-s]) command allows you to quickly navigate to From 955afdcbdbd03a64361b87d3dd5a0b2fa4f8779f Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 17 Apr 2024 10:50:56 +0300 Subject: [PATCH 074/212] [Docs] Add a note --- doc/modules/ROOT/pages/usage/code_reloading.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc index 4be5f5b7b..71d554d36 100644 --- a/doc/modules/ROOT/pages/usage/code_reloading.adoc +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -8,6 +8,10 @@ and there are no temporary definitions hanging around. == "Reloaded" Workflow +NOTE: The workflow described below was made popular by +this https://www.cognitect.com/blog/2013/06/04/clojure-workflow-reloaded[blog article], +which served as the primary inspiration for CIDER's take on it. + Typing kbd:[C-c M-n r] or kbd:[C-c M-n M-r] will invoke `cider-ns-refresh` and reload all modified Clojure files on the classpath. From 75412f96b41884c9afbbb956db12ee30a8584a38 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 17 Apr 2024 10:55:36 +0300 Subject: [PATCH 075/212] [Docs] Add missing reload keybindings --- doc/modules/ROOT/pages/usage/code_reloading.adoc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc index 71d554d36..c40d00efc 100644 --- a/doc/modules/ROOT/pages/usage/code_reloading.adoc +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -102,8 +102,8 @@ way `tools.namespace` does. == Basic Code Reloading Sometimes, `cider-ns-refresh` may not work for you. If you're looking -for a bit more forceful reloading the `cider-ns-reload` -and `cider-ns-reload-all` commands can be used instead. These commands +for a bit more forceful reloading the `cider-ns-reload` (kbd:[C-c M-n l]) +and `cider-ns-reload-all` (kbd:[C-c M-n M-l]) commands can be used instead. These commands invoke Clojure's `+(require ... :reload)+` and `+(require ... :reload-all)+` commands at the REPL. @@ -118,3 +118,12 @@ TIP: Theses commands don't depend on `cider-nrepl`, so they are always available | kbd:[C-c M-n r] + kbd:[C-c M-n M-r] | Reload all modified Clojure files on the classpath. Adding a prefix argument, kbd:[C-u C-c M-n r], will reload all the namespaces on the classpath unconditionally, regardless of their modification status. Adding a double prefix argument, kbd:[C-u C-u M-n r], will first clear the state of the namespace tracker before reloading. + +| `cider-ns-reload` +| kbd:[C-c M-n l] +| Reload using `(require :reload)` + +| `cider-ns-reload-all` +| kbd:[C-c M-n M-l] +| Reload using `(require :reload-all)` +|=== From 900f083fe8ad5009497859c0de5c0d64ab8854e1 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 17 Apr 2024 16:26:23 +0300 Subject: [PATCH 076/212] Fix a changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 470e425d6..db3c4903b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - The `clojure-mode` dependency is still required for CIDER to function. - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with `clojure-ts-mode` (yet). - [#3624](https://github.com/clojure-emacs/cider/pull/3624): Support new `cider.clj-reload/reload` cider-nrepl middleware. - - adds `cider-ns-refresh-tool` defcustom, defaulting to `'tools.namespace`. + - adds `cider-ns-code-reload-tool` defcustom, defaulting to `'tools.namespace`. - you can change it to `'clj-reload` to use [clj-reload](https://github.com/tonsky/clj-reload) instead of [tools.namespace](https://github.com/clojure/tools.namespace). ### Changes From af37662b686a5849ae70b1c273154c15a98e162c Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 17 Apr 2024 16:30:11 +0300 Subject: [PATCH 077/212] [Docs] Tweak the code reloading docs a bit --- doc/modules/ROOT/pages/usage/code_reloading.adoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc index c40d00efc..6ba6a7648 100644 --- a/doc/modules/ROOT/pages/usage/code_reloading.adoc +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -82,7 +82,9 @@ buffers visiting files on the classpath. You can customize this behavior with === Using clj-reload -You can also use https://github.com/tonsky/clj-reload[clj-reload] instead. +NOTE: Support for `clj-reload` was introduced in CIDER 1.14. + +You can also use `cider-ns-refresh` with https://github.com/tonsky/clj-reload[clj-reload] instead of `clojure.tools.namespace`. It provides support for https://github.com/tonsky/clj-reload/blob/469da68/README.md#usage-keeping-vars-between-reloads[keeping vars between reloads] among some @@ -99,6 +101,9 @@ https://github.com/tonsky/clj-reload/blob/469da68/README.md##usage[the usage doc . If you don't set them manually, it will default to the current project's resource dirs in the same way `tools.namespace` does. +NOTE: Down the road we may rename `cider-ns-refresh` to something more tool-agnostic (e.g. `cider-ns-smart-reload`) to reflect +that it supports different code reload tools now. + == Basic Code Reloading Sometimes, `cider-ns-refresh` may not work for you. If you're looking From 9b977afe9ee5eb2515aa6e6ec9fe79a7a86c39c8 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 20 Apr 2024 21:44:51 +0300 Subject: [PATCH 078/212] [Docs] Fix a typo --- doc/modules/ROOT/pages/usage/code_reloading.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/usage/code_reloading.adoc b/doc/modules/ROOT/pages/usage/code_reloading.adoc index 6ba6a7648..cac2b667a 100644 --- a/doc/modules/ROOT/pages/usage/code_reloading.adoc +++ b/doc/modules/ROOT/pages/usage/code_reloading.adoc @@ -112,7 +112,7 @@ and `cider-ns-reload-all` (kbd:[C-c M-n M-l]) commands can be used instead. Thes invoke Clojure's `+(require ... :reload)+` and `+(require ... :reload-all)+` commands at the REPL. -TIP: Theses commands don't depend on `cider-nrepl`, so they are always available. +TIP: These commands don't depend on `cider-nrepl`, so they are always available. == Keybindings From ebab3c72d31aea0d5402d81f86ffcddabe96f530 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Sat, 20 Apr 2024 11:06:39 +0300 Subject: [PATCH 079/212] Update inspector.adoc --- doc/modules/ROOT/pages/debugging/inspector.adoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/modules/ROOT/pages/debugging/inspector.adoc b/doc/modules/ROOT/pages/debugging/inspector.adoc index d894f492b..6f4c4cd94 100644 --- a/doc/modules/ROOT/pages/debugging/inspector.adoc +++ b/doc/modules/ROOT/pages/debugging/inspector.adoc @@ -125,12 +125,11 @@ inspector buffer using the `s`, `c`, and `a` keybindings. If you enable `cider-inspector-fill-frame`, the inspector window fills its frame. -Starting from CIDER 1.8.0, when you define a var using kbd:[d], -a var name can be suggested (default none). You can customize this value -via the `cider-inspector-preferred-var-names` configuration option. -Even after setting it, you are free to choose new names on the fly, -as you type. Most recent names will take priority in subsequent usages. +When you define a var using kbd:[d], a var name can be suggested (default none). +You can customize this value via the `cider-inspector-preferred-var-names` +configuration option. Even after setting it, you are free to choose new names on +the fly, as you type. Most recent names will take priority in subsequent usages. == Additional Resources -* https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html[Using CIDER's Inspector in Spacemacs] +* https://practicalli.github.io/spacemacs/evaluating-clojure/inspect/[Using CIDER's Inspector in Spacemacs] From 6b60332acbd34d237250ed00043a13b1b24d7076 Mon Sep 17 00:00:00 2001 From: Carsten Behring Date: Sun, 21 Apr 2024 16:19:40 +0200 Subject: [PATCH 080/212] Introduce variable `cider-clojure-cli-global-aliases` (#3623) --- CHANGELOG.md | 4 +++- cider.el | 40 ++++++++++++++++++++++++++++++++-------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db3c4903b..d7a858f49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,10 @@ ## master (unreleased) -### New features + +### New features +- [#3632](https://github.com/clojure-emacs/cider/pull/3623): new configuration variable `cider-clojure-cli-global-aliases` - [#3366](https://github.com/clojure-emacs/cider/pull/3366): Support display of error overlays with #dbg! and #break! reader macros. - [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode). - The `clojure-mode` dependency is still required for CIDER to function. diff --git a/cider.el b/cider.el index dc94d5218..5c2a1168e 100644 --- a/cider.el +++ b/cider.el @@ -173,6 +173,20 @@ then concatenated into the \"-M[your-aliases]:cider/nrepl\" form." :safe #'stringp :package-version '(cider . "1.1")) + +(defcustom cider-clojure-cli-global-aliases + nil + "Global aliases to include when jacking in with the clojure CLI. +This value should be a string of the form \":foo:bar\", and +will be prepended to the value of `cider-clojure-cli-aliases'. +Alias names should be of the form \":foo:bar\". +Leading \"-A\" \"-M\" \"-T\" or \"-X\" are stripped from aliases +then concatenated into the \"-M[your-aliases]:cider/nrepl\" form." + :type 'string + :safe #'stringp + :package-version '(cider . "1.14")) + + (defcustom cider-shadow-cljs-command "npx shadow-cljs" "The command used to execute shadow-cljs. @@ -817,6 +831,23 @@ rules to quote it." (utf-16le-command (encode-coding-string command 'utf-16le))) (format "-encodedCommand %s" (base64-encode-string utf-16le-command t)))) + +(defun cider--combined-aliases () + "Creates the combined ailases as stringe separated by ':'." + (let ((final-cider-clojure-cli-aliases + (cond ((and cider-clojure-cli-global-aliases cider-clojure-cli-aliases) + (concat cider-clojure-cli-global-aliases ":" cider-clojure-cli-aliases)) + (cider-clojure-cli-global-aliases cider-clojure-cli-global-aliases) + (t cider-clojure-cli-aliases)))) + (if final-cider-clojure-cli-aliases + ;; remove exec-opts flags -A -M -T or -X from cider-clojure-cli-aliases + ;; concatenated with :cider/nrepl to ensure :cider/nrepl comes last + (let ((aliases (format "%s" (replace-regexp-in-string "^-\\(A\\|M\\|T\\|X\\)" "" final-cider-clojure-cli-aliases)))) + (if (string-prefix-p ":" aliases) + aliases + (concat ":" aliases))) + ""))) + (defun cider-clojure-cli-jack-in-dependencies (global-options params dependencies &optional command) "Create Clojure tools.deps jack-in dependencies. Does so by concatenating DEPENDENCIES, PARAMS and GLOBAL-OPTIONS into a @@ -850,14 +881,7 @@ your aliases contain any mains, the cider/nrepl one will be the one used." ;; TODO: global-options are deprecated and should be removed in CIDER 2.0 (if global-options (format "%s " global-options) "") deps-quoted - (if cider-clojure-cli-aliases - ;; remove exec-opts flags -A -M -T or -X from cider-clojure-cli-aliases - ;; concatenated with :cider/nrepl to ensure :cider/nrepl comes last - (let ((aliases (format "%s" (replace-regexp-in-string "^-\\(A\\|M\\|T\\|X\\)" "" cider-clojure-cli-aliases)))) - (if (string-prefix-p ":" aliases) - aliases - (concat ":" aliases))) - "") + (cider--combined-aliases) (if params (format " %s" params) "")))) (defun cider-shadow-cljs-jack-in-dependencies (global-opts params dependencies) From 24a2ef06face2cdf6f4fd745fedb37851f991b42 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 21 Apr 2024 17:20:35 +0300 Subject: [PATCH 081/212] Fix a changelog entry --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7a858f49..a10ab7c84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,9 @@ ## master (unreleased) - - ### New features -- [#3632](https://github.com/clojure-emacs/cider/pull/3623): new configuration variable `cider-clojure-cli-global-aliases` + +- [#3632](https://github.com/clojure-emacs/cider/pull/3623): Add new configuration variable `cider-clojure-cli-global-aliases` - [#3366](https://github.com/clojure-emacs/cider/pull/3366): Support display of error overlays with #dbg! and #break! reader macros. - [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode). - The `clojure-mode` dependency is still required for CIDER to function. From cd9aed479e3ad05e6a3ffddd4205f4ce0a361d6f Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 21 Apr 2024 17:23:42 +0300 Subject: [PATCH 082/212] [Docs] Mention cider-clojure-cli-global-aliases --- doc/modules/ROOT/pages/basics/up_and_running.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 03d8deaaf..4024e9f0c 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -212,7 +212,8 @@ so we'll examine them tool by tool. * `cider-clojure-cli-command` - the name of the `clojure` executable (`clojure` by default) * `cider-clojure-cli-parameters` - the command-line parameters to start a REPL -* `cider-clojure-cli-aliases` - a list of aliases to be used at jack-in time +* `cider-clojure-cli-aliases` - a list of project-specific aliases to be used at jack-in time (it's meant to be set via `.dir-locals.el`) +* `cider-clojure-cli-global-aliases` - a list of global aliases that are appended to project-specific `cider-clojure-cli-aliases` On MS-Windows, CIDER will employ `PowerShell` to execute Clojure if no `clojure` executable is found in the PATH (e.g. like the one supplied From 3f8725b42f7648ecd0d75b6e1feabfbdd5a14db1 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 22 Apr 2024 19:08:39 +0300 Subject: [PATCH 083/212] Add missing changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a10ab7c84..ea5387440 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ - Introduces Timbre compatibility for [CIDER Log Mode](https://docs.cider.mx/cider/debugging/logging.html). - Fixes JS completions for nested objects. - Bundles other fixes and reliability improvements. +- [#840](https://github.com/clojure-emacs/cider-nrepl/pull/840): Drop support for Clojure 1.8. ## 1.12.0 (2023-11-24) From 41ce338d0342c4412a27f9fbcfc274afa9f54647 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 22 Apr 2024 19:13:18 +0300 Subject: [PATCH 084/212] [Docs] Update the supported Java and Clojure versions --- doc/modules/ROOT/pages/about/compatibility.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/modules/ROOT/pages/about/compatibility.adoc b/doc/modules/ROOT/pages/about/compatibility.adoc index 5eec32e82..d550a03b9 100644 --- a/doc/modules/ROOT/pages/about/compatibility.adoc +++ b/doc/modules/ROOT/pages/about/compatibility.adoc @@ -16,10 +16,10 @@ NOTE: We pay special attention to supporting whatever nREPL is bundled with the == Java -CIDER officially targets Java 8, Java 11, Java 17, and the most recent rapid -release version (e.g. Java 18). Generally speaking, we aim +CIDER officially targets Java 8, Java 11, Java 17, Java 21 and the most recent rapid +release version (e.g. Java 22). Generally speaking, we aim to support all Java releases that are currently officially supported -by Oracle. +by Oracle.footnote:[You can find more information about the supported Java releases https://www.oracle.com/java/technologies/java-se-support-roadmap.html[here].] NOTE: The requirements for Java are pretty much ``cider-nrepl``'s requirements. @@ -28,7 +28,7 @@ You can find example commands in xref:troubleshooting.adoc#navigation-to-jdk-sou == Clojure -CIDER targets Clojure 1.8+. As Clojure doesn't have the concept of supported releases +CIDER targets Clojure 1.9+. As Clojure doesn't have the concept of supported releases we have to get a bit creative to determine the minimum version to target. The minimum required Clojure version is currently derived using data From 3ffed550af8462ad67f0533d73233a842e7da6db Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 23 Apr 2024 17:41:43 +0200 Subject: [PATCH 085/212] Use enrich-classpath 1.19.2 (#3648) https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.2 --- cider.el | 2 +- clojure.sh | 2 +- doc/modules/ROOT/pages/config/basic_config.adoc | 2 +- test/cider-tests.el | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cider.el b/cider.el index 5c2a1168e..3873bfee7 100644 --- a/cider.el +++ b/cider.el @@ -612,7 +612,7 @@ returned by this function does not include keyword arguments." (let ((plugins (if cider-enrich-classpath (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version) - ("mx.cider/lein-enrich-classpath" "1.19.0"))) + ("mx.cider/lein-enrich-classpath" "1.19.2"))) (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version)))))) (thread-last plugins diff --git a/clojure.sh b/clojure.sh index 9b8b3d2f7..dc25a2bb2 100755 --- a/clojure.sh +++ b/clojure.sh @@ -37,7 +37,7 @@ else cd "$there" # enrich-classpath will emit a command starting by "clojure", or print a stacktrace: - output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.19.0"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") + output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.19.2"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") cmd=$(tail -n1 <(echo "$output")) cd "$here" diff --git a/doc/modules/ROOT/pages/config/basic_config.adoc b/doc/modules/ROOT/pages/config/basic_config.adoc index e79cb3d49..4bb6fd636 100644 --- a/doc/modules/ROOT/pages/config/basic_config.adoc +++ b/doc/modules/ROOT/pages/config/basic_config.adoc @@ -44,7 +44,7 @@ With it enabled, `cider-jack-in` will activate enrich-classpath, given the follo * You are on macOS/Linux * You are launching a vanilla JVM repl (and not a cljs repl, or a clj+cljs repl) * You are using `cider-jack-in` / `cider-jack-in-clj` (and not `cider-connect`) - ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.19.0#emacs-cider-connect[own instructions]. + ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.19.2#emacs-cider-connect[own instructions]. ...these conditions will be progressively relaxed. diff --git a/test/cider-tests.el b/test/cider-tests.el index 15c1540de..115f7e37a 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -156,7 +156,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -169,7 +169,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -181,7 +181,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -220,7 +220,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -255,7 +255,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) (it "can concat in a boot project" @@ -324,7 +324,7 @@ (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.47.0") - ("mx.cider/lein-enrich-classpath" "1.19.0"))) + ("mx.cider/lein-enrich-classpath" "1.19.2"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) (it "uses them in a lein project" @@ -336,7 +336,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.0\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless")))) From 1cd6ab7b7cb4a7e079a273600c4d28307c3aba40 Mon Sep 17 00:00:00 2001 From: vemv Date: Wed, 24 Apr 2024 21:19:50 +0200 Subject: [PATCH 086/212] Use enrich-classpath 1.19.3 (#3649) https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.3 --- CHANGELOG.md | 1 + cider.el | 2 +- clojure.sh | 2 +- doc/modules/ROOT/pages/config/basic_config.adoc | 2 +- test/cider-tests.el | 14 +++++++------- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea5387440..2c79e2810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - [#3626](https://github.com/clojure-emacs/cider/issues/3626): `cider-ns-refresh`: jump to the relevant file/line on errors. - [#3628](https://github.com/clojure-emacs/cider/issues/3628): `cider-ns-refresh`: summarize errors as an overlay. +- Bump the injected `enrich-classpath` to [1.19.3](https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.3). - Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). - Bump the injected `cider-nrepl` to [0.47.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.47.0/CHANGELOG.md#0470-2024-03-10). - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.2/CHANGELOG.md#0232-2024-03-10). diff --git a/cider.el b/cider.el index 3873bfee7..8a7586803 100644 --- a/cider.el +++ b/cider.el @@ -612,7 +612,7 @@ returned by this function does not include keyword arguments." (let ((plugins (if cider-enrich-classpath (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version) - ("mx.cider/lein-enrich-classpath" "1.19.2"))) + ("mx.cider/lein-enrich-classpath" "1.19.3"))) (append cider-jack-in-lein-plugins `(("cider/cider-nrepl" ,cider-injected-middleware-version)))))) (thread-last plugins diff --git a/clojure.sh b/clojure.sh index dc25a2bb2..ee1d96769 100755 --- a/clojure.sh +++ b/clojure.sh @@ -37,7 +37,7 @@ else cd "$there" # enrich-classpath will emit a command starting by "clojure", or print a stacktrace: - output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.19.2"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") + output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.19.3"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@") cmd=$(tail -n1 <(echo "$output")) cd "$here" diff --git a/doc/modules/ROOT/pages/config/basic_config.adoc b/doc/modules/ROOT/pages/config/basic_config.adoc index 4bb6fd636..c5d260462 100644 --- a/doc/modules/ROOT/pages/config/basic_config.adoc +++ b/doc/modules/ROOT/pages/config/basic_config.adoc @@ -44,7 +44,7 @@ With it enabled, `cider-jack-in` will activate enrich-classpath, given the follo * You are on macOS/Linux * You are launching a vanilla JVM repl (and not a cljs repl, or a clj+cljs repl) * You are using `cider-jack-in` / `cider-jack-in-clj` (and not `cider-connect`) - ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.19.2#emacs-cider-connect[own instructions]. + ** For `cider-connect`, please follow enrich-classpath's https://github.com/clojure-emacs/enrich-classpath/tree/v1.19.3#emacs-cider-connect[own instructions]. ...these conditions will be progressively relaxed. diff --git a/test/cider-tests.el b/test/cider-tests.el index 115f7e37a..64bc4e760 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -156,7 +156,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -169,7 +169,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -181,7 +181,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -220,7 +220,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -255,7 +255,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) (it "can concat in a boot project" @@ -324,7 +324,7 @@ (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.47.0") - ("mx.cider/lein-enrich-classpath" "1.19.2"))) + ("mx.cider/lein-enrich-classpath" "1.19.3"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) (it "uses them in a lein project" @@ -336,7 +336,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.2\"]") + (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless")))) From 641a9eade16ad1dc7e5339f3725cf8752fdafc94 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 10:22:10 +0300 Subject: [PATCH 087/212] Tweak some changelog entries --- CHANGELOG.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c79e2810..70fc2ecf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,8 @@ ### New features -- [#3632](https://github.com/clojure-emacs/cider/pull/3623): Add new configuration variable `cider-clojure-cli-global-aliases` -- [#3366](https://github.com/clojure-emacs/cider/pull/3366): Support display of error overlays with #dbg! and #break! reader macros. +- [#3632](https://github.com/clojure-emacs/cider/pull/3623): Add new configuration variable `cider-clojure-cli-global-aliases`. +- [#3366](https://github.com/clojure-emacs/cider/pull/3366): Support display of error overlays with `#dbg!` and `#break!` reader macros. - [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode). - The `clojure-mode` dependency is still required for CIDER to function. - Some features like `cider-dynamic-indentation` and `cider-font-lock-dynamically` do not work with `clojure-ts-mode` (yet). @@ -26,16 +26,15 @@ ### Bugs fixed -- [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack in when using `cider-jack-in-clj`. - +- [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack-in when using `cider-jack-in-clj`. ## 1.13.1 (2024-02-01) ### Bugs fixed -- [#3605](https://github.com/clojure-emacs/cider/issues/3605): avoid `cider--error-phase-of-last-exception` recursive loop. -- [#3613](https://github.com/clojure-emacs/cider/issues/3613): adapt `cider-completion-context.el` to upstream changes in Compliment. -- [#3587](https://github.com/clojure-emacs/cider/issues/3587): avoid overlays and `message`s on stderr that is unrelated to exception handling. +- [#3605](https://github.com/clojure-emacs/cider/issues/3605): Avoid `cider--error-phase-of-last-exception` recursive loop. +- [#3613](https://github.com/clojure-emacs/cider/issues/3613): Adapt `cider-completion-context.el` to upstream changes in Compliment. +- [#3587](https://github.com/clojure-emacs/cider/issues/3587): Avoid overlays and `message`s on stderr that is unrelated to exception handling. ## 1.13.0 (2024-01-14) From 4f51e9401c771b579b958df23d62d5d31cc8a678 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 10:33:29 +0300 Subject: [PATCH 088/212] Add a changelog entry about dropping Clojure 1.9 support --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70fc2ecf0..c8810f0b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.2/CHANGELOG.md#0232-2024-03-10). - Updates [Logjam](https://github.com/clojure-emacs/logjam/blob/v0.3.0/CHANGELOG.md#030-2024-03-03). - Updates [Compliment](https://github.com/alexander-yakushev/compliment/blob/951604/CHANGELOG.md#master-unreleased). +- [orchard#245](https://github.com/clojure-emacs/orchard/pull/245), [cider-nrepl#868](https://github.com/clojure-emacs/cider-nrepl/pull/868): Drop support for Clojure 1.9. ### Bugs fixed From 160995b30e06988ba4c57ee2390b40735d1c7e29 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 10:45:06 +0300 Subject: [PATCH 089/212] Drop support for Clojure 1.9 --- cider-eval.el | 20 ++----------------- cider.el | 6 +++--- .../ROOT/pages/about/compatibility.adoc | 9 ++++++++- .../ROOT/pages/usage/misc_features.adoc | 2 -- test/cider-error-parsing-tests.el | 6 ------ 5 files changed, 13 insertions(+), 30 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index b504e5b40..6eb9ab4fc 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -562,11 +562,6 @@ It delegates the actual error content to the eval or op handler." (t (cider-default-err-eval-print-handler)))) -;; The format of the error messages emitted by Clojure's compiler changed in -;; Clojure 1.10. That's why we're trying to match error messages to both the -;; old and the new format, by utilizing a combination of two different regular -;; expressions. - (defconst cider-clojure-1.10--location `((or "at (" (sequence "at " (minimal-match (one-or-more anything)) ;; the fully-qualified name of the function that triggered the error @@ -596,15 +591,6 @@ It delegates the actual error content to the eval or op handler." (minimal-match (one-or-more anything))) cider-clojure-1.10--location)) -(defconst cider-clojure-1.9-error `(sequence - (zero-or-more anything) - ", compiling:(" - (group-n 2 (minimal-match (zero-or-more anything))) - ":" - (group-n 3 (one-or-more digit)) - (optional ":" (group-n 4 (one-or-more digit))) - ")")) - (defconst cider-clojure-warning `(sequence (minimal-match (zero-or-more anything)) (group-n 1 "warning") @@ -619,8 +605,7 @@ It delegates the actual error content to the eval or op handler." ;; which is a subset of these regexes. (defconst cider-clojure-compilation-regexp (eval - `(rx bol (or ,cider-clojure-1.9-error - ,cider-clojure-warning + `(rx bol (or ,cider-clojure-warning ,cider-clojure-1.10-error ,cider-clojure-unexpected-error)) t) @@ -633,8 +618,7 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" (defconst cider-clojure-compilation-error-regexp (eval - `(rx bol (or ,cider-clojure-1.9-error - ,cider-clojure-1.10-error + `(rx bol (or ,cider-clojure-1.10-error ,cider-clojure-unexpected-error)) t) "Like `cider-clojure-compilation-regexp', diff --git a/cider.el b/cider.el index 8a7586803..9629a17b4 100644 --- a/cider.el +++ b/cider.el @@ -141,7 +141,7 @@ (null (executable-find "clojure"))) "powershell" "clojure") - "The command used to execute clojure with tools.deps (requires Clojure 1.9+). + "The command used to execute clojure with tools.deps. Don't use clj here, as it doesn't work when spawned from Emacs due to it using rlwrap. If on Windows and no \"clojure\" executable is found we default to \"powershell\"." @@ -535,10 +535,10 @@ the artifact.") (defconst cider-clojure-artifact-id "org.clojure/clojure" "Artifact identifier for Clojure.") -(defconst cider-minimum-clojure-version "1.8.0" +(defconst cider-minimum-clojure-version "1.10.0" "Minimum supported version of Clojure.") -(defconst cider-latest-clojure-version "1.10.1" +(defconst cider-latest-clojure-version "1.11.3" "Latest supported version of Clojure.") (defconst cider-required-middleware-version "0.47.0" diff --git a/doc/modules/ROOT/pages/about/compatibility.adoc b/doc/modules/ROOT/pages/about/compatibility.adoc index d550a03b9..a0304a1a1 100644 --- a/doc/modules/ROOT/pages/about/compatibility.adoc +++ b/doc/modules/ROOT/pages/about/compatibility.adoc @@ -28,7 +28,7 @@ You can find example commands in xref:troubleshooting.adoc#navigation-to-jdk-sou == Clojure -CIDER targets Clojure 1.9+. As Clojure doesn't have the concept of supported releases +CIDER targets Clojure 1.10+. As Clojure doesn't have the concept of supported releases we have to get a bit creative to determine the minimum version to target. The minimum required Clojure version is currently derived using data @@ -175,6 +175,13 @@ Below you can find the official compatibility matrix for CIDER. | 8 | 1.9 +| 1.14 +| 26.1 +| 1.0 +| 0.47 +| 8 +| 1.10 + |=== TIP: You can also check the requirements of a particular CIDER version by inspecting diff --git a/doc/modules/ROOT/pages/usage/misc_features.adoc b/doc/modules/ROOT/pages/usage/misc_features.adoc index 414758792..0378e8827 100644 --- a/doc/modules/ROOT/pages/usage/misc_features.adoc +++ b/doc/modules/ROOT/pages/usage/misc_features.adoc @@ -196,8 +196,6 @@ There are a bunch of useful keybindings that are defined in browser buffers. == Browsing the Clojure Spec Registry -If you are using Clojure 1.9 or newer you can browse the Clojure spec registry. - If you already know which spec you're looking for, you can type kbd:[M-x] `cider-browse-spec` and CIDER will prompt you for a spec name and then drop you into the spec browser. diff --git a/test/cider-error-parsing-tests.el b/test/cider-error-parsing-tests.el index e28f65e59..7de0746c9 100644 --- a/test/cider-error-parsing-tests.el +++ b/test/cider-error-parsing-tests.el @@ -125,12 +125,6 @@ (match-string 1 clojure-compiler-warning)) :to-equal "warning"))) (dolist (regexp (list cider-clojure-compilation-regexp cider-clojure-compilation-error-regexp)) - (it "Recognizes a clojure-1.9 error message" - (let ((clojure-1.9-compiler-error "CompilerException java.lang.RuntimeException: Unable to resolve symbol: lol in this context, compiling:(/tmp/foo/src/foo/core.clj:10:1)")) - (expect clojure-1.9-compiler-error :to-match regexp) - (expect (progn (string-match regexp clojure-1.9-compiler-error) - (match-string 2 clojure-1.9-compiler-error)) - :to-equal "/tmp/foo/src/foo/core.clj"))) (it "Recognizes a clojure-1.10 error message" (let ((clojure-1.10-compiler-error "Syntax error compiling at (src/ardoq/service/workspace_service.clj:227:3).")) (expect clojure-1.10-compiler-error :to-match regexp) From c62179965e6a506f15f8960fcd72c73e1ec3ffcd Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 11:08:34 +0300 Subject: [PATCH 090/212] Update test data for Clojure 1.10 --- cider-eval.el | 2 +- test/cider-error-parsing-tests.el | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 6eb9ab4fc..df66414f5 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -698,7 +698,7 @@ See `compilation-error-regexp-alist' for help on their format.") (list (when file (let ((val (match-string-no-properties file message))) - (unless (string= val "NO_SOURCE_PATH") val))) + (unless (or (string= val "REPL") (string= val "NO_SOURCE_PATH")) val))) (when line (string-to-number (match-string-no-properties line message))) (when col (let ((val (match-string-no-properties col message))) diff --git a/test/cider-error-parsing-tests.el b/test/cider-error-parsing-tests.el index 7de0746c9..4a887ac47 100644 --- a/test/cider-error-parsing-tests.el +++ b/test/cider-error-parsing-tests.el @@ -45,7 +45,7 @@ (it "extracts correct information from the error message" ;; test-cider-extract-error-info-14 - (let* ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(/some/test/file/core.clj:31)") + (let* ((message "Syntax error compiling at (/some/test/file/core.clj:31). Unable to resolve symbol: dummy in this context.") (info (cider-extract-error-info cider-compilation-regexp message))) (expect (file-name info) :to-equal "/some/test/file/core.clj") (expect (line-num info) :to-equal 31) @@ -53,7 +53,7 @@ (expect (face info) :to-equal 'cider-error-highlight-face)) ;; test-cider-extract-error-info-14-windows - (let* ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(c:\\some\\test\\file\\core.clj:31)") + (let* ((message "Syntax error compiling at (c:\\some\\test\\file\\core.clj:31). Unable to resolve symbol: dummy in this context.") (info (cider-extract-error-info cider-compilation-regexp message))) (expect (file-name info) :to-equal "c:\\some\\test\\file\\core.clj") (expect (line-num info) :to-equal 31) @@ -61,7 +61,7 @@ (expect (face info) :to-equal 'cider-error-highlight-face)) ;; test-cider-extract-error-info-14-no-file - (let* ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(NO_SOURCE_PATH:31)") + (let* ((message "Syntax error compiling at (REPL:31). Unable to resolve symbol: dummy in this context.") (info (cider-extract-error-info cider-compilation-regexp message))) (expect (file-name info) :to-equal nil) (expect (line-num info) :to-equal 31) @@ -86,7 +86,7 @@ (expect (face info) :to-equal 'cider-warning-highlight-face)) ;; test-cider-extract-error-info-15 - (let* ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(/some/test/file/core.clj:31:3)") + (let* ((message "Syntax error compiling at (/some/test/file/core.clj:31:3). Unable to resolve symbol: dummy in this context.") (info (cider-extract-error-info cider-compilation-regexp message))) (expect (file-name info) :to-equal "/some/test/file/core.clj") (expect (line-num info) :to-equal 31) @@ -94,7 +94,7 @@ (expect (face info) :to-equal 'cider-error-highlight-face)) ;; test-cider-extract-error-info-15-no-file - (let* ((message "CompilerException java.lang.RuntimeException: Unable to resolve symbol: dummy in this context, compiling:(NO_SOURCE_PATH:31:3)") + (let* ((message "Syntax error compiling at (REPL:31:3). Unable to resolve symbol: dummy in this context") (info (cider-extract-error-info cider-compilation-regexp message))) (expect (file-name info) :to-equal nil) (expect (line-num info) :to-equal 31) From 4f53c0b1d43fa7ff7ee7155769e260adaace0a38 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 11:22:08 +0300 Subject: [PATCH 091/212] Tweak a docstring --- cider.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cider.el b/cider.el index 9629a17b4..46bfadbae 100644 --- a/cider.el +++ b/cider.el @@ -539,7 +539,9 @@ the artifact.") "Minimum supported version of Clojure.") (defconst cider-latest-clojure-version "1.11.3" - "Latest supported version of Clojure.") + "Latest (newest) version of Clojure. + +Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.") (defconst cider-required-middleware-version "0.47.0" "The CIDER nREPL version that's known to work properly with CIDER.") From e8d036403af5ae9f74add152f19d8d1a41a6c58b Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 17:43:10 +0300 Subject: [PATCH 092/212] Tweak a changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8810f0b6..e1631660a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,7 @@ - Introduces Timbre compatibility for [CIDER Log Mode](https://docs.cider.mx/cider/debugging/logging.html). - Fixes JS completions for nested objects. - Bundles other fixes and reliability improvements. -- [#840](https://github.com/clojure-emacs/cider-nrepl/pull/840): Drop support for Clojure 1.8. +- [cider-nrepl#840](https://github.com/clojure-emacs/cider-nrepl/pull/840): Drop support for Clojure 1.8. ## 1.12.0 (2023-11-24) From 9317479e944269b1d694c1e80f781e8870b670e4 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 17:45:29 +0300 Subject: [PATCH 093/212] [Docs] Tweak wording --- doc/modules/ROOT/pages/index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/index.adoc b/doc/modules/ROOT/pages/index.adoc index 394fe12cf..b1cb104b3 100644 --- a/doc/modules/ROOT/pages/index.adoc +++ b/doc/modules/ROOT/pages/index.adoc @@ -20,7 +20,7 @@ if you'd like to know more about CIDER's early history. **** *Please consider -xref:contributing/funding.adoc[supporting financially its ongoing development].* +xref:contributing/funding.adoc[supporting financially CIDER's ongoing development].* == Overview From 3c0fd75c5d2cd6ca1218d5b0dd7f2a683e6fe9d5 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 18:30:38 +0300 Subject: [PATCH 094/212] Remove some obsolete aliases --- cider.el | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cider.el b/cider.el index 46bfadbae..2d0fcac3b 100644 --- a/cider.el +++ b/cider.el @@ -1249,10 +1249,6 @@ you're working on." :safe #'symbolp :package-version '(cider . "0.17.0")) -(make-obsolete-variable 'cider-cljs-lein-repl 'cider-default-cljs-repl "0.17") -(make-obsolete-variable 'cider-cljs-boot-repl 'cider-default-cljs-repl "0.17") -(make-obsolete-variable 'cider-cljs-gradle-repl 'cider-default-cljs-repl "0.17") - (defvar cider--select-cljs-repl-history nil) (defun cider-select-cljs-repl (&optional default) "Select the ClojureScript REPL to use with `cider-jack-in-cljs'. From 380073eea28b47f69d320361f560beabadea534a Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 7 May 2024 18:31:05 +0300 Subject: [PATCH 095/212] Fix a typo --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index 2d0fcac3b..a494d10b9 100644 --- a/cider.el +++ b/cider.el @@ -1232,7 +1232,7 @@ It's intended to be used in your Emacs config." (defcustom cider-default-cljs-repl nil "The default ClojureScript REPL to start. This affects commands like `cider-jack-in-cljs'. Generally it's -intended to be set via .dir-locals.el for individual projects, as its +intended to be set via .dir-locals.el for individual projects, as it's relatively unlikely you'd like to use the same type of REPL in each project you're working on." :type '(choice (const :tag "Figwheel" figwheel) From 176a8e748540705b9229870be1ebe8a77f756966 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Fri, 10 May 2024 00:22:52 +0300 Subject: [PATCH 096/212] [completion] Cache last result of `cider-complete` --- cider-completion.el | 48 ++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/cider-completion.el b/cider-completion.el index 9f83e4715..6b54420c7 100644 --- a/cider-completion.el +++ b/cider-completion.el @@ -184,26 +184,34 @@ performed by `cider-annotate-completion-function'." (when-let* ((bounds (bounds-of-thing-at-point 'symbol))) (when (and (cider-connected-p) (not (or (cider-in-string-p) (cider-in-comment-p)))) - (list (car bounds) (cdr bounds) - (lambda (prefix pred action) - ;; When the 'action is 'metadata, this lambda returns metadata about this - ;; capf, when action is (boundaries . suffix), it returns nil. With every - ;; other value of 'action (t, nil, or lambda), 'action is forwarded to - ;; (complete-with-action), together with (cider-complete), prefix and pred. - ;; And that function performs the completion based on those arguments. - ;; - ;; This api is better described in the section - ;; '21.6.7 Programmed Completion' of the elisp manual. - (cond ((eq action 'metadata) `(metadata (category . cider))) ;; defines a completion category named 'cider, used later in our `completion-category-overrides` logic. - ((eq (car-safe action) 'boundaries) nil) - (t (with-current-buffer (current-buffer) - (complete-with-action action - (cider-complete prefix) prefix pred))))) - :annotation-function #'cider-annotate-symbol - :company-kind #'cider-company-symbol-kind - :company-doc-buffer #'cider-create-compact-doc-buffer - :company-location #'cider-company-location - :company-docsig #'cider-company-docsig)))) + (let* (last-prefix + last-result + (complete + (lambda (prefix) + (unless (string-equal last-prefix prefix) + (setq last-prefix prefix) + (setq last-result (cider-complete prefix))) + last-result))) + (list (car bounds) (cdr bounds) + (lambda (prefix pred action) + ;; When the 'action is 'metadata, this lambda returns metadata about this + ;; capf, when action is (boundaries . suffix), it returns nil. With every + ;; other value of 'action (t, nil, or lambda), 'action is forwarded to + ;; (complete-with-action), together with (cider-complete), prefix and pred. + ;; And that function performs the completion based on those arguments. + ;; + ;; This api is better described in the section + ;; '21.6.7 Programmed Completion' of the elisp manual. + (cond ((eq action 'metadata) `(metadata (category . cider))) ;; defines a completion category named 'cider, used later in our `completion-category-overrides` logic. + ((eq (car-safe action) 'boundaries) nil) + (t (with-current-buffer (current-buffer) + (complete-with-action action + (funcall complete prefix) prefix pred))))) + :annotation-function #'cider-annotate-symbol + :company-kind #'cider-company-symbol-kind + :company-doc-buffer #'cider-create-compact-doc-buffer + :company-location #'cider-company-location + :company-docsig #'cider-company-docsig))))) (defun cider-completion-flush-caches () "Force Compliment to refill its caches. From e8b9aa6daa8005211af3e582534df75a8a57a31e Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 13 May 2024 11:10:20 +0300 Subject: [PATCH 097/212] [inspector] Improve minibuffer message for cider-inspector-def-current-val --- cider-inspector.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cider-inspector.el b/cider-inspector.el index 103452c17..f5bfe6f2c 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -369,10 +369,9 @@ current-namespace." (list (cider-inspector--read-var-name-from-user ns) ns))) (setq cider-inspector--current-repl (cider-current-repl)) - (when-let* ((result (cider-sync-request:inspect-def-current-val ns var-name 'v2)) - (value (nrepl-dict-get result "value"))) + (when-let* ((result (cider-sync-request:inspect-def-current-val ns var-name 'v2))) (cider-inspector--render-value result 'v2) - (message "%s#'%s/%s = %s" cider-eval-result-prefix ns var-name value))) + (message "Defined current inspector value as #'%s/%s" ns var-name))) (defun cider-inspector-tap-current-val () "Sends the current Inspector current value to `tap>'." From b421bbb767fea4ea0dd7fa8eb71040d3c37d0754 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 13 May 2024 11:12:28 +0300 Subject: [PATCH 098/212] [inspector] Bind inspector buffer to the code buffer where it was triggered This fixes `cider-inspector-def-current-val` defining in `user` namespace. --- CHANGELOG.md | 1 + cider-inspector.el | 40 ++++++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1631660a..8dec7138b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - [#3626](https://github.com/clojure-emacs/cider/issues/3626): `cider-ns-refresh`: jump to the relevant file/line on errors. - [#3628](https://github.com/clojure-emacs/cider/issues/3628): `cider-ns-refresh`: summarize errors as an overlay. +- [#3660](https://github.com/clojure-emacs/cider/issues/3660): Fix `cider-inspector-def-current-val` always defining in `user` namespace. - Bump the injected `enrich-classpath` to [1.19.3](https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.3). - Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). - Bump the injected `cider-nrepl` to [0.47.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.47.0/CHANGELOG.md#0470-2024-03-10). diff --git a/cider-inspector.el b/cider-inspector.el index f5bfe6f2c..d4fe36307 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -565,6 +565,8 @@ instead of just its \"value\" entry." result (nrepl-dict-get result "value")))) +(declare-function cider-set-buffer-ns "cider-mode") + ;; Render Inspector from Structured Values (defun cider-inspector--render-value (dict-or-value &optional v2) "Render DICT-OR-VALUE, depending on V2." @@ -575,6 +577,7 @@ instead of just its \"value\" entry." (nrepl-dict-get dict-or-value "doc-fragments"))) (block-tags (when v2 (nrepl-dict-get dict-or-value "doc-block-tags-fragments"))) + (ns (cider-current-ns)) (font-size (when-let* ((b (get-buffer cider-inspector-buffer)) (variable 'text-scale-mode-amount) (continue (local-variable-p variable b))) @@ -593,24 +596,25 @@ instead of just its \"value\" entry." :truncate-lines-defined truncate-lines-defined :truncate-lines-p truncate-lines-p :fragments fragments - :block-tags block-tags)) - (cider-popup-buffer-display cider-inspector-buffer cider-inspector-auto-select-buffer) - (when cider-inspector-fill-frame (delete-other-windows)) - (ignore-errors (cider-inspector-next-inspectable-object 1)) - (with-current-buffer cider-inspector-buffer - (when (eq cider-inspector-last-command 'cider-inspector-pop) - (setq cider-inspector-last-command nil) - ;; Prevents error message being displayed when we try to pop - ;; from the top-level of a data structure - (when cider-inspector-location-stack - (goto-char (pop cider-inspector-location-stack)))) - - (when (eq cider-inspector-last-command 'cider-inspector-prev-page) - (setq cider-inspector-last-command nil) - ;; Prevents error message being displayed when we try to - ;; go to a prev-page from the first page - (when cider-inspector-page-location-stack - (goto-char (pop cider-inspector-page-location-stack)))))) + :block-tags block-tags) + (cider-popup-buffer-display cider-inspector-buffer cider-inspector-auto-select-buffer) + (when cider-inspector-fill-frame (delete-other-windows)) + (ignore-errors (cider-inspector-next-inspectable-object 1)) + (with-current-buffer cider-inspector-buffer + (cider-set-buffer-ns ns) + (when (eq cider-inspector-last-command 'cider-inspector-pop) + (setq cider-inspector-last-command nil) + ;; Prevents error message being displayed when we try to pop + ;; from the top-level of a data structure + (when cider-inspector-location-stack + (goto-char (pop cider-inspector-location-stack)))) + + (when (eq cider-inspector-last-command 'cider-inspector-prev-page) + (setq cider-inspector-last-command nil) + ;; Prevents error message being displayed when we try to + ;; go to a prev-page from the first page + (when cider-inspector-page-location-stack + (goto-char (pop cider-inspector-page-location-stack))))))) (cl-defun cider-inspector-render (buffer str &key font-size truncate-lines-defined truncate-lines-p fragments block-tags) "Render STR in BUFFER." From 8b2ef5fc731e2b07956c5d10486d866bb37c5bf3 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 13 May 2024 19:40:24 +0300 Subject: [PATCH 099/212] Limit the maximum string size to be displayed in echo area --- CHANGELOG.md | 1 + cider-overlays.el | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dec7138b..caa324514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - [#3626](https://github.com/clojure-emacs/cider/issues/3626): `cider-ns-refresh`: jump to the relevant file/line on errors. - [#3628](https://github.com/clojure-emacs/cider/issues/3628): `cider-ns-refresh`: summarize errors as an overlay. - [#3660](https://github.com/clojure-emacs/cider/issues/3660): Fix `cider-inspector-def-current-val` always defining in `user` namespace. +- [#3661](https://github.com/clojure-emacs/cider/issues/3661): Truncate echo area output ahead of time. - Bump the injected `enrich-classpath` to [1.19.3](https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.3). - Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). - Bump the injected `cider-nrepl` to [0.47.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.47.0/CHANGELOG.md#0470-2024-03-10). diff --git a/cider-overlays.el b/cider-overlays.el index 6310bb0d3..733258166 100644 --- a/cider-overlays.el +++ b/cider-overlays.el @@ -304,10 +304,10 @@ Note that, while POINT can be a number, it's preferable to be a marker, as that will better handle some corner cases where the original buffer is not focused." (cl-assert (symbolp value-type)) ;; We assert because for avoiding confusion with the optional args. - (let* ((font-value (if cider-result-use-clojure-font-lock + (let* ((value (string-trim-right value)) + (font-value (if cider-result-use-clojure-font-lock (cider-font-lock-as-clojure value) value)) - (font-value (string-trim-right font-value)) (used-overlay (when (and point cider-use-overlays (if (equal 'error value-type) @@ -316,10 +316,15 @@ focused." (cider--make-result-overlay font-value :where point :duration cider-eval-result-duration - :prepend-face (or overlay-face 'cider-result-overlay-face))))) + :prepend-face (or overlay-face 'cider-result-overlay-face)))) + (msg (format "%s%s" cider-eval-result-prefix value)) + (max-msg-length (* (floor (max-mini-window-lines)) (frame-width))) + (msg (if (> (string-width msg) max-msg-length) + (format "%s..." (substring msg 0 (- max-msg-length 3))) + msg))) (message "%s" - (propertize (format "%s%s" cider-eval-result-prefix font-value) + (propertize msg ;; The following hides the message from the echo-area, but ;; displays it in the Messages buffer. We only hide the message ;; if the user wants to AND if the overlay succeeded. From 47e2902d85a5a4479cd7d266ccbfa03f525d5d20 Mon Sep 17 00:00:00 2001 From: vemv Date: Tue, 14 May 2024 01:01:13 +0200 Subject: [PATCH 100/212] Use cider-nrepl 0.48.0 (#3665) https://github.com/clojure-emacs/cider-nrepl/blob/v0.48.0/CHANGELOG.md#0480-2024-05-13 https://clojars.org/cider/cider-nrepl/versions/0.48.0 --- CHANGELOG.md | 2 +- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index caa324514..8f30fe8eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ - [#3661](https://github.com/clojure-emacs/cider/issues/3661): Truncate echo area output ahead of time. - Bump the injected `enrich-classpath` to [1.19.3](https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.3). - Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). -- Bump the injected `cider-nrepl` to [0.47.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.47.0/CHANGELOG.md#0470-2024-03-10). +- Bump the injected `cider-nrepl` to [0.48.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.48.0/CHANGELOG.md#0480-2024-05-13). - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.2/CHANGELOG.md#0232-2024-03-10). - Updates [Logjam](https://github.com/clojure-emacs/logjam/blob/v0.3.0/CHANGELOG.md#030-2024-03-03). - Updates [Compliment](https://github.com/alexander-yakushev/compliment/blob/951604/CHANGELOG.md#master-unreleased). diff --git a/cider.el b/cider.el index a494d10b9..a9caaa315 100644 --- a/cider.el +++ b/cider.el @@ -543,7 +543,7 @@ the artifact.") Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.") -(defconst cider-required-middleware-version "0.47.0" +(defconst cider-required-middleware-version "0.48.0" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index f119a37a2..1d5ff61d8 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.47.0"]]) + :plugins [[cider/cider-nrepl "0.48.0"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index b4581ca7f..bc337231c 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.47.0"] + :plugins [[cider/cider-nrepl "0.48.0"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 842f332d5..5c46dad8c 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.47.0"]] +:plugins [[cider/cider-nrepl "0.48.0"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.47.0"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.48.0"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.47.0"]]) + concat '[[cider/cider-nrepl "0.48.0"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.47.0"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.48.0"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.47.0"} + cider/cider-nrepl {:mvn/version "0.48.0"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.47.0' + devImplementation 'cider:cider-nrepl:0.48.0' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 4024e9f0c..b45a9a435 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.47.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.48.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -319,7 +319,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.47.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.48.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index 36e925009..a809cdc7f 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.47.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.48.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index 7b057c45e..b15d1c9d5 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.47.0' + devImplementation 'cider:cider-nrepl:0.48.0' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index 64bc4e760..643d9c4dc 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.47.0") + (setq-local cider-injected-middleware-version "0.48.0") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -154,7 +154,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -167,7 +167,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -179,7 +179,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -192,7 +192,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.47.0") + (shell-quote-argument "cider/cider-nrepl:0.48.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -201,7 +201,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.47.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.48.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -218,7 +218,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -231,7 +231,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.47.0") + (shell-quote-argument "cider/cider-nrepl:0.48.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -253,7 +253,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -264,7 +264,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.47.0") + (shell-quote-argument "cider/cider-nrepl:0.48.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -272,7 +272,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.47.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.48.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -287,14 +287,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.47.0")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.48.0")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.47.0"))) + :to-equal '(("cider/cider-nrepl" "0.48.0"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -323,7 +323,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.47.0") + ("cider/cider-nrepl" "0.48.0") ("mx.cider/lein-enrich-classpath" "1.19.3"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -334,7 +334,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.47.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -352,7 +352,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.47.0") + (shell-quote-argument "cider/cider-nrepl:0.48.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -447,7 +447,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.47.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.48.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -461,7 +461,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.47.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.48.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -478,7 +478,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.47.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.48.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -488,7 +488,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.47.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.48.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -516,7 +516,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.47.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.48.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.47.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.48.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From cbd40f78d6dcb86fdf48bd83e0efbb3ab1c4a97c Mon Sep 17 00:00:00 2001 From: chpill Date: Tue, 14 May 2024 15:15:39 +0200 Subject: [PATCH 101/212] Fix cider-interactive-eval-override invocation --- CHANGELOG.md | 1 + cider-eval.el | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f30fe8eb..910d818f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ ### Bugs fixed - [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack-in when using `cider-jack-in-clj`. +- [#3663](https://github.com/clojure-emacs/cider/issues/3663): Fix `cider-interactive-eval-override` invocation. ## 1.13.1 (2024-02-01) diff --git a/cider-eval.el b/cider-eval.el index df66414f5..2f0083e23 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -1229,7 +1229,11 @@ arguments and only proceed with evaluation if it returns nil." (delete-overlay ov)))) (unless (and cider-interactive-eval-override (functionp cider-interactive-eval-override) - (funcall cider-interactive-eval-override form callback bounds)) + (condition-case _ + (funcall cider-interactive-eval-override form callback bounds additional-params) + (wrong-number-of-arguments + ;; fallback for backward compatibility + (funcall cider-interactive-eval-override form callback bounds)))) (cider-map-repls :auto (lambda (connection) (cider--prep-interactive-eval form connection) From 3584e32cd1db850a105c0c0a694894421570dc00 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Tue, 14 May 2024 10:37:03 +0300 Subject: [PATCH 102/212] [inspector] Add configuration for max-nested-depth and spacious --- cider-inspector.el | 61 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/cider-inspector.el b/cider-inspector.el index d4fe36307..dee954011 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -64,6 +64,15 @@ The max size can be also changed interactively within the inspector." :type '(integer :tag "Max collection size" 5) :package-version '(cider . "1.1.0")) +(defcustom cider-inspector-max-nested-depth 5 + "Default level of nesting for collections to display before truncating. +The max depth can be also changed interactively within the inspector." + :type '(integer :tag "Max nested collection depth" 5) + :package-version '(cider . "1.14.0")) + +(defvar cider-inspector-spacious-collections nil + "Controls whether the inspector renders values in collections spaciously.") + (defcustom cider-inspector-fill-frame nil "Controls whether the CIDER inspector window fills its frame." :type 'boolean @@ -114,6 +123,7 @@ by clicking or navigating to them by other means." (define-key map "s" #'cider-inspector-set-page-size) (define-key map "a" #'cider-inspector-set-max-atom-length) (define-key map "c" #'cider-inspector-set-max-coll-size) + (define-key map "C" #'cider-inspector-set-max-nested-depth) (define-key map "d" #'cider-inspector-def-current-val) (define-key map "t" #'cider-inspector-tap-current-val) (define-key map "1" #'cider-inspector-tap-at-point) @@ -219,12 +229,7 @@ current buffer's namespace." (interactive (list (cider-read-from-minibuffer "Inspect expression: " (cider-sexp-at-point)) (cider-current-ns))) (setq cider-inspector--current-repl (cider-current-repl)) - (let ((result (cider-sync-request:inspect-expr - expr ns - cider-inspector-page-size - cider-inspector-max-atom-length - cider-inspector-max-coll-size - 'v2))) + (let ((result (cider-sync-request:inspect-expr expr ns 'v2))) (when (nrepl-dict-get result "value") (cider-inspector--render-value result 'v2)))) @@ -340,6 +345,14 @@ MAX-SIZE is the new value." (when (nrepl-dict-get result "value") (cider-inspector--render-value result 'v2)))) +(defun cider-inspector-set-max-nested-depth (max-nested-depth) + "Set the level of nesting for collections to display beflore truncating. +MAX-NESTED-DEPTH is the new value." + (interactive (list (read-number "Max nested depth: " cider-inspector-max-nested-depth))) + (let ((result (cider-sync-request:inspect-set-max-nested-depth max-nested-depth 'v2))) + (when (nrepl-dict-get result "value") + (cider-inspector--render-value result 'v2)))) + (defcustom cider-inspector-preferred-var-names nil "The preferred var names to be suggested by `cider-inspector-def-current-val'. @@ -522,6 +535,17 @@ instead of just its \"value\" entry." result (nrepl-dict-get result "value")))) +(defun cider-sync-request:inspect-set-max-nested-depth (max-nested-depth &optional v2) + "Set the level of nesting for collections to display before truncating. +MAX-NESTED-DEPTH is the new value, V2 indicates if the entire response should be returned +instead of just its \"value\" entry." + (let ((result (thread-first `("op" "inspect-set-max-nested-depth" + "max-nested-depth" ,max-nested-depth) + (cider-nrepl-send-sync-request cider-inspector--current-repl)))) + (if v2 + result + (nrepl-dict-get result "value")))) + (defun cider-sync-request:inspect-def-current-val (ns var-name &optional v2) "Defines a var with VAR-NAME in NS with the current inspector value, V2 indicates if the entire response should be returned @@ -545,22 +569,27 @@ instead of just its \"value\" entry." "idx" ,idx) cider-inspector--current-repl)) -(defun cider-sync-request:inspect-expr (expr ns page-size max-atom-length max-coll-size &optional v2) +(defun cider-sync-request:inspect-expr (expr ns &optional v2) "Evaluate EXPR in context of NS and inspect its result. Set the page size in paginated view to PAGE-SIZE, maximum length of atomic collection members to MAX-ATOM-LENGTH, and maximum size of nested collections to MAX-COLL-SIZE if non nil, V2 indicates if the entire response should be returned instead of just its \"value\" entry." - (let ((result (thread-first (append (nrepl--eval-request expr ns) - `("inspect" "true" - ,@(when page-size - `("page-size" ,page-size)) - ,@(when max-atom-length - `("max-atom-length" ,max-atom-length)) - ,@(when max-coll-size - `("max-coll-size" ,max-coll-size)))) - (cider-nrepl-send-sync-request cider-inspector--current-repl)))) + (let ((result (thread-first + (append (nrepl--eval-request expr ns) + `("inspect" "true" + ,@(when cider-inspector-page-size + `("page-size" ,cider-inspector-page-size)) + ,@(when cider-inspector-max-atom-length + `("max-atom-length" ,cider-inspector-max-atom-length)) + ,@(when cider-inspector-max-coll-size + `("max-coll-size" ,cider-inspector-max-coll-size)) + ,@(when cider-inspector-max-nested-depth + `("max-nested-depth" ,cider-inspector-max-nested-depth)) + "spacious" ,(if cider-inspector-spacious-collections + "true" "false"))) + (cider-nrepl-send-sync-request cider-inspector--current-repl)))) (if v2 result (nrepl-dict-get result "value")))) From 7b02614a6e45aecfcaf841d281b2749abe28c172 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Tue, 14 May 2024 10:37:16 +0300 Subject: [PATCH 103/212] Update docs --- doc/modules/ROOT/pages/debugging/inspector.adoc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/modules/ROOT/pages/debugging/inspector.adoc b/doc/modules/ROOT/pages/debugging/inspector.adoc index 6f4c4cd94..fc82481dc 100644 --- a/doc/modules/ROOT/pages/debugging/inspector.adoc +++ b/doc/modules/ROOT/pages/debugging/inspector.adoc @@ -68,6 +68,10 @@ You'll have access to additional keybindings in the inspector buffer | `cider-inspector-set-max-coll-size` | Set a new maximum size above which nested collections are truncated +| kbd:[C] +| `cider-inspector-set-max-nested-depth +| Set a new maximum nesting level above which the collections are truncated + | kbd:[a] | `cider-inspector-set-max-atom-length` | Set a new maximum length above which nested atoms (non-collections) are truncated @@ -118,9 +122,10 @@ can disable the auto selection with the variable `cider-inspector-auto-select-buffer`. You can set the amount of data shown by default with the variables -`cider-inspector-page-size`, `cider-inspector-max-coll-size`, and -`cider-inspector-max-atom-length`. The values can be adjusted for the current -inspector buffer using the `s`, `c`, and `a` keybindings. +`cider-inspector-page-size`, `cider-inspector-max-coll-size`, +`cider-inspector-max-nested-depth`, and `cider-inspector-max-atom-length`. The +values can be adjusted for the current inspector buffer using the keybidings +listed in the table above. If you enable `cider-inspector-fill-frame`, the inspector window fills its frame. From caa2a2c2e1b2761573b2a8a8b211a5654b731d7c Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Tue, 14 May 2024 09:55:23 +0300 Subject: [PATCH 104/212] Update CHANGELOG --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 910d818f9..fa326e539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,12 +19,18 @@ - [#3628](https://github.com/clojure-emacs/cider/issues/3628): `cider-ns-refresh`: summarize errors as an overlay. - [#3660](https://github.com/clojure-emacs/cider/issues/3660): Fix `cider-inspector-def-current-val` always defining in `user` namespace. - [#3661](https://github.com/clojure-emacs/cider/issues/3661): Truncate echo area output ahead of time. +- [#3664](https://github.com/clojure-emacs/cider/issues/3664): Add customization inspector op to change max nested collection depth. - Bump the injected `enrich-classpath` to [1.19.3](https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.3). - Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). - Bump the injected `cider-nrepl` to [0.48.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.48.0/CHANGELOG.md#0480-2024-05-13). - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.2/CHANGELOG.md#0232-2024-03-10). +- Bump the injected `cider-nrepl` to [0.48.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0480-2024-05-13). + - Updates [clj-reload](https://github.com/tonsky/clj-reload/blob/0.6.0/CHANGELOG.md#060---may-3-2024). + - Updates [tools.reader](https://github.com/clojure/tools.reader/blob/master/CHANGELOG.md). + - Updates [nREPL](https://github.com/nrepl/nrepl/blob/master/CHANGELOG.md#111-2024-02-20). + - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/master/CHANGELOG.md#0250-2024-05-03). - Updates [Logjam](https://github.com/clojure-emacs/logjam/blob/v0.3.0/CHANGELOG.md#030-2024-03-03). - - Updates [Compliment](https://github.com/alexander-yakushev/compliment/blob/951604/CHANGELOG.md#master-unreleased). + - Updates [Compliment](https://github.com/alexander-yakushev/compliment/blob/master/CHANGELOG.md#055-2024-05-06). - [orchard#245](https://github.com/clojure-emacs/orchard/pull/245), [cider-nrepl#868](https://github.com/clojure-emacs/cider-nrepl/pull/868): Drop support for Clojure 1.9. ### Bugs fixed From 6e89ad21be214ce7251769ac371d0db4ae3a29d2 Mon Sep 17 00:00:00 2001 From: ikappaki <34983288+ikappaki@users.noreply.github.com> Date: Fri, 17 May 2024 20:44:50 +0100 Subject: [PATCH 105/212] GH CI: add separate flow for MacOS aarch64 (#3669) Co-authored-by: ikappaki --- .github/workflows/test.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c9f177d1..23c7aea3e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,9 +21,17 @@ jobs: strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - emacs_version: ['26.3', '27.2', '28.2', '29.1'] + os: [macos-13, ubuntu-latest, windows-latest] + emacs_version: ['26.3', '27.2', '28.2', '29.3'] java_version: ['11', '17'] + include: + # aarch64 (macos-13 is Intel) + - os: macos-latest + emacs_version: '29.3' + java_version: '11' + - os: macos-latest + emacs_version: '28.2' + java_version: '11' steps: - name: Set up Emacs From 1094e3d80ac37dc01e1aac0b6439656e1daf9414 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Sat, 18 May 2024 00:14:11 +0300 Subject: [PATCH 106/212] Fix `max-mini-window-lines` not existing in old Emacsen (#3670) --- cider-overlays.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cider-overlays.el b/cider-overlays.el index 733258166..81c36e29e 100644 --- a/cider-overlays.el +++ b/cider-overlays.el @@ -318,7 +318,8 @@ focused." :duration cider-eval-result-duration :prepend-face (or overlay-face 'cider-result-overlay-face)))) (msg (format "%s%s" cider-eval-result-prefix value)) - (max-msg-length (* (floor (max-mini-window-lines)) (frame-width))) + (max-msg-length (* (floor (* (frame-height) max-mini-window-height)) + (frame-width))) (msg (if (> (string-width msg) max-msg-length) (format "%s..." (substring msg 0 (- max-msg-length 3))) msg))) From b37a8d5023b30c2386c9baf6bedc8c6bb0b8f0ad Mon Sep 17 00:00:00 2001 From: ikappaki <34983288+ikappaki@users.noreply.github.com> Date: Sun, 19 May 2024 10:52:22 +0100 Subject: [PATCH 107/212] Add macos aarch64 java/17 integration testing (#3671) Co-authored-by: ikappaki --- .github/workflows/test.yml | 6 ++++++ README.md | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23c7aea3e..f54d4caa4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,12 @@ jobs: - os: macos-latest emacs_version: '28.2' java_version: '11' + - os: macos-latest + emacs_version: '29.3' + java_version: '17' + - os: macos-latest + emacs_version: '28.2' + java_version: '17' steps: - name: Set up Emacs diff --git a/README.md b/README.md index cac850436..b5156e501 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ ----------- [![License GPL 3][badge-license]](http://www.gnu.org/licenses/gpl-3.0.txt) [![CircleCI](https://circleci.com/gh/clojure-emacs/cider.svg?style=svg)](https://circleci.com/gh/clojure-emacs/cider) +[![Integration tests](https://github.com/clojure-emacs/cider/actions/workflows/test.yml/badge.svg)](https://github.com/clojure-emacs/cider/actions/workflows/test.yml) [![Spell-check Status](https://github.com/clojure-emacs/cider/actions/workflows/spell_checking.yml/badge.svg)](https://github.com/clojure-emacs/cider/actions/workflows/spell_checking.yml) [![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true)](https://discord.com/invite/nFPpynQPME) [![Slack](https://img.shields.io/badge/chat-%23cider-green.svg?style=flat)](http://clojurians.net) From 167634a3695e7b0dbe2cd9bc8afe209062a37e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20=C3=81vila?= Date: Tue, 21 May 2024 12:01:37 -0300 Subject: [PATCH 108/212] Fix completions when using `flex`-like completion styles (#3659) --- CHANGELOG.md | 1 + cider-completion.el | 32 ++++++----- .../ROOT/pages/usage/code_completion.adoc | 54 +++++++++---------- test/cider-completion-tests.el | 22 ++++++-- 4 files changed, 63 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa326e539..f65d4996f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ ### Bugs fixed +- [#3659](https://github.com/clojure-emacs/cider/pull/3659): Fixes completions when using `flex`-like completion styles. - [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack-in when using `cider-jack-in-clj`. - [#3663](https://github.com/clojure-emacs/cider/issues/3663): Fix `cider-interactive-eval-override` invocation. diff --git a/cider-completion.el b/cider-completion.el index 6b54420c7..bd23c3859 100644 --- a/cider-completion.el +++ b/cider-completion.el @@ -181,16 +181,25 @@ performed by `cider-annotate-completion-function'." (defun cider-complete-at-point () "Complete the symbol at point." - (when-let* ((bounds (bounds-of-thing-at-point 'symbol))) + (when-let* ((bounds (or (bounds-of-thing-at-point 'symbol) + (cons (point) (point)))) + (bounds-string (buffer-substring (car bounds) (cdr bounds)))) (when (and (cider-connected-p) (not (or (cider-in-string-p) (cider-in-comment-p)))) - (let* (last-prefix + (let* (last-bounds-string last-result (complete - (lambda (prefix) - (unless (string-equal last-prefix prefix) - (setq last-prefix prefix) - (setq last-result (cider-complete prefix))) + (lambda () + ;; We are Not using the prefix extracted within the (prefix pred action) + ;; lambda. In certain completion styles, the prefix might be an empty + ;; string, which is unreliable. A more dependable method is to use the + ;; string defined by the bounds of the symbol at point. + ;; + ;; Caching just within the function is sufficient. Keeping it local + ;; ensures that it will not extend across different CIDER sessions. + (unless (string= bounds-string last-bounds-string) + (setq last-bounds-string bounds-string) + (setq last-result (cider-complete bounds-string))) last-result))) (list (car bounds) (cdr bounds) (lambda (prefix pred action) @@ -205,8 +214,7 @@ performed by `cider-annotate-completion-function'." (cond ((eq action 'metadata) `(metadata (category . cider))) ;; defines a completion category named 'cider, used later in our `completion-category-overrides` logic. ((eq (car-safe action) 'boundaries) nil) (t (with-current-buffer (current-buffer) - (complete-with-action action - (funcall complete prefix) prefix pred))))) + (complete-with-action action (funcall complete) prefix pred))))) :annotation-function #'cider-annotate-symbol :company-kind #'cider-company-symbol-kind :company-doc-buffer #'cider-create-compact-doc-buffer @@ -264,12 +272,6 @@ in the buffer." cider-company-unfiltered-candidates "CIDER backend-driven completion style.")) -;; Currently CIDER completions only work for `basic`, and not `initials`, `partial-completion`, `orderless`, etc. -;; So we ensure that those other styles aren't used with CIDER, otherwise one would see bad or no completions at all. -;; This `add-to-list` call can be removed once we implement the other completion styles. -;; (When doing that, please refactor `cider-enable-flex-completion' as well) -(add-to-list 'completion-category-overrides '(cider (styles basic))) - (defun cider-company-enable-fuzzy-completion () "Enable backend-driven fuzzy completion in the current buffer. @@ -292,6 +294,8 @@ Only affects the `cider' completion category.`" (setq completion-category-overrides (seq-remove (lambda (x) (equal 'cider (car x))) completion-category-overrides)) + (unless found-styles + (setq found-styles '(styles basic))) (unless (member 'flex found-styles) (setq found-styles (append found-styles '(flex)))) (add-to-list 'completion-category-overrides (apply #'list 'cider found-styles (when found-cycle diff --git a/doc/modules/ROOT/pages/usage/code_completion.adoc b/doc/modules/ROOT/pages/usage/code_completion.adoc index c83dcc66e..9665b99c7 100644 --- a/doc/modules/ROOT/pages/usage/code_completion.adoc +++ b/doc/modules/ROOT/pages/usage/code_completion.adoc @@ -37,18 +37,27 @@ is already properly indented. == Completion styles -CIDER defines (via the `completion-styles-alist` Elisp variable) a completion category named `cider`. +CIDER defines a specialized completion category through the `cider-complete-at-point` function, +added to `completion-at-point-functions`, establishing a dedicated completion category named +`cider`. -The `cider` completion category currently only supports `basic` completion styles (and not `partial-completion`, `orderless`, etc), -and `flex`, optionally (read more below). +The CIDER completion at point function supports most completion styles, including +`partial-completion`, `orderless` and `flex` (read more below). -CIDER declares so in this fashion: + +Sometimes the user may want to use a different completion style just for the CIDER +complete at point function. That can be achieved by setting +`completion-category-overrides`, overwriting the completion style of the CIDER +complete at point function. The following snippet accomplishes that: [source,lisp] ---- (add-to-list 'completion-category-overrides '(cider (styles basic))) ---- +This specifies that the `cider` completion category should employ the basic completion style by +default. + You can also enable the `flex` completion style by activating xref:usage/code_completion.adoc#fuzzy-candidate-matching[fuzzy candidate matching]. == Auto-completion @@ -131,13 +140,14 @@ without needing to hit an extra key, please customize: === Fuzzy candidate matching -By default, CIDER will provide completion candidates with the -assumption that whatever you've typed so far is a prefix of what -you're really trying to type. For example, if you type `map-` then -you'll only get completion candidates that have `map-` as the -beginning of their names. Sometimes, you don't know the exact prefix -for the item you want to type. In this case, you can get -CIDER-specific "fuzzy completion" by setting up in your Emacs init file: +By default, CIDER will use the completion styles defined in +`completion-styles`, the defaults being `(basic partial-completion +emacs22)` since Emacs 23. For a better description of how those +completion styles operates, refer to the official Emacs manual on +https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Styles.html[how completion alternatives are chosen]. + +CIDER provides a function to enable the `flex` completion style for CIDER-specific +completions. If you wish to enable that, you can add this to your config: [source,lisp] ---- @@ -146,11 +156,11 @@ CIDER-specific "fuzzy completion" by setting up in your Emacs init file: This adds the `flex` completion style, as introduced in Emacs 27. -Now, `company-mode` will accept certain fuzziness when matching -candidates against the prefix. For example, typing `mi` will show you -`map-indexed` as one of the possible completion candidates and `cji` -will complete to `clojure.java.io`. Different completion examples are -shown +Now, `company-mode` (and other completion packages like `corfu`) will +accept certain fuzziness when matching candidates against the +prefix. For example, typing `mi` will show you `map-indexed` as one of +the possible completion candidates and `cji` will complete to +`clojure.java.io`. Different completion examples are shown https://github.com/alexander-yakushev/compliment/wiki/Examples[here]. NOTE: `cider-company-enable-fuzzy-completion` (now deprecated) should be used for Emacs < 27. @@ -189,18 +199,6 @@ keys to cancel the prompt by customizing: (funcall f a b)))) ---- -=== Changing the completion style - -Sometimes the user may want to use a different completion style just for the CIDER -complete at point function. That can be achieved by setting -`completion-category-defaults`, overriting the completion style of the CIDER -complete at point function. The following snippet accomplishes that: - -[source,lisp] ----- -(add-to-list 'completion-category-defaults '(cider (styles basic))) ----- - === Updating stale classes and methods cache Sometimes, the completion fails to recognize new classes that came with diff --git a/test/cider-completion-tests.el b/test/cider-completion-tests.el index bfbba1ee7..e80f4253a 100644 --- a/test/cider-completion-tests.el +++ b/test/cider-completion-tests.el @@ -36,15 +36,29 @@ (let ((old-value completion-category-overrides)) (unwind-protect (progn - (it "adds `flex'" - (cider-enable-flex-completion) - (expect (member 'flex (assq 'styles (assq 'cider completion-category-overrides))) - :to-be-truthy)) + (it "adds `flex' and `basic' as a fallback" + (let ((expected-category-overrides '((cider (styles basic flex))))) + (cider-enable-flex-completion) + (expect (member 'flex (assq 'styles (assq 'cider completion-category-overrides))) + :to-be-truthy) + (expect (member 'basic (assq 'styles (assq 'cider completion-category-overrides))) + :to-be-truthy) + (expect completion-category-overrides :to-equal expected-category-overrides))) (it "doesn't add `cycle'" (expect (assq 'cycle (assq 'cider completion-category-overrides)) :to-be nil)) + (it "adds just `flex' if there is another style present" + (setq completion-category-overrides '((cider (styles partial-completion)))) + (cider-enable-flex-completion) + (expect (member 'flex (assq 'styles (assq 'cider completion-category-overrides))) + :to-be-truthy) + (expect (member 'partial-completion (assq 'styles (assq 'cider completion-category-overrides))) + :to-be-truthy) + (expect (member 'basic (assq 'styles (assq 'cider completion-category-overrides))) + :to-be nil)) + (it "doesn't re-add `flex' if already present, preserving `cycle' as well" (let ((with-flex-and-cycle '((cider (styles basic flex) (cycle t))))) From c2394fc7954170fd05a23f5e44ea74b12c25e637 Mon Sep 17 00:00:00 2001 From: Phil Hudson Date: Tue, 21 May 2024 16:04:07 +0100 Subject: [PATCH 109/212] Fix buggy special-display-buffer-names check (#3673) The code in function cider-popup-display-buffer falsely assumes that each element of special-display-buffer-names is a list. In fact and as documented, each element can be either a string or a list (the car of which is a string). --- CHANGELOG.md | 1 + cider-popup.el | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f65d4996f..589c7c987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ ### Bugs fixed +- [#3673](https://github.com/clojure-emacs/cider/pull/3673): Fix buggy `special-display-buffer-names` check. - [#3659](https://github.com/clojure-emacs/cider/pull/3659): Fixes completions when using `flex`-like completion styles. - [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack-in when using `cider-jack-in-clj`. - [#3663](https://github.com/clojure-emacs/cider/issues/3663): Fix `cider-interactive-eval-override` invocation. diff --git a/cider-popup.el b/cider-popup.el index 5d7beb564..d5e797b92 100644 --- a/cider-popup.el +++ b/cider-popup.el @@ -64,7 +64,10 @@ by adding BUFFER-NAME to the `special-display-buffer-names' list." ;; another time through `cider-popup-buffer-display'): (if (and (boundp 'special-display-buffer-names) (seq-find (lambda (entry) - (equal (car entry) buffer-name)) + ;; Fix issue #3672 Phil Hudson 2024-05-21 + ;; entry can be either a list or a string + ;; Previous code falsely assumed entry is always a list + (equal (if (listp entry) (car entry) entry) buffer-name)) special-display-buffer-names)) (progn (display-buffer buffer-name) From 08c894891d7f46407a55b825f879aeb786726a56 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 22 May 2024 13:28:35 +0300 Subject: [PATCH 110/212] Bump the injected nREPL to 1.1.2 --- CHANGELOG.md | 2 +- cider.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 589c7c987..a3366acb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ - [#3661](https://github.com/clojure-emacs/cider/issues/3661): Truncate echo area output ahead of time. - [#3664](https://github.com/clojure-emacs/cider/issues/3664): Add customization inspector op to change max nested collection depth. - Bump the injected `enrich-classpath` to [1.19.3](https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.3). -- Bump the injected nREPL to [1.1.1](https://github.com/nrepl/nrepl/blob/v1.1.1/CHANGELOG.md#111-2024-02-20). +- Bump the injected nREPL to [1.1.2](https://github.com/nrepl/nrepl/releases/tag/v1.1.2). - Bump the injected `cider-nrepl` to [0.48.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.48.0/CHANGELOG.md#0480-2024-05-13). - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.2/CHANGELOG.md#0232-2024-03-10). - Bump the injected `cider-nrepl` to [0.48.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0480-2024-05-13). diff --git a/cider.el b/cider.el index a9caaa315..c54863e6e 100644 --- a/cider.el +++ b/cider.el @@ -512,7 +512,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.1.1" +(defcustom cider-injected-nrepl-version "1.1.2" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." From 5a477c58dca86cbee723ddb2d0670689f53c47ed Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 22 May 2024 13:30:25 +0300 Subject: [PATCH 111/212] Tweak a comment --- cider-popup.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/cider-popup.el b/cider-popup.el index d5e797b92..0f0e43e0b 100644 --- a/cider-popup.el +++ b/cider-popup.el @@ -64,9 +64,7 @@ by adding BUFFER-NAME to the `special-display-buffer-names' list." ;; another time through `cider-popup-buffer-display'): (if (and (boundp 'special-display-buffer-names) (seq-find (lambda (entry) - ;; Fix issue #3672 Phil Hudson 2024-05-21 ;; entry can be either a list or a string - ;; Previous code falsely assumed entry is always a list (equal (if (listp entry) (car entry) entry) buffer-name)) special-display-buffer-names)) (progn From b6e9448ec14b9f653a41c31390147a47e06ebbad Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Thu, 23 May 2024 08:22:22 +0000 Subject: [PATCH 112/212] Update cheatsheet to v55 --- cider-cheatsheet.el | 585 ++++++++++++++++++++++---------------------- 1 file changed, 292 insertions(+), 293 deletions(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index e4d1bc6c1..2bbe104cd 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -32,56 +32,40 @@ (require 'seq) (defconst cider-cheatsheet-hierarchy - '(("Primitives" + '(("Documentation" + ("REPL" + (clojure.repl doc find-doc apropos dir source pst) + (clojure.java.javadoc javadoc))) + ("Primitives" ("Numbers" ("Arithmetic" - (clojure.core + - * / quot rem mod dec inc max min)) + (clojure.core + - * / quot rem mod inc dec max min abs) + (clojure.math floor-div floor-mod ceil floor rint round pow sqrt cbrt E exp expm1 log log10 log1p PI sin cos tan asin acos atan atan2)) + ("Arbitrary Precision Arithmetic" + (clojure.core +\' -\' *\' inc\' dec\')) ("Compare" - (clojure.core = == not= < > <= >= compare)) + (clojure.core == < > <= >= compare)) ("Bitwise" - (clojure.core bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor unsigned-bit-shift-right)) + (clojure.core bit-and bit-or bit-xor bit-not bit-flip bit-set bit-shift-right bit-shift-left bit-and-not bit-clear bit-test unsigned-bit-shift-right)) ("Cast" - (clojure.core byte short long int float double bigdec bigint biginteger num rationalize)) + (clojure.core byte short int long float double bigdec bigint num rationalize biginteger)) ("Test" - (clojure.core nil? some? identical? zero? pos? neg? even? odd?)) + (clojure.core zero? pos? neg? even? odd? number? rational? integer? ratio? decimal? float? double? int? nat-int? neg-int? pos-int? NaN? infinite?)) ("Random" - (clojure.core rand rand-int)) + (clojure.core rand rand-int) + (clojure.math random)) ("BigDecimal" (clojure.core with-precision)) - ("Ratios" - (clojure.core numerator denominator ratio?)) - ("Arbitrary Precision Arithmetic" - (clojure.core +\' -\' *\' inc\' dec\')) ("Unchecked" - (clojure.core *unchecked-math* - unchecked-add - unchecked-add-int - unchecked-byte - unchecked-char - unchecked-dec - unchecked-dec-int - unchecked-divide-int - unchecked-double - unchecked-float - unchecked-inc - unchecked-inc-int - unchecked-int - unchecked-long - unchecked-multiply - unchecked-multiply-int - unchecked-negate - unchecked-negate-int - unchecked-remainder-int - unchecked-short - unchecked-subtract - unchecked-subtract-int))) - + (clojure.core *unchecked-math* unchecked-add unchecked-dec unchecked-inc unchecked-multiply unchecked-negate unchecked-subtract)) + ("Ratios" + (clojure.core numerator denominator ratio?))) ("Strings" ("Create" (clojure.core str format)) ("Use" - (clojure.core count get subs compare) - (clojure.string join escape split split-lines replace replace-first reverse re-quote-replacement index-of last-index-of starts-with? ends-with? includes?)) + (clojure.core count get subs compare parse-boolean parse-double parse-long parse-uuid) + (clojure.string join escape split split-lines replace replace-first reverse index-of last-index-of)) ("Regex" (clojure.core re-find re-seq re-matches re-pattern re-matcher re-groups) (clojure.string replace replace-first re-quote-replacement)) @@ -90,32 +74,26 @@ ("Trim" (clojure.string trim trim-newline triml trimr)) ("Test" - (clojure.core char char? string?) - (clojure.string blank?))) - + (clojure.core string?) + (clojure.string blank? starts-with? ends-with? includes?))) ("Other" ("Characters" - (clojure.core char char-name-string char-escape-string)) + (clojure.core char char? char-name-string char-escape-string)) ("Keywords" (clojure.core keyword keyword? find-keyword)) ("Symbols" - (clojure.core symbol symbol? gensym)) - ("Data Readers" - (clojure.core *data-readers* default-data-readers *default-data-reader-fn*)))) - + (clojure.core symbol symbol? gensym)))) ("Collections" - ("Generic Ops" - (clojure.core count bounded-count empty not-empty into conj)) - ("Tree Walking" + ("Generic ops" + (clojure.core count empty not-empty into conj bounded-count)) + ("Tree walking" (clojure.walk walk prewalk prewalk-demo prewalk-replace postwalk postwalk-demo postwalk-replace keywordize-keys stringify-keys)) ("Content tests" (clojure.core distinct? empty? every? not-every? some not-any?)) ("Capabilities" (clojure.core sequential? associative? sorted? counted? reversible?)) ("Type tests" - (clojure.core type class coll? list? vector? set? map? seq? - number? integer? float? decimal? class? rational? ratio? - chunked-seq? reduced? special-symbol? record?)) + (clojure.core coll? list? vector? set? map? seq? record? map-entry?)) ("Lists" ("Create" (clojure.core list list*)) @@ -123,72 +101,126 @@ (clojure.core first nth peek)) ("Change" (clojure.core cons conj rest pop))) - ("Vectors" ("Create" - (clojure.core vec vector vector-of)) + (clojure.core vector vec vector-of mapv filterv)) ("Examine" - (clojure.core get peek)) - + (clojure.core nth get peek)) ("Change" - (clojure.core assoc pop subvec replace conj rseq)) + (clojure.core assoc assoc-in pop subvec replace conj rseq update update-in)) ("Ops" - (clojure.core mapv filterv reduce-kv))) - + (clojure.core reduce-kv))) ("Sets" - ("Create" - (clojure.core set hash-set sorted-set sorted-set-by)) + ("Create unsorted" + (clojure.core set hash-set)) + ("Create sorted" + (clojure.core sorted-set sorted-set-by) + (clojure.data.avl sorted-set sorted-set-by) + (clojure.data.int-map int-set dense-int-set)) ("Examine" (clojure.core get contains?)) ("Change" (clojure.core conj disj)) - ("Relational Algebra" - (clojure.set join select project union difference intersection)) - ("Get map" - (clojure.set index rename-keys rename map-invert)) + ("Set ops" + (clojure.set union difference intersection select)) ("Test" (clojure.set subset? superset?)) - ("Sorted Sets" + ("Sorted sets" (clojure.core rseq subseq rsubseq))) - ("Maps" - ("Create" - (clojure.core hash-map array-map zipmap sorted-map sorted-map-by bean frequencies group-by)) + ("Create unsorted" + (clojure.core hash-map array-map zipmap bean frequencies group-by) + (clojure.set index)) + ("Create sorted" + (clojure.core sorted-map sorted-map-by) + (clojure.data.avl sorted-map sorted-map-by) + (clojure.data.priority-map priority-map) + (clojure.data.int-map int-map)) ("Examine" - (clojure.core get get-in contains? find keys vals map-entry?)) + (clojure.core get get get-in contains? find keys vals)) ("Change" - (clojure.core assoc assoc-in dissoc merge merge-with select-keys update update-in)) + (clojure.core assoc assoc-in dissoc merge merge-with select-keys update update-in update-keys update-vals) + (clojure.set rename-keys map-invert)) + ("Ops" + (clojure.core reduce-kv)) ("Entry" (clojure.core key val)) - ("Sorted Maps" + ("Sorted maps" (clojure.core rseq subseq rsubseq))) - + ("Queues" + ("Examine" + (clojure.core peek)) + ("Change" + (clojure.core conj pop))) + ("Relations" + ("Relational algebra" + (clojure.set join select project union difference intersection index rename))) + ("Transients" + ("Create" + (clojure.core transient persistent!)) + ("Change" + (clojure.core conj! pop! assoc! dissoc! disj!))) + ("Misc" + ("Compare" + (clojure.core = identical? not= not compare) + (clojure.data diff)) + ("Test" + (clojure.core true? false? instance? nil? some?))) ("Hashes" - (clojure.core hash hash-ordered-coll hash-unordered-coll mix-collection-hash)) - - ("Volatiles" - (clojure.core volatile! volatile? vreset! vswap!))) - - ("Functions" - ("Create" - (clojure.core fn defn defn- definline identity constantly comp complement partial juxt memfn memoize fnil every-pred some-fn trampoline)) - ("Call" - (clojure.core -> ->> some-> some->> as-> cond-> cond->>)) - ("Test" - (clojure.core fn? ifn?))) - + (clojure.core hash hash-ordered-coll hash-unordered-coll mix-collection-hash))) + ("Sequences" + ("Creating a Lazy Seq" + ("From collection" + (clojure.core seq vals keys rseq subseq rsubseq sequence)) + ("From producer fn" + (clojure.core lazy-seq repeatedly iterate iteration)) + ("From constant" + (clojure.core repeat range)) + ("From other" + (clojure.core file-seq line-seq resultset-seq re-seq tree-seq xml-seq iterator-seq enumeration-seq)) + ("From seq" + (clojure.core keep keep-indexed))) + ("Seq in, Seq out" + ("Get shorter" + (clojure.core distinct filter remove take-nth for dedupe random-sample)) + ("Get longer" + (clojure.core cons conj concat lazy-cat mapcat cycle interleave interpose)) + ("Tail-items" + (clojure.core rest nthrest next fnext nnext drop drop-while take-last for)) + ("Head-items" + (clojure.core take take-while butlast drop-last for)) + ("Change" + (clojure.core conj concat distinct flatten group-by partition partition-all partition-by split-at split-with filter remove replace shuffle)) + ("Rearrange" + (clojure.core reverse sort sort-by compare)) + ("Process items" + (clojure.core map pmap map-indexed mapcat for replace seque))) + ("Using a Seq" + ("Extract item" + (clojure.core first second last rest next ffirst nfirst fnext nnext nth nthnext rand-nth when-first max-key min-key)) + ("Construct coll" + (clojure.core zipmap into reduce reductions set vec into-array to-array-2d mapv filterv)) + ("Pass to fn" + (clojure.core apply)) + ("Search" + (clojure.core some filter)) + ("Force evaluation" + (clojure.core doseq dorun doall run!)) + ("Check for forced" + (clojure.core realized?)))) ("Transducers" - ("Create" - (clojure.core cat dedupe distinct drop drop-while filter halt-when interpose keep keep-indexed map map-indexed mapcat partition-all partition-by random-sample remove replace take take-nth take-while)) - ("Call" - (clojure.core ->Eduction eduction into sequence transduce completing run!)) - ("Early Termination" - (clojure.core deref reduced reduced? ensure-reduced unreduced))) - + ("Off the shelf" + (clojure.core map mapcat filter remove take take-while take-nth drop drop-while replace partition-by partition-all keep keep-indexed map-indexed distinct interpose cat dedupe random-sample halt-when)) + ("Create your own" + (clojure.core completing ensure-reduced unreduced)) + ("Use" + (clojure.core into sequence transduce eduction)) + ("Early termination" + (clojure.core reduced reduced? deref))) ("Spec" ("Operations" (clojure.spec.alpha valid? conform unform explain explain-data explain-str explain-out form describe assert check-asserts check-asserts?)) - ("Generator Ops" + ("Generator ops" (clojure.spec.alpha gen exercise exercise-fn)) ("Defn & Registry" (clojure.spec.alpha def fdef registry get-spec spec? spec with-gen)) @@ -196,19 +228,18 @@ (clojure.spec.alpha and or)) ("Collection" (clojure.spec.alpha coll-of map-of every every-kv keys merge)) - ("Regex " + ("Regex" (clojure.spec.alpha cat alt * + \? & keys*)) ("Range" (clojure.spec.alpha int-in inst-in double-in int-in-range? inst-in-range?)) - ("Custom Explain" - (clojure.spec.alpha explain-printer *explain-out*)) ("Other" (clojure.spec.alpha nilable multi-spec fspec conformer)) - + ("Custom explain" + (clojure.spec.alpha explain-printer *explain-out*)) ("Predicates with test.check generators" ("Numbers" (clojure.core number? rational? integer? ratio? decimal? float? zero? double? int? nat-int? neg-int? pos-int?)) - ("Symbols & Keywords" + ("Symbols, keywords" (clojure.core keyword? symbol? ident? qualified-ident? qualified-keyword? qualified-symbol? simple-ident? simple-keyword? simple-symbol?)) ("Scalars" (clojure.core string? true? false? nil? some? boolean? bytes? inst? uri? uuid?)) @@ -216,48 +247,75 @@ (clojure.core list? map? set? vector? associative? coll? sequential? seq? empty? indexed? seqable?)) ("Other" (clojure.core any?)))) - - ("Other" - ("XML" - (clojure.core xml-seq) - (clojure.xml parse)) - ("REPL" - (clojure.core *1 *2 *3 *e *print-dup* *print-length* *print-level* *print-meta* *print-readably*)) - ("EDN" - (clojure.edn read read-string)) - ("Compiling Code & Class Generation" - (clojure.core *compile-files* *compile-path* *file* *warn-on-reflection* compile gen-class gen-interface loaded-libs test)) + ("IO" + ("To/from ..." + (clojure.core spit slurp)) + ("To *out*" + (clojure.core pr prn print printf println newline) + (clojure.pprint print-table)) + ("To writer" + (clojure.pprint pprint cl-format)) + ("To string" + (clojure.core format with-out-str pr-str prn-str print-str println-str)) + ("From *in*" + (clojure.core read-line) + (clojure.edn read) + (clojure.tools.reader.edn read)) + ("From reader" + (clojure.core line-seq) + (clojure.edn read) + (clojure.tools.reader.edn read)) + ("From string" + (clojure.core with-in-str) + (clojure.edn read-string) + (clojure.tools.reader.edn read-string)) + ("Open" + (clojure.core with-open) + (clojure.java.io reader writer input-stream output-stream)) ("Misc" - (clojure.core eval force name *clojure-version* clojure-version *command-line-args*)) - ("Pretty Printing" - (clojure.pprint pprint print-table pp *print-right-margin*)) - ("Browser / Shell" - (clojure.java.browse browse-url) - (clojure.java.shell sh with-sh-dir with-sh-env))) - - ("Vars & Global Environment" - ("Def Variants" - (:special def) - (clojure.core defn defn- definline defmacro defmethod defmulti defonce defrecord)) - ("Interned Vars" - (:special var) - (clojure.core declare intern binding find-var)) - ("Var Objects" - (clojure.core with-local-vars var-get var-set alter-var-root var?)) - ("Var Validators" - (clojure.core set-validator! get-validator))) - - ("Reader Conditionals" - (clojure.core reader-conditional reader-conditional? tagged-literal tagged-literal?)) - + (clojure.core flush file-seq *in* *out* *err*) + (clojure.java.io file copy delete-file resource as-file as-url as-relative-path make-parents)) + ("Data readers" + (clojure.core *data-readers* default-data-readers *default-data-reader-fn*)) + ("Tap" + (clojure.core tap> add-tap remove-tap)) + ("Interop" + (clojure.java.io make-writer make-reader make-output-stream make-input-stream))) + ("Functions" + ("Create" + (:special fn) + (clojure.core defn defn- definline identity constantly memfn comp complement partial juxt memoize fnil every-pred some-fn)) + ("Call" + (clojure.core apply -> ->> trampoline as-> cond-> cond->> some-> some->>)) + ("Test" + (clojure.core fn? ifn?))) ("Abstractions" ("Protocols" - (clojure.core defprotocol extend extend-type extend-protocol reify extends? satisfies? extenders)) - ("Records & Types" - (clojure.core defrecord deftype)) + ("Define" + (clojure.core defprotocol)) + ("Extend" + (clojure.core extend-type)) + ("Reify" + (clojure.core reify)) + ("Test" + (clojure.core satisfies? extends?)) + ("Other" + (clojure.core extend extend-protocol extenders))) + ("Records" + ("Define" + (clojure.core defrecord)) + ("Test" + (clojure.core record?))) + ("Types" + ("Define" + (clojure.core deftype)) + ("With methods" + (clojure.core deftype))) ("Multimethods" ("Define" - (clojure.core defmulti defmethod)) + (clojure.core defmulti)) + ("Method define" + (clojure.core defmethod)) ("Dispatch" (clojure.core get-method methods)) ("Remove" @@ -265,8 +323,7 @@ ("Prefer" (clojure.core prefer-method prefers)) ("Relation" - (clojure.core derive isa? parents ancestors descendants make-hierarchy)))) - + (clojure.core derive underive isa? parents ancestors descendants make-hierarchy)))) ("Macros" ("Create" (clojure.core defmacro definline)) @@ -274,154 +331,127 @@ (clojure.core macroexpand-1 macroexpand) (clojure.walk macroexpand-all)) ("Branch" - (clojure.core and or when when-not when-let when-first if-not if-let cond condp case)) + (clojure.core and or when when-not when-let when-first if-not if-let cond condp case when-some if-some)) ("Loop" (clojure.core for doseq dotimes while)) ("Arrange" - (clojure.core .. doto ->)) + (clojure.core .. doto -> ->> as-> cond-> cond->> some-> some->>)) ("Scope" - (clojure.core binding locking time) - (clojure.core with-in-str with-local-vars with-open with-out-str with-precision with-redefs with-redefs-fn)) + (clojure.core binding locking time with-in-str with-local-vars with-open with-out-str with-precision with-redefs with-redefs-fn)) ("Lazy" - (clojure.core lazy-cat lazy-seq delay delay?)) + (clojure.core lazy-cat lazy-seq delay)) ("Doc" (clojure.core assert comment) - (clojure.repl doc dir dir-fn source-fn))) - - ("Java Interop" + (clojure.repl doc))) + ("Metadata" + (clojure.core meta with-meta vary-meta alter-meta! reset-meta! test) + (clojure.repl doc find-doc)) + ("Special Forms" ("General" - (:special new set!) - (clojure.core .. doto bean comparator enumeration-seq import iterator-seq memfn definterface supers bases)) - ("Cast" - (clojure.core boolean byte short char int long float double bigdec bigint num cast biginteger)) - ("Exceptions" - (:special throw try catch finally) - (clojure.core ex-info ex-data Throwable->map StackTraceElement->vec) - (clojure.repl pst)) - ("Arrays" - ("Create" - (clojure.core boolean-array byte-array double-array char-array float-array int-array long-array make-array object-array short-array to-array)) - ("Manipulate" - (clojure.core aclone aget aset alength amap areduce aset-int aset-long aset-short aset-boolean aset-byte aset-char aset-double aset-float)) - ("Cast" - (clojure.core booleans bytes chars doubles floats ints longs shorts))) - ("Proxy" - ("Create" - (clojure.core proxy get-proxy-class construct-proxy init-proxy)) - ("Misc" - (clojure.core proxy-mappings proxy-super update-proxy)))) - + (:special def if do let letfn quote var fn loop recur set! throw try monitor-enter monitor-exit)) + ("Binding Forms / Destructuring" + (:special let fn loop) + (clojure.core defn defmacro for doseq if-let when-let if-some when-some))) + ("Vars and global environment" + ("Def variants" + (:special def) + (clojure.core defn defn- definline defmacro defmethod defmulti defonce defrecord)) + ("Interned vars" + (clojure.core declare intern binding find-var) + (:special var)) + ("Var objects" + (clojure.core with-local-vars var-get var-set alter-var-root var? bound? thread-bound?)) + ("Var validators" + (clojure.core set-validator! get-validator))) ("Namespaces" ("Current" (clojure.core *ns*)) - ("Create Switch" + ("Create/Switch" (clojure.core ns in-ns create-ns)) ("Add" - (clojure.core alias import intern refer refer-clojure)) + (clojure.core alias import intern refer) + (:special def)) ("Find" (clojure.core all-ns find-ns)) ("Examine" - (clojure.core ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers)) + (clojure.core ns-name ns-aliases ns-map ns-interns ns-publics ns-refers ns-imports)) ("From symbol" - (clojure.core resolve namespace ns-resolve the-ns)) + (clojure.core resolve ns-resolve namespace the-ns requiring-resolve)) ("Remove" (clojure.core ns-unalias ns-unmap remove-ns))) ("Loading" ("Load libs" (clojure.core require use import refer)) - ("List Loaded" + ("List loaded" (clojure.core loaded-libs)) - ("Load Misc" + ("Load misc" (clojure.core load load-file load-reader load-string))) - ("Concurrency" ("Atoms" - (clojure.core atom swap! swap-vals! reset! reset-vals! compare-and-set!)) + (clojure.core atom swap! reset! compare-and-set! swap-vals! reset-vals!)) ("Futures" - (clojure.core future future-call future-cancel future-cancelled? future-done? future?)) + (clojure.core future future-call future-done? future-cancel future-cancelled? future?)) ("Threads" - (clojure.core bound-fn bound-fn* get-thread-bindings pop-thread-bindings push-thread-bindings)) - + (clojure.core bound-fn bound-fn* get-thread-bindings push-thread-bindings pop-thread-bindings thread-bound?)) + ("Volatiles" + (clojure.core volatile! vreset! vswap! volatile?)) ("Misc" (clojure.core locking pcalls pvalues pmap seque promise deliver)) - - ("Refs & Transactions" + ("Refs and Transactions" ("Create" (clojure.core ref)) ("Examine" (clojure.core deref)) ("Transaction" (clojure.core sync dosync io!)) - ("In Transaction" + ("In transaction" (clojure.core ensure ref-set alter commute)) ("Validators" - (clojure.core get-validator set-validator!)) + (clojure.core set-validator! get-validator)) ("History" - (clojure.core ref-history-count ref-max-history ref-min-history))) - - ("Agents & Asynchronous Actions" + (clojure.core ref-history-count ref-min-history ref-max-history))) + ("Agents and Asynchronous Actions" ("Create" (clojure.core agent)) ("Examine" (clojure.core agent-error)) - ("Change State" + ("Change state" (clojure.core send send-off restart-agent send-via set-agent-send-executor! set-agent-send-off-executor!)) - ("Block Waiting" + ("Block waiting" (clojure.core await await-for)) - ("Ref Validators" - (clojure.core get-validator set-validator!)) + ("Ref validators" + (clojure.core set-validator! get-validator)) ("Watchers" (clojure.core add-watch remove-watch)) - ("Thread Handling" + ("Thread handling" (clojure.core shutdown-agents)) ("Error" (clojure.core error-handler set-error-handler! error-mode set-error-mode!)) ("Misc" (clojure.core *agent* release-pending-sends)))) - - ("Sequences" - ("Creating a Lazy Seq" - ("From Collection" - (clojure.core seq sequence keys vals rseq subseq rsubseq)) - ("From Producer Fn" - (clojure.core lazy-seq repeatedly iterate)) - ("From Constant" - (clojure.core repeat range)) - ("From Other" - (clojure.core file-seq line-seq resultset-seq re-seq tree-seq xml-seq iterator-seq enumeration-seq)) - ("From Seq" - (clojure.core keep keep-indexed))) - - ("Seq in, Seq out" - ("Get shorter" - (clojure.core distinct dedupe filter remove for)) - ("Get longer" - (clojure.core cons conj concat lazy-cat mapcat cycle interleave interpose))) - ("Tail-items" - (clojure.core rest nthrest fnext nnext drop drop-while take-last for)) - ("Head-items" - (clojure.core take take-nth take-while butlast drop-last for)) - ("Change" - (clojure.core conj concat distinct flatten group-by partition partition-all partition-by split-at split-with filter remove replace shuffle random-sample)) - ("Rearrange" - (clojure.core reverse sort sort-by compare)) - ("Process items" - (clojure.core map pmap map-indexed mapcat for replace seque)) - - ("Using a Seq" - ("Extract item" - (clojure.core first second last rest next ffirst nfirst fnext nnext nth nthnext rand-nth when-first max-key min-key)) - ("Construct coll" - (clojure.core zipmap into reduce reductions set vec into-array to-array-2d)) - ("Pass to fn" - (clojure.core apply)) - ("Search" - (clojure.core some filter)) - ("Force evaluation" - (clojure.core doseq dorun doall)) - ("Check for forced" - (clojure.core realized?)))) - + ("Java Interoperation" + ("General" + (clojure.core .. doto bean comparator enumeration-seq import iterator-seq memfn class class? bases supers type gen-class gen-interface definterface) + (:special new set!)) + ("Cast" + (clojure.core boolean byte short char int long float double bigdec bigint num cast biginteger)) + ("Exceptions" + (:special throw try catch finally) + (clojure.repl pst) + (clojure.core ex-info ex-data Throwable->map StackTraceElement->vec ex-cause ex-message) + (clojure.main ex-triage ex-str err->msg report-error)) + ("Arrays" + ("Create" + (clojure.core make-array object-array boolean-array byte-array short-array char-array int-array long-array float-array double-array aclone to-array to-array-2d into-array)) + ("Use" + (clojure.core aget aset aset-boolean aset-byte aset-short aset-char aset-int aset-long aset-float aset-double alength amap areduce)) + ("Cast" + (clojure.core booleans bytes shorts chars ints longs floats doubles))) + ("Proxy" + ("Create" + (clojure.core proxy get-proxy-class construct-proxy init-proxy)) + ("Misc" + (clojure.core proxy-mappings proxy-super update-proxy)))) ("Zippers" ("Create" (clojure.zip zipper seq-zip vector-zip xml-zip)) @@ -433,62 +463,38 @@ (clojure.zip make-node replace edit insert-child insert-left insert-right append-child remove)) ("Move" (clojure.zip next prev)) - ("XML" - (clojure.data.zip.xml attr attr= seq-test tag= text text= xml-> xml1->)) ("Misc" - (clojure.zip root node branch? end?))) - - ("Documentation" + (clojure.zip root node branch? end?)) + ("XML" + (clojure.data.zip.xml attr attr= seq-test tag= text text= xml-> xml1->))) + ("Other" + ("XML" + (clojure.xml parse) + (clojure.core xml-seq)) ("REPL" - (clojure.repl doc find-doc apropos source pst) - (clojure.java.javadoc javadoc))) - - ("Transients" - ("Create" - (clojure.core transient persistent!)) - ("Change" - (clojure.core conj! pop! assoc! dissoc! disj!))) - ("Misc" - ("Compare" - (clojure.core = == identical? not= not compare) - (clojure.data diff)) - ("Test" - (clojure.core true? false? nil? instance?))) - - ("IO" - ("To/from ..." - (clojure.core spit slurp)) - ("To *out*" - (clojure.core pr prn print printf println newline) - (clojure.pprint print-table)) - ("To writer" - (clojure.pprint pprint cl-format)) - ("To string" - (clojure.core format with-out-str pr-str prn-str print-str println-str)) - ("From *in*" - (clojure.core read-line read)) - ("From reader" - (clojure.core line-seq read)) - ("From string" - (clojure.core read-string with-in-str)) - ("Open" - (clojure.core with-open) - (clojure.java.io reader writer input-stream output-stream)) - ("Interop" - (clojure.java.io make-writer make-reader make-output-stream make-input-stream)) + (clojure.core *1 *2 *3 *e *print-dup* *print-length* *print-level* *print-meta* *print-readably*)) + ("Code" + (clojure.core *compile-files* *compile-path* *file* *warn-on-reflection* compile loaded-libs test)) ("Misc" - (clojure.core flush file-seq *in* *out* *err*) - (clojure.java.io file copy delete-file resource as-file as-url as-relative-path make-parents))) - - ("Metadata" - (clojure.core meta with-meta alter-meta! reset-meta! vary-meta)) - - ("Special Forms" - (:special def if do quote var recur throw try monitor-enter monitor-exit) - (clojure.core fn loop) - ("Binding / Destructuring" - (clojure.core let fn letfn defn defmacro loop for doseq if-let if-some when-let when-some))) - + (clojure.core eval force hash *clojure-version* clojure-version *command-line-args* random-uuid)) + ("Browser / Shell" + (clojure.java.browse browse-url) + (clojure.java.shell sh with-sh-dir with-sh-env)) + ("EDN" + (clojure.edn read read-string)) + ("Pretty Printing" + (clojure.pprint pprint print-table pp *print-right-margin*)) + ("Compiling Code & Class Generation" + (clojure.core *compile-files* *compile-path* *file* *warn-on-reflection* compile gen-class gen-interface loaded-libs test))) + ("Reader Conditionals" + (clojure.core reader-conditional reader-conditional? tagged-literal tagged-literal?)) + ("Unit Tests" + ("Defining" + (clojure.test deftest deftest- testing is are)) + ("Running" + (clojure.test run-tests run-all-tests test-vars)) + ("Fixtures" + (clojure.test use-fixtures join-fixtures compose-fixtures))) ("Async" ("Main" (clojure.core.async go go-loop ! >!! chan put! take take! close! timeout offer! poll! promise-chan)) @@ -509,14 +515,7 @@ ("Higher Order" (clojure.core.async filter< filter> map map< map> mapcat< mapcat> partition partition-by reduce remove< remove> split)) ("Pre-Populate" - (clojure.core.async into onto-chan to-chan))) - ("Unit Tests" - ("Defining" - (clojure.test deftest deftest- testing is are)) - ("Running" - (clojure.test run-tests run-all-tests test-vars)) - ("Fixtures" - (clojure.test use-fixtures join-fixtures compose-fixtures)))) + (clojure.core.async into onto-chan to-chan)))) "A data structure for Clojure cheatsheet information. It's a tree, where the head of each list determines the context of the rest From fd955070f8ab7d8bcc3b373c93da0a75246c2d57 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sat, 25 May 2024 04:01:13 +0000 Subject: [PATCH 113/212] Remove useless bit of code from cheatsheet --- cider-cheatsheet.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 2bbe104cd..a7ce40dac 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -551,10 +551,7 @@ This list is supposed to have the following format: "Expand the symbols in VAR-LIST to fully-qualified var names. The list can hold one or more lists inside - one per each namespace." - (let ((namespaced-vars (seq-mapcat #'cider-cheatsheet--expand-vars - (seq-remove (lambda (list) - (eq (car list) :url)) - var-list)))) + (let ((namespaced-vars (seq-mapcat #'cider-cheatsheet--expand-vars var-list))) (cider-doc-lookup (completing-read "Select var: " namespaced-vars)))) ;;;###autoload From 8be2bcffca2c58491ec24255a760302f1c81562f Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 25 May 2024 08:09:31 +0200 Subject: [PATCH 114/212] Teach codespell about eduction and unform --- codespell.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codespell.txt b/codespell.txt index 5158a017f..d7291aa3f 100644 --- a/codespell.txt +++ b/codespell.txt @@ -1,5 +1,7 @@ +debbugs edn +eduction hist juxt nd -debbugs +unform From a0888984e191f0c58f689fee07c02d397ca6af1a Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sun, 26 May 2024 04:23:10 +0000 Subject: [PATCH 115/212] Add an alternative way to display cheatsheet in a buffer --- cider-cheatsheet.el | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index a7ce40dac..8182d89a6 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -29,6 +29,7 @@ ;;; Code: (require 'cider-doc) +(require 'cl-lib) (require 'seq) (defconst cider-cheatsheet-hierarchy @@ -568,6 +569,38 @@ When you make it to a Clojure var its doc buffer gets displayed." (setq cheatsheet-data (cdr section-data)))) (cider-cheatsheet--select-var cheatsheet-data))) +(cl-defun cider-cheatsheet--insert-hierarchy (hierarchy &optional (level 0)) + "Insert the cheatsheet hierarchy with visual indentation for each level." + (dolist (node hierarchy) + (if (stringp (car node)) + (progn + (insert (make-string (* level 2) ?\s) (car node) "\n") + (cider-cheatsheet--insert-hierarchy (cdr node) (1+ level))) + (dolist (var (cider-cheatsheet--expand-vars node)) + (insert (make-string (* level 2) ?\s)) + (insert-text-button var + 'var var + 'action (lambda (btn) + (cider-doc-lookup (button-get btn 'var))) + 'help-echo (format "Show documentation for %s" var)) + (insert "\n"))))) + +(defun cider-cheatsheet--buffer-contents () + "Generate cheatsheet buffer contents based on the cheatsheet hierarchy." + (with-temp-buffer + (cider-cheatsheet--insert-hierarchy cider-cheatsheet-hierarchy) + (buffer-string))) + +;;;###autoload +(defun cider-cheatsheet-buffer () + "Display cheatsheet in a popup buffer." + (interactive) + (with-current-buffer (cider-popup-buffer "*cider-cheatsheet*") + (read-only-mode -1) + (insert (cider-cheatsheet--buffer-contents)) + (read-only-mode 1) + (goto-char (point-min)))) + (provide 'cider-cheatsheet) ;;; cider-cheatsheet.el ends here From 26c2713221712b5b1639ce0a9c766f53324d2860 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sun, 26 May 2024 04:31:32 +0000 Subject: [PATCH 116/212] Display cheatsheet in a buffer by default --- cider-cheatsheet.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 8182d89a6..7e789977c 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -556,7 +556,7 @@ The list can hold one or more lists inside - one per each namespace." (cider-doc-lookup (completing-read "Select var: " namespaced-vars)))) ;;;###autoload -(defun cider-cheatsheet () +(defun cider-cheatsheet-select () "Navigate `cider-cheatsheet-hierarchy' with `completing-read'. When you make it to a Clojure var its doc buffer gets displayed." @@ -592,7 +592,7 @@ When you make it to a Clojure var its doc buffer gets displayed." (buffer-string))) ;;;###autoload -(defun cider-cheatsheet-buffer () +(defun cider-cheatsheet () "Display cheatsheet in a popup buffer." (interactive) (with-current-buffer (cider-popup-buffer "*cider-cheatsheet*") From ab1fa133ba6110198b237495ba4a04a096fe4ade Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sun, 26 May 2024 07:07:09 +0000 Subject: [PATCH 117/212] Change docstring to fix linting warnings --- cider-cheatsheet.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 7e789977c..83a7eebe2 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -570,7 +570,7 @@ When you make it to a Clojure var its doc buffer gets displayed." (cider-cheatsheet--select-var cheatsheet-data))) (cl-defun cider-cheatsheet--insert-hierarchy (hierarchy &optional (level 0)) - "Insert the cheatsheet hierarchy with visual indentation for each level." + "Insert HIERARCHY with visual indentation for LEVEL." (dolist (node hierarchy) (if (stringp (car node)) (progn From dd1fda02c2779b6b67febf81a11a82f0ed693f90 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Mon, 27 May 2024 06:41:00 +0000 Subject: [PATCH 118/212] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3366acb4..1154d5178 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ### New features +- [#3681](https://github.com/clojure-emacs/cider/pull/3681): Add an alternative way to display cheatsheet in a buffer and make it the default. + - Current `cider-cheatsheet` command is renamed to `cider-cheatsheet-select`. + - New way to display cheatsheet in a buffer is available with `cider-cheatsheet` command. - [#3632](https://github.com/clojure-emacs/cider/pull/3623): Add new configuration variable `cider-clojure-cli-global-aliases`. - [#3366](https://github.com/clojure-emacs/cider/pull/3366): Support display of error overlays with `#dbg!` and `#break!` reader macros. - [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode). From 27245f3107f499d04738afc0892e8b9f579d2754 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Tue, 28 May 2024 07:02:38 +0000 Subject: [PATCH 119/212] Update docstring for cider-cheatsheet-select --- cider-cheatsheet.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 83a7eebe2..eb9f39628 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -557,9 +557,7 @@ The list can hold one or more lists inside - one per each namespace." ;;;###autoload (defun cider-cheatsheet-select () - "Navigate `cider-cheatsheet-hierarchy' with `completing-read'. - -When you make it to a Clojure var its doc buffer gets displayed." + "Navigate cheatsheet sections and show documentation for selected var." (interactive) (let ((cheatsheet-data cider-cheatsheet-hierarchy)) (while (stringp (caar cheatsheet-data)) From 2b37d0f6494a4916c0b88013e02037485229c438 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Tue, 28 May 2024 07:35:21 +0000 Subject: [PATCH 120/212] Refactor cider-cheatsheet-select --- cider-cheatsheet.el | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index eb9f39628..86fc745b9 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -30,6 +30,7 @@ (require 'cider-doc) (require 'cl-lib) +(require 'map) (require 'seq) (defconst cider-cheatsheet-hierarchy @@ -548,24 +549,18 @@ This list is supposed to have the following format: (mapcar #'symbol-name vars) (mapcar (lambda (var) (format "%s/%s" ns var)) vars)))) -(defun cider-cheatsheet--select-var (var-list) - "Expand the symbols in VAR-LIST to fully-qualified var names. - -The list can hold one or more lists inside - one per each namespace." - (let ((namespaced-vars (seq-mapcat #'cider-cheatsheet--expand-vars var-list))) - (cider-doc-lookup (completing-read "Select var: " namespaced-vars)))) - ;;;###autoload (defun cider-cheatsheet-select () "Navigate cheatsheet sections and show documentation for selected var." (interactive) - (let ((cheatsheet-data cider-cheatsheet-hierarchy)) - (while (stringp (caar cheatsheet-data)) - (let* ((sections (mapcar #'car cheatsheet-data)) - (sel-section (completing-read "Select cheatsheet section: " sections)) - (section-data (seq-find (lambda (elem) (equal (car elem) sel-section)) cheatsheet-data))) - (setq cheatsheet-data (cdr section-data)))) - (cider-cheatsheet--select-var cheatsheet-data))) + (let ((hierarchy cider-cheatsheet-hierarchy)) + (while (stringp (caar hierarchy)) + (let* ((sections (mapcar #'car hierarchy)) + (section (completing-read "Select section: " sections))) + (setq hierarchy (map-elt hierarchy section)))) + (let* ((vars (seq-mapcat #'cider-cheatsheet--expand-vars hierarchy)) + (var (completing-read "Select var: " vars))) + (cider-doc-lookup var)))) (cl-defun cider-cheatsheet--insert-hierarchy (hierarchy &optional (level 0)) "Insert HIERARCHY with visual indentation for LEVEL." From 5964bd30d9a18144333e9c437879755aa029ce61 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Wed, 29 May 2024 11:43:27 +0000 Subject: [PATCH 121/212] Add an alternative way to display `cider-cheatsheet-select` (#3686) Instead of having the multi-step selection process, which is the default cider-cheatsheet-select behavior, we represent each candidate as a full path to a var when cider-cheatsheet-select is called with a prefix argument. This can be handy with fuzzy completion style and vertical candidates display. --- CHANGELOG.md | 1 + cider-cheatsheet.el | 40 +++++++++++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1154d5178..97c8e10e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [#3681](https://github.com/clojure-emacs/cider/pull/3681): Add an alternative way to display cheatsheet in a buffer and make it the default. - Current `cider-cheatsheet` command is renamed to `cider-cheatsheet-select`. - New way to display cheatsheet in a buffer is available with `cider-cheatsheet` command. +- [#3686](https://github.com/clojure-emacs/cider/pull/3686): Add an alternative way to display `cider-cheatsheet-select` when called with a prefix argument. - [#3632](https://github.com/clojure-emacs/cider/pull/3623): Add new configuration variable `cider-clojure-cli-global-aliases`. - [#3366](https://github.com/clojure-emacs/cider/pull/3366): Support display of error overlays with `#dbg!` and `#break!` reader macros. - [#3622](https://github.com/clojure-emacs/cider/pull/3461): Basic support for using CIDER from [clojure-ts-mode](https://github.com/clojure-emacs/clojure-ts-mode). diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 86fc745b9..6ab38fc60 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -32,6 +32,7 @@ (require 'cl-lib) (require 'map) (require 'seq) +(require 'subr-x) (defconst cider-cheatsheet-hierarchy '(("Documentation" @@ -549,18 +550,35 @@ This list is supposed to have the following format: (mapcar #'symbol-name vars) (mapcar (lambda (var) (format "%s/%s" ns var)) vars)))) +(defun cider-cheatsheet--flatten-hierarchy (hierarchy &optional sections) + "Transform HIERARCHY to lists each representing a path with SECTIONS before var." + (seq-mapcat (lambda (node) + (if (stringp (car node)) + (cider-cheatsheet--flatten-hierarchy (cdr node) (cons (car node) sections)) + (mapcar (lambda (var) (reverse (cons var sections))) + (cider-cheatsheet--expand-vars node)))) + hierarchy)) + ;;;###autoload -(defun cider-cheatsheet-select () - "Navigate cheatsheet sections and show documentation for selected var." - (interactive) - (let ((hierarchy cider-cheatsheet-hierarchy)) - (while (stringp (caar hierarchy)) - (let* ((sections (mapcar #'car hierarchy)) - (section (completing-read "Select section: " sections))) - (setq hierarchy (map-elt hierarchy section)))) - (let* ((vars (seq-mapcat #'cider-cheatsheet--expand-vars hierarchy)) - (var (completing-read "Select var: " vars))) - (cider-doc-lookup var)))) +(defun cider-cheatsheet-select (&optional flat) + "Navigate cheatsheet sections and show documentation for selected var. + +With a prefix argument FLAT, represent each candidate as a full path to var." + (interactive "P") + (if flat + (let* ((hierarchy (cider-cheatsheet--flatten-hierarchy cider-cheatsheet-hierarchy)) + (paths (mapcar (lambda (sections) (string-join sections " > ")) hierarchy)) + (path (completing-read "Select path: " paths)) + (var (car (last (split-string path " > "))))) + (cider-doc-lookup var)) + (let ((hierarchy cider-cheatsheet-hierarchy)) + (while (stringp (caar hierarchy)) + (let* ((sections (mapcar #'car hierarchy)) + (section (completing-read "Select section: " sections))) + (setq hierarchy (map-elt hierarchy section)))) + (let* ((vars (seq-mapcat #'cider-cheatsheet--expand-vars hierarchy)) + (var (completing-read "Select var: " vars))) + (cider-doc-lookup var))))) (cl-defun cider-cheatsheet--insert-hierarchy (hierarchy &optional (level 0)) "Insert HIERARCHY with visual indentation for LEVEL." From 61fad04bcdb23ae9c94bf3c788f9460456a1cf21 Mon Sep 17 00:00:00 2001 From: ikappaki Date: Sat, 25 May 2024 23:36:11 +0100 Subject: [PATCH 122/212] jack-in support for the Basilisp Clojure dialect in Python --- .github/workflows/test.yml | 6 ++ CHANGELOG.md | 2 + cider.el | 46 +++++++- .../ROOT/pages/basics/up_and_running.adoc | 1 + .../ROOT/pages/platforms/basilisp.adoc | 102 ++++++++++++++++++ .../ROOT/pages/platforms/overview.adoc | 1 + test/integration/integration-tests.el | 73 ++++++++++++- 7 files changed, 224 insertions(+), 7 deletions(-) create mode 100644 doc/modules/ROOT/pages/platforms/basilisp.adoc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f54d4caa4..749b9e81d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -100,6 +100,12 @@ jobs: - run: npm install shadow-cljs@2.20.13 -g - run: npm install nbb@1.1.152 -g + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - run: | + pip install basilisp==0.1.0b1 + - name: Test integration run: | # The tests occasionally fail on macos&win in what is seems to diff --git a/CHANGELOG.md b/CHANGELOG.md index 97c8e10e4..771536483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ - adds `cider-ns-code-reload-tool` defcustom, defaulting to `'tools.namespace`. - you can change it to `'clj-reload` to use [clj-reload](https://github.com/tonsky/clj-reload) instead of [tools.namespace](https://github.com/clojure/tools.namespace). +- [#3682](https://github.com/clojure-emacs/cider/issues/3682): Add `cider-jack-in` support for [Basilisp](https://github.com/basilisp-lang/basilisp) (Python) + ### Changes - [#3626](https://github.com/clojure-emacs/cider/issues/3626): `cider-ns-refresh`: jump to the relevant file/line on errors. diff --git a/cider.el b/cider.el index c54863e6e..c53388083 100644 --- a/cider.el +++ b/cider.el @@ -12,7 +12,7 @@ ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider ;; Version: 1.14.0-snapshot -;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) +;; Package-Requires: ((emacs "26") (clojure-mode "5.19") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider ;; This program is free software: you can redistribute it and/or modify @@ -273,6 +273,30 @@ By default we favor the project-specific shadow-cljs over the system-wide." :safe #'stringp :package-version '(cider . "1.6.0")) +(defcustom cider-basilisp-command + "basilisp" + "The command used to execute Basilisp. + + If Basilisp is installed in a virtual environment, update this to the + full path of the Basilisp executable within that virtual environment." + :type 'string + :safe #'stringp + :package-version '(cider . "1.14.0")) + +(defcustom cider-basilisp-global-options + nil + "Command line options used to execute Basilisp." + :type 'string + :safe #'stringp + :package-version '(cider . "1.14.0")) + +(defcustom cider-basilisp-parameters + "nrepl-server" + "Params passed to Basilisp to start an nREPL server via `cider-jack-in'." + :type 'string + :safe #'stringp + :package-version '(cider . "1.14.0")) + (make-obsolete-variable 'cider-lein-global-options 'cider-lein-parameters "1.8.0") (make-obsolete-variable 'cider-boot-global-options 'cider-boot-parameters "1.8.0") (make-obsolete-variable 'cider-clojure-cli-global-options 'cider-clojure-cli-parameters "1.8.0") @@ -280,6 +304,7 @@ By default we favor the project-specific shadow-cljs over the system-wide." (make-obsolete-variable 'cider-gradle-global-options 'cider-gradle-parameters "1.8.0") (make-obsolete-variable 'cider-babashka-global-options 'cider-babashka-parameters "1.8.0") (make-obsolete-variable 'cider-nbb-global-options 'cider-nbb-parameters "1.8.0") +(make-obsolete-variable 'cider-basilip-global-options 'cider-basilisp-parameters "1.8.0") (defcustom cider-jack-in-default (if (executable-find "clojure") 'clojure-cli 'lein) @@ -296,7 +321,8 @@ to Leiningen." (const shadow-cljs) (const gradle) (const babashka) - (const nbb)) + (const nbb) + (const basilisp)) :safe #'symbolp :package-version '(cider . "0.9.0")) @@ -316,6 +342,7 @@ command when there is no ambiguity." (const gradle) (const babashka) (const nbb) + (const basilisp) (const :tag "Always ask" nil)) :safe #'symbolp :package-version '(cider . "0.13.0")) @@ -380,7 +407,8 @@ Sub-match 1 must be the project path.") '((clojure-cli (:prefix-arg 1 :cmd (:jack-in-type clj :project-type clojure-cli :edit-project-dir t))) (lein (:prefix-arg 2 :cmd (:jack-in-type clj :project-type lein :edit-project-dir t))) (babashka (:prefix-arg 3 :cmd (:jack-in-type clj :project-type babashka :edit-project-dir t))) - (nbb (:prefix-arg 4 :cmd (:jack-in-type cljs :project-type nbb :cljs-repl-type nbb :edit-project-dir t)))) + (nbb (:prefix-arg 4 :cmd (:jack-in-type cljs :project-type nbb :cljs-repl-type nbb :edit-project-dir t))) + (basilisp (:prefix-arg 5 :cmd (:jack-in-type clj :project-type basilisp :edit-project-dir t)))) "The list of project tools that are supported by the universal jack in command. Each item in the list consists of the tool name and its plist options. @@ -412,6 +440,7 @@ The plist supports the following keys ('shadow-cljs cider-shadow-cljs-command) ('gradle cider-gradle-command) ('nbb cider-nbb-command) + ('basilisp cider-basilisp-command) (_ (user-error "Unsupported project type `%S'" project-type)))) (defcustom cider-enrich-classpath nil @@ -476,6 +505,7 @@ Throws an error if PROJECT-TYPE is unknown." ;; relative path like "./gradlew" use locate file instead of checking ;; the exec-path ('gradle (cider--resolve-project-command cider-gradle-command)) + ('basilisp (cider--resolve-command cider-basilisp-command)) (_ (user-error "Unsupported project type `%S'" project-type)))) (defun cider-jack-in-global-options (project-type) @@ -488,6 +518,7 @@ Throws an error if PROJECT-TYPE is unknown." ('shadow-cljs cider-shadow-cljs-global-options) ('gradle cider-gradle-global-options) ('nbb cider-nbb-global-options) + ('basilisp cider-basilisp-global-options) (_ (user-error "Unsupported project type `%S'" project-type)))) (defun cider-jack-in-params (project-type) @@ -504,6 +535,7 @@ Throws an error if PROJECT-TYPE is unknown." ('shadow-cljs cider-shadow-cljs-parameters) ('gradle cider-gradle-parameters) ('nbb cider-nbb-parameters) + ('basilisp cider-basilisp-parameters) (_ (user-error "Unsupported project type `%S'" project-type)))) @@ -963,6 +995,10 @@ middleware and dependencies." global-opts (unless (seq-empty-p global-opts) " ") params)) + ('basilisp (concat + global-opts + (unless (seq-empty-p global-opts) " ") + params)) (_ (error "Unsupported project type `%S'" project-type)))) @@ -1245,6 +1281,7 @@ you're working on." (const :tag "Shadow w/o Server" shadow-select) (const :tag "Krell" krell) (const :tag "Nbb" nbb) + (const :tag "Basilisp" basilisp) (const :tag "Custom" custom)) :safe #'symbolp :package-version '(cider . "0.17.0")) @@ -2038,7 +2075,8 @@ PROJECT-DIR defaults to current project." (shadow-cljs . "shadow-cljs.edn") (gradle . "build.gradle") (gradle . "build.gradle.kts") - (nbb . "nbb.edn")))) + (nbb . "nbb.edn") + (basilisp . "basilisp.edn")))) (delq nil (mapcar (lambda (candidate) (when (file-exists-p (cdr candidate)) diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index b45a9a435..b4af70b4f 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -152,6 +152,7 @@ The following Clojure build tools are supported so far - kbd:[M-2 C-c C-x j u] jack-in using leiningen. - kbd:[M-3 C-c C-x j u] jack-in using babashka. - kbd:[M-4 C-c C-x j u] jack-in using nbb. +- kbd:[M-5 C-c C-x j u] jack-in using basilisp. Here is an example of how to bind kbd:[F12] for quickly bringing up a babashka REPL: diff --git a/doc/modules/ROOT/pages/platforms/basilisp.adoc b/doc/modules/ROOT/pages/platforms/basilisp.adoc new file mode 100644 index 000000000..03e0685d2 --- /dev/null +++ b/doc/modules/ROOT/pages/platforms/basilisp.adoc @@ -0,0 +1,102 @@ += Basilisp Integration with CIDER +https://github.com/basilisp-lang/basilisp[basilisp] + +== Overview + +Basilisp aims to enable writing Clojure programs on Python with full Python interoperability. It is highly compatible with Clojure. + +To install Basilisp, run: + + $ pip install basilisp + +== Usage + +There are several ways to connect to Basilisp. + +* kbd:[M-x cider-jack-in] and kbd:[M-5 M-x cider-jack-in-universal] + +If you have created a `basilisp.edn` project file at your root of your project tree, you can jack in to the project `M-x cider-jack-in`. The `basilisp.edn` is similar to `deps.edn` for clojure-cli projects. It can be left empty just to mark the root of your project. + +If you don't have or want a basilisp project file, you can use universal jack in with a numerical argument of 5: + +- kbd:[M-5 M-x cider-jack-in-universal], or +- kbd:[M-5 C-c C-x j u], from within file in clojure-mode + +(Note: an alternative to kbd:[M-5] is kbd:[C-u 5]) + +You can also bind the universal jack-in to Basilisp to a function to use as a shortcut, for example + +[source,lisp] +---- +(global-set-key (kbd "") (lambda () + (interactive) + (cider-jack-in-universal 5))) +---- + +* kbd:[M-x cider-connect] + +You can start its bundled nREPL server: + + $ basilisp nrepl-server + +and connect to it afterward using `M-x cider-connect`. + +To see available options, type `basilisp nrepl-server -h` in a shell prompt. + +== Configuration + +The jack-in command can be configured via several defcustoms: + +* `cider-basilisp-command` (default is `basilisp`). + +If Basilisp is installed in a virtual environment, update this to the full path of the `basilisp` executable within that virtual environment. + +* `cider-basilisp-parameters` (default is `nrepl-server`). + +There at few ways to setup (custom) variables in Emacs + +- https://www.gnu.org/software/emacs/manual/html_node/emacs/Easy-Customization.html[Examining and Setting Variables] + +kbd:[C-h v cider-basilisp-command], and +kbd:[C-h v cider-basilisp-parameters] + +- https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html[Per-Diretory Local Variables] + +Uses `.dir-locals.el` to setup per mode variables. This file is typically stored at the root of the project. + +For example, to set the path to the basilisp executable within a virtual environment + +kbd:[M-x add-dir-local-variable] +Mode or subdirectory: `clojure-mode` +Add directory-local variable: `cider-basilisp-command` +Add cider-basilisp-command with value: `"c:/dev/venvs/312/Scripts/basilisp"` + +This should result to updating or creating a `.dir-local.el` file like below + +[source,lisp] +---- +;;; Directory Local Variables -*- no-byte-compile: t -*- +;;; For more information see (info "(emacs) Directory Variables") + +((clojure-mode . ((cider-basilisp-command . "c:/dev/venvs/312/Scripts/basilisp")))) +---- + +- https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html[Specifying File Variables] + +It is best to put this in the top of your project's `basilisp.edn` file, and always jack-in from there + +For example, setting `cider-basilisp-command` to start basilisp from within a virtual environment + +kbd:[M-x add-dir-local-variable] +Add file-local variable: `cider-basilisp-command` +Add cider-basilisp-command with value: `"c:/dev/venvs/312/Scripts/basilisp"` + +This will result in the following in `basilisp.edn` + +[source,clojure] +---- +;; Local Variables: +;; cider-basilisp-command: "c:/dev/venvs/312/Scripts/basilisp" +;; End: +{} +---- diff --git a/doc/modules/ROOT/pages/platforms/overview.adoc b/doc/modules/ROOT/pages/platforms/overview.adoc index 1903cd719..f1a7c14db 100644 --- a/doc/modules/ROOT/pages/platforms/overview.adoc +++ b/doc/modules/ROOT/pages/platforms/overview.adoc @@ -30,6 +30,7 @@ Right now CIDER the supports to some extent the following: * xref:platforms/clojureclr.adoc[ClojureCLR] * Lumo (via https://github.com/djblue/nrepl-cljs) * xref:platforms/other_platforms.adoc[scittle, joyride & friends] +* xref:platforms/basilisp.adoc[Basilisp] All of them are derived from Clojure, so supporting them didn't really require much work. diff --git a/test/integration/integration-tests.el b/test/integration/integration-tests.el index e0ed66b79..91722edad 100644 --- a/test/integration/integration-tests.el +++ b/test/integration/integration-tests.el @@ -183,6 +183,73 @@ If CLI-COMMAND is nil, then use the default." (cider-itu-poll-until (not (eq (process-status nrepl-proc) 'run)) 5) (expect (member (process-status nrepl-proc) '(exit signal)))))))))) + (it "to Basilisp" + ;; temporarily suspended on MS-Windows until the following is released on PyPi + ;; + ;; https://github.com/basilisp-lang/basilisp/pull/866 + (assume (not (eq system-type 'windows-nt)) "temporarily skipping on MS-Windows ...") + (with-cider-test-sandbox + (with-temp-dir temp-dir + ;; Create a project in temp dir + (let* ((project-dir temp-dir) + (basilisp-edn (expand-file-name "basilisp.edn" project-dir))) + (write-region "" nil basilisp-edn) + + (with-temp-buffer + ;; set default directory to temp project + (setq-local default-directory project-dir) + + (let* (;; Get a gv reference so as to poll if the client has + ;; connected to the nREPL server. + (client-is-connected* (cider-itu-nrepl-client-connected-ref-make!)) + + ;; jack in and get repl buffer + (nrepl-proc (cider-jack-in-clj '())) + (nrepl-buf (process-buffer nrepl-proc))) + + ;; wait until the client successfully connects to the nREPL + ;; server. A high timeout is set because Basilisp usually needs to + ;; be compiled the first time it is run. + (cider-itu-poll-until (eq (gv-deref client-is-connected*) 'connected) 60) + + ;; give it some time to setup the clj REPL + (cider-itu-poll-until (cider-repls 'clj nil) 5) + + ;; send command to the REPL, and push stdout/stderr to + ;; corresponding eval-xxx variables. + (let ((repl-buffer (cider-current-repl)) + (eval-err '()) + (eval-out '())) + (expect repl-buffer :not :to-be nil) + + ;; send command to the REPL + (cider-interactive-eval + ;; ask REPL to return a string that uniquely identifies it. + "(print :basilisp? (some? sys/version))" + (lambda (return) + (nrepl-dbind-response + return + (out err) + (when err (push err eval-err)) + (when out (push out eval-out)))) ) + + ;; wait for a response to come back. + (cider-itu-poll-until (or eval-err eval-out) 5) + + ;; ensure there are no errors and response is as expected. + (expect eval-err :to-equal '()) + ;; The Basilisp nREPL server sends the message in three separate + ;; pieces, which is likely an area for improvement on the + ;; Basilisp side. + (expect eval-out :to-equal '("true" " " ":basilisp?")) + + ;; exit the REPL. + (cider-quit repl-buffer) + + ;; wait for the REPL to exit + (cider-itu-poll-until (not (eq (process-status nrepl-proc) 'run)) 5) + (expect (member (process-status nrepl-proc) '(exit signal)))))))))) + (it "to clojure tools cli (default)" (jack-in-clojure-cli-test nil)) @@ -190,9 +257,9 @@ If CLI-COMMAND is nil, then use the default." (it "to clojure tools cli (alternative pwsh)" (jack-in-clojure-cli-test "pwsh"))) -(when (eq system-type 'windows-nt) - (it "to clojure tools cli (alternative deps.exe)" - (jack-in-clojure-cli-test "deps.exe"))) + (when (eq system-type 'windows-nt) + (it "to clojure tools cli (alternative deps.exe)" + (jack-in-clojure-cli-test "deps.exe"))) (it "to leiningen" (with-cider-test-sandbox From b552681621f477f947bf39a3864878db8bd32e9f Mon Sep 17 00:00:00 2001 From: ikappaki Date: Mon, 27 May 2024 10:23:33 +0100 Subject: [PATCH 123/212] Address review comments (remove obsolete option) --- CHANGELOG.md | 1 - cider.el | 15 ++------------- doc/modules/ROOT/pages/platforms/basilisp.adoc | 2 ++ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 771536483..93429a3c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,6 @@ - [#3624](https://github.com/clojure-emacs/cider/pull/3624): Support new `cider.clj-reload/reload` cider-nrepl middleware. - adds `cider-ns-code-reload-tool` defcustom, defaulting to `'tools.namespace`. - you can change it to `'clj-reload` to use [clj-reload](https://github.com/tonsky/clj-reload) instead of [tools.namespace](https://github.com/clojure/tools.namespace). - - [#3682](https://github.com/clojure-emacs/cider/issues/3682): Add `cider-jack-in` support for [Basilisp](https://github.com/basilisp-lang/basilisp) (Python) ### Changes diff --git a/cider.el b/cider.el index c53388083..1498636c0 100644 --- a/cider.el +++ b/cider.el @@ -283,13 +283,6 @@ By default we favor the project-specific shadow-cljs over the system-wide." :safe #'stringp :package-version '(cider . "1.14.0")) -(defcustom cider-basilisp-global-options - nil - "Command line options used to execute Basilisp." - :type 'string - :safe #'stringp - :package-version '(cider . "1.14.0")) - (defcustom cider-basilisp-parameters "nrepl-server" "Params passed to Basilisp to start an nREPL server via `cider-jack-in'." @@ -304,7 +297,6 @@ By default we favor the project-specific shadow-cljs over the system-wide." (make-obsolete-variable 'cider-gradle-global-options 'cider-gradle-parameters "1.8.0") (make-obsolete-variable 'cider-babashka-global-options 'cider-babashka-parameters "1.8.0") (make-obsolete-variable 'cider-nbb-global-options 'cider-nbb-parameters "1.8.0") -(make-obsolete-variable 'cider-basilip-global-options 'cider-basilisp-parameters "1.8.0") (defcustom cider-jack-in-default (if (executable-find "clojure") 'clojure-cli 'lein) @@ -518,7 +510,7 @@ Throws an error if PROJECT-TYPE is unknown." ('shadow-cljs cider-shadow-cljs-global-options) ('gradle cider-gradle-global-options) ('nbb cider-nbb-global-options) - ('basilisp cider-basilisp-global-options) + ('basilisp nil) (_ (user-error "Unsupported project type `%S'" project-type)))) (defun cider-jack-in-params (project-type) @@ -995,10 +987,7 @@ middleware and dependencies." global-opts (unless (seq-empty-p global-opts) " ") params)) - ('basilisp (concat - global-opts - (unless (seq-empty-p global-opts) " ") - params)) + ('basilisp params) (_ (error "Unsupported project type `%S'" project-type)))) diff --git a/doc/modules/ROOT/pages/platforms/basilisp.adoc b/doc/modules/ROOT/pages/platforms/basilisp.adoc index 03e0685d2..4bef08daa 100644 --- a/doc/modules/ROOT/pages/platforms/basilisp.adoc +++ b/doc/modules/ROOT/pages/platforms/basilisp.adoc @@ -1,6 +1,8 @@ = Basilisp Integration with CIDER https://github.com/basilisp-lang/basilisp[basilisp] +since CIDER 1.14 + == Overview Basilisp aims to enable writing Clojure programs on Python with full Python interoperability. It is highly compatible with Clojure. From a74dff972c2f941cb562ac05251ebbf649eed4df Mon Sep 17 00:00:00 2001 From: ikappaki Date: Tue, 28 May 2024 19:17:06 +0100 Subject: [PATCH 124/212] Update to basilisp v0.1.0b1 to pick up println flush fix for CI --- .github/workflows/test.yml | 2 +- test/integration/integration-tests.el | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 749b9e81d..e48e98fa9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,7 +104,7 @@ jobs: with: python-version: '3.12' - run: | - pip install basilisp==0.1.0b1 + pip install basilisp==0.1.0b2 - name: Test integration run: | diff --git a/test/integration/integration-tests.el b/test/integration/integration-tests.el index 91722edad..1bfa2baaf 100644 --- a/test/integration/integration-tests.el +++ b/test/integration/integration-tests.el @@ -184,10 +184,6 @@ If CLI-COMMAND is nil, then use the default." (expect (member (process-status nrepl-proc) '(exit signal)))))))))) (it "to Basilisp" - ;; temporarily suspended on MS-Windows until the following is released on PyPi - ;; - ;; https://github.com/basilisp-lang/basilisp/pull/866 - (assume (not (eq system-type 'windows-nt)) "temporarily skipping on MS-Windows ...") (with-cider-test-sandbox (with-temp-dir temp-dir ;; Create a project in temp dir From 356f4e031c00461e6d40f3b8fad1b579b2e95760 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Thu, 30 May 2024 00:24:46 +0800 Subject: [PATCH 125/212] Handle negative line numbers in error messages --- cider-eval.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 2f0083e23..f9f10c4f9 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -568,8 +568,8 @@ It delegates the actual error content to the eval or op handler." " (")) (group-n 2 (minimal-match (zero-or-more anything))) ":" - (group-n 3 (one-or-more digit)) - (optional ":" (group-n 4 (one-or-more digit))) + (group-n 3 (one-or-more (any "-" digit))) ;; line numbers may be negative (#3687) + (optional ":" (group-n 4 (one-or-more (any "-" digit)))) ").")) (defconst cider-clojure-1.10-error (append `(sequence @@ -597,8 +597,8 @@ It delegates the actual error content to the eval or op handler." ", " (group-n 2 (minimal-match (zero-or-more anything))) ":" - (group-n 3 (one-or-more digit)) - (optional ":" (group-n 4 (one-or-more digit))) + (group-n 3 (one-or-more (any "-" digit))) + (optional ":" (group-n 4 (one-or-more (any "-" digit)))) " - ")) ;; Please keep this in sync with `cider-clojure-compilation-error-regexp', From a4d4c07c2ab1a37f0371655b0f835344b214a4e1 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Thu, 30 May 2024 00:43:43 +0800 Subject: [PATCH 126/212] Use rx-to-string instead of eval, minor reformat --- cider-eval.el | 128 +++++++++++++++++++++++++------------------------- 1 file changed, 65 insertions(+), 63 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index f9f10c4f9..4645b9bb0 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -562,53 +562,55 @@ It delegates the actual error content to the eval or op handler." (t (cider-default-err-eval-print-handler)))) -(defconst cider-clojure-1.10--location `((or "at (" - (sequence "at " - (minimal-match (one-or-more anything)) ;; the fully-qualified name of the function that triggered the error - " (")) - (group-n 2 (minimal-match (zero-or-more anything))) - ":" - (group-n 3 (one-or-more (any "-" digit))) ;; line numbers may be negative (#3687) - (optional ":" (group-n 4 (one-or-more (any "-" digit)))) - ").")) - -(defconst cider-clojure-1.10-error (append `(sequence - "Syntax error " - (minimal-match (zero-or-more anything)) - (or "compiling " - "macroexpanding " - "reading source ") - (minimal-match (zero-or-more anything))) - cider-clojure-1.10--location)) - -(defconst cider-clojure-unexpected-error (append `(sequence - "Unexpected error (" - (minimal-match (one-or-more anything)) - ") " - (or "compiling " - "macroexpanding " - "reading source ") - (minimal-match (one-or-more anything))) - cider-clojure-1.10--location)) - -(defconst cider-clojure-warning `(sequence - (minimal-match (zero-or-more anything)) - (group-n 1 "warning") - ", " - (group-n 2 (minimal-match (zero-or-more anything))) - ":" - (group-n 3 (one-or-more (any "-" digit))) - (optional ":" (group-n 4 (one-or-more (any "-" digit)))) - " - ")) +(defconst cider-clojure-1.10--location + '(sequence + (or "at (" + (sequence "at " + (minimal-match (one-or-more anything)) ;; the fully-qualified name of the function that triggered the error + " (")) + (group-n 2 (minimal-match (zero-or-more anything))) ; source file + ":" (group-n 3 (one-or-more (any "-" digit))) ; line number, may be negative (#3687) + (optional + ":" (group-n 4 (one-or-more (any "-" digit)))) ; column number + ").")) + +(defconst cider-clojure-1.10-error + `(sequence + "Syntax error " + (minimal-match (zero-or-more anything)) + (or "compiling " + "macroexpanding " + "reading source ") + (minimal-match (zero-or-more anything)) + ,cider-clojure-1.10--location)) + +(defconst cider-clojure-unexpected-error + `(sequence + "Unexpected error (" (minimal-match (one-or-more anything)) ") " + (or "compiling " + "macroexpanding " + "reading source ") + (minimal-match (one-or-more anything)) + ,cider-clojure-1.10--location)) + +(defconst cider-clojure-warning + `(sequence + (minimal-match (zero-or-more anything)) + (group-n 1 "warning") + ", " (group-n 2 (minimal-match (zero-or-more anything))) + ":" (group-n 3 (one-or-more (any "-" digit))) + (optional + ":" (group-n 4 (one-or-more (any "-" digit)))) + " - ")) ;; Please keep this in sync with `cider-clojure-compilation-error-regexp', ;; which is a subset of these regexes. (defconst cider-clojure-compilation-regexp - (eval - `(rx bol (or ,cider-clojure-warning - ,cider-clojure-1.10-error - ,cider-clojure-unexpected-error)) - t) + (rx-to-string + `(seq bol (or ,cider-clojure-warning + ,cider-clojure-1.10-error + ,cider-clojure-unexpected-error)) + 'nogroup) "A few example values that will match: \"Reflection warning, /tmp/foo/src/foo/core.clj:14:1 - \" \"CompilerException java.lang.RuntimeException: Unable to resolve symbol: \\ @@ -617,10 +619,10 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" \"Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\"") (defconst cider-clojure-compilation-error-regexp - (eval - `(rx bol (or ,cider-clojure-1.10-error - ,cider-clojure-unexpected-error)) - t) + (rx-to-string + `(seq bol (or ,cider-clojure-1.10-error + ,cider-clojure-unexpected-error)) + 'nogroup) "Like `cider-clojure-compilation-regexp', but excluding warnings such as reflection warnings. @@ -631,26 +633,26 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" \"Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\"") (defconst cider--clojure-execution-error-regexp - (append `(sequence - "Execution error " - (or (sequence "(" - (minimal-match (one-or-more anything)) - ")") - (minimal-match (zero-or-more anything)))) - cider-clojure-1.10--location)) + `(sequence + "Execution error " + (or (sequence "(" + (minimal-match (one-or-more anything)) + ")") + (minimal-match (zero-or-more anything))) + ,cider-clojure-1.10--location)) (defconst cider--clojure-spec-execution-error-regexp - (append `(sequence - "Execution error - invalid arguments to " - (minimal-match (one-or-more anything)) - " ") - cider-clojure-1.10--location)) + `(sequence + "Execution error - invalid arguments to " + (minimal-match (one-or-more anything)) + " " + ,cider-clojure-1.10--location)) (defconst cider-clojure-runtime-error-regexp - (eval - `(rx bol (or ,cider--clojure-execution-error-regexp - ,cider--clojure-spec-execution-error-regexp)) - t) + (rx-to-string + `(seq bol (or ,cider--clojure-execution-error-regexp + ,cider--clojure-spec-execution-error-regexp)) + 'nogroup) "Matches runtime errors, as oppsed to compile-time/macroexpansion-time errors. A few example values that will match: From 58ce929662d36a179a1ff910637d41646c26e762 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Thu, 30 May 2024 00:44:34 +0800 Subject: [PATCH 127/212] Document semantics of match group numbering --- cider-eval.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 4645b9bb0..31597a6a6 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -561,7 +561,7 @@ It delegates the actual error content to the eval or op handler." (cider-default-err-eval-handler)) (t (cider-default-err-eval-print-handler)))) - +;; See `cider-compilation-regexp' for interpretation of match groups. (defconst cider-clojure-1.10--location '(sequence (or "at (" @@ -676,7 +676,11 @@ A few example values that will match: ")")) (defvar cider-compilation-regexp - (list cider-clojure-compilation-regexp 2 3 4 '(1)) + (list cider-clojure-compilation-regexp + 2 ; FILE + 3 ; LINE + 4 ; COLUMN + '(1)) ; TYPE = (WARNING . INFO) "Specifications for matching errors and warnings in Clojure stacktraces. See `compilation-error-regexp-alist' for help on their format.") From 1378a72b3b9de7d6d11e5a54dc327f83a53b404b Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Thu, 30 May 2024 00:52:00 +0800 Subject: [PATCH 128/212] Refactor an rx form --- cider-eval.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 31597a6a6..366207a1b 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -564,10 +564,8 @@ It delegates the actual error content to the eval or op handler." ;; See `cider-compilation-regexp' for interpretation of match groups. (defconst cider-clojure-1.10--location '(sequence - (or "at (" - (sequence "at " - (minimal-match (one-or-more anything)) ;; the fully-qualified name of the function that triggered the error - " (")) + "at " (minimal-match (zero-or-more anything)) ;; the fully-qualified name of the function that triggered the error + "(" (group-n 2 (minimal-match (zero-or-more anything))) ; source file ":" (group-n 3 (one-or-more (any "-" digit))) ; line number, may be negative (#3687) (optional From de162d58c4fc452ea04cd0aef33593783980fef4 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Thu, 30 May 2024 00:53:11 +0800 Subject: [PATCH 129/212] Redundant rx or clause (second clause always matches) --- cider-eval.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 366207a1b..16608ca43 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -633,10 +633,7 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" (defconst cider--clojure-execution-error-regexp `(sequence "Execution error " - (or (sequence "(" - (minimal-match (one-or-more anything)) - ")") - (minimal-match (zero-or-more anything))) + (minimal-match (zero-or-more anything)) ,cider-clojure-1.10--location)) (defconst cider--clojure-spec-execution-error-regexp From 22c773168e928299c66bee3340f1c52be4451bc6 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Thu, 30 May 2024 01:04:42 +0800 Subject: [PATCH 130/212] Add test --- test/cider-error-parsing-tests.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/cider-error-parsing-tests.el b/test/cider-error-parsing-tests.el index 4a887ac47..8c01cd2c2 100644 --- a/test/cider-error-parsing-tests.el +++ b/test/cider-error-parsing-tests.el @@ -178,7 +178,16 @@ (expect (progn (string-match cider-clojure-runtime-error-regexp specimen) (match-string 2 specimen)) - :to-equal "src/haystack/parser.cljc")))) + :to-equal "src/haystack/parser.cljc"))) + + ;; Java source locations may be negative (#3687) + (it "Recognizes an error thrown from a java source file" + (let ((specimen "Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).")) + (expect specimen :to-match cider-clojure-runtime-error-regexp) + (expect (progn + (string-match cider-clojure-runtime-error-regexp specimen) + (match-string 2 specimen)) + :to-equal "FileInputStream.java")))) (describe "cider-module-info-regexp" (it "Matches module info provided by Java" From 348dc156d87cc75719ffa4a19c6ae67909f265da Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Thu, 30 May 2024 01:19:08 +0800 Subject: [PATCH 131/212] Add link to clojure source reference --- cider-eval.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cider-eval.el b/cider-eval.el index 16608ca43..bb88106aa 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -561,6 +561,8 @@ It delegates the actual error content to the eval or op handler." (cider-default-err-eval-handler)) (t (cider-default-err-eval-print-handler)))) +;; Reference: +;; https://github.com/clojure/clojure/blob/clojure-1.10.0/src/clj/clojure/main.clj#L251 ;; See `cider-compilation-regexp' for interpretation of match groups. (defconst cider-clojure-1.10--location '(sequence From 605d409d882e3576f9847fafa06bbe2ee6053086 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Thu, 30 May 2024 12:52:31 +0000 Subject: [PATCH 132/212] Show error message if symbol is not found on ClojureDocs (#3689) --- CHANGELOG.md | 1 + cider-clojuredocs.el | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93429a3c7..12cbff8c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ ### Bugs fixed +- [#3689](https://github.com/clojure-emacs/cider/pull/3689): Fix `cider-clojuredocs-lookup` to show friendly error message if symbol is not found on ClojureDocs. - [#3673](https://github.com/clojure-emacs/cider/pull/3673): Fix buggy `special-display-buffer-names` check. - [#3659](https://github.com/clojure-emacs/cider/pull/3659): Fixes completions when using `flex`-like completion styles. - [#3600](https://github.com/clojure-emacs/cider/pull/3600): Fix scittle jack-in when using `cider-jack-in-clj`. diff --git a/cider-clojuredocs.el b/cider-clojuredocs.el index 1c7af97c4..50e7620a7 100644 --- a/cider-clojuredocs.el +++ b/cider-clojuredocs.el @@ -144,14 +144,16 @@ opposite of what that option dictates." (defun cider-clojuredocs-lookup (sym) "Look up the ClojureDocs documentation for SYM." - (let ((docs (cider-sync-request:clojuredocs-lookup (cider-current-ns) sym))) - (pop-to-buffer (cider-create-clojuredocs-buffer (cider-clojuredocs--content docs))) - ;; highlight the symbol in question in the docs buffer - (highlight-regexp - (regexp-quote - (or (cadr (split-string sym "/")) - sym)) - 'bold))) + (if-let ((docs (cider-sync-request:clojuredocs-lookup (cider-current-ns) sym))) + (progn + (pop-to-buffer (cider-create-clojuredocs-buffer (cider-clojuredocs--content docs))) + ;; highlight the symbol in question in the docs buffer + (highlight-regexp + (regexp-quote + (or (cadr (split-string sym "/")) + sym)) + 'bold)) + (user-error "ClojureDocs documentation for %s is not found" sym))) ;;;###autoload (defun cider-clojuredocs (&optional arg) From c3acf55af0a8c03a2a050f66b328bba8d2402574 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 30 May 2024 15:09:10 +0200 Subject: [PATCH 133/212] Release CIDER 1.14 ("Verona") --- CHANGELOG.md | 2 ++ cider.el | 6 +++--- doc/antora.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12cbff8c0..94248e054 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master (unreleased) +## 1.14.0 (2024-05-30) + ### New features - [#3681](https://github.com/clojure-emacs/cider/pull/3681): Add an alternative way to display cheatsheet in a buffer and make it the default. diff --git a/cider.el b/cider.el index 1498636c0..6d3104b84 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.14.0-snapshot +;; Version: 1.14.0 ;; Package-Requires: ((emacs "26") (clojure-mode "5.19") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,10 +93,10 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.14.0-snapshot" +(defconst cider-version "1.14.0" "The current version of CIDER.") -(defconst cider-codename "Cogne" +(defconst cider-codename "Verona" "Codename used to denote stable releases.") (defcustom cider-lein-command diff --git a/doc/antora.yml b/doc/antora.yml index fd9dacd59..c8c510c31 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: ~ +version: 1.14 nav: - modules/ROOT/nav.adoc From ea605dedc6d3a237d888b8df8a30ceca7aa42e11 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 30 May 2024 15:09:51 +0200 Subject: [PATCH 134/212] Reset the docs version --- doc/antora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/antora.yml b/doc/antora.yml index c8c510c31..fd9dacd59 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: 1.14 +version: ~ nav: - modules/ROOT/nav.adoc From cd4fe5d468097ef44c5130c3f4cec9d0e3c02799 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 30 May 2024 17:01:51 +0200 Subject: [PATCH 135/212] Bump the dev version --- cider.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cider.el b/cider.el index 6d3104b84..ba7013f9e 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.14.0 +;; Version: 1.15.0-snapshot ;; Package-Requires: ((emacs "26") (clojure-mode "5.19") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.14.0" +(defconst cider-version "1.15.0-snapshot" "The current version of CIDER.") (defconst cider-codename "Verona" From ee6626468cafb1ff34b48286b8ef9a1a7ceeb388 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 31 May 2024 06:22:24 +0200 Subject: [PATCH 136/212] Tweak a changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94248e054..92d27deff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ - [#3624](https://github.com/clojure-emacs/cider/pull/3624): Support new `cider.clj-reload/reload` cider-nrepl middleware. - adds `cider-ns-code-reload-tool` defcustom, defaulting to `'tools.namespace`. - you can change it to `'clj-reload` to use [clj-reload](https://github.com/tonsky/clj-reload) instead of [tools.namespace](https://github.com/clojure/tools.namespace). -- [#3682](https://github.com/clojure-emacs/cider/issues/3682): Add `cider-jack-in` support for [Basilisp](https://github.com/basilisp-lang/basilisp) (Python) +- [#3682](https://github.com/clojure-emacs/cider/issues/3682): Add `cider-jack-in` support for [Basilisp](https://github.com/basilisp-lang/basilisp) (Python). ### Changes From 6646778bccedcbb1f96bdf36b0a08bd208a4c25a Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 31 May 2024 06:26:22 +0200 Subject: [PATCH 137/212] Add the standard changelog sections for the snapshot --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92d27deff..acce10fb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## master (unreleased) +### New features + +### Changes + +### Bugs fixed + ## 1.14.0 (2024-05-30) ### New features From d430ab314f7f59cf88e19fe4629bb46a1108ddbb Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Sun, 2 Jun 2024 10:27:01 +0300 Subject: [PATCH 138/212] [complete] Prioritize flex style if flex style is requested --- CHANGELOG.md | 2 ++ cider-completion.el | 2 +- test/cider-completion-tests.el | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acce10fb3..54ef88a46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ### Bugs fixed +- [#3696](https://github.com/clojure-emacs/cider/pull/3696): Don't eagerly complete a candidate if there are other candidates matching `flex` style. + ## 1.14.0 (2024-05-30) ### New features diff --git a/cider-completion.el b/cider-completion.el index bd23c3859..a2a91ae57 100644 --- a/cider-completion.el +++ b/cider-completion.el @@ -297,7 +297,7 @@ Only affects the `cider' completion category.`" (unless found-styles (setq found-styles '(styles basic))) (unless (member 'flex found-styles) - (setq found-styles (append found-styles '(flex)))) + (setq found-styles (apply #'list 'styles 'flex (cdr found-styles)))) (add-to-list 'completion-category-overrides (apply #'list 'cider found-styles (when found-cycle (list found-cycle)))))) diff --git a/test/cider-completion-tests.el b/test/cider-completion-tests.el index e80f4253a..a8f58f798 100644 --- a/test/cider-completion-tests.el +++ b/test/cider-completion-tests.el @@ -37,7 +37,7 @@ (unwind-protect (progn (it "adds `flex' and `basic' as a fallback" - (let ((expected-category-overrides '((cider (styles basic flex))))) + (let ((expected-category-overrides '((cider (styles flex basic))))) (cider-enable-flex-completion) (expect (member 'flex (assq 'styles (assq 'cider completion-category-overrides))) :to-be-truthy) From 49496142e36db47b1abedf2cf087a24382b8cdde Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Sun, 2 Jun 2024 14:55:23 +0300 Subject: [PATCH 139/212] [complete] Add a comment about flex style priority --- cider-completion.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cider-completion.el b/cider-completion.el index a2a91ae57..8e9271454 100644 --- a/cider-completion.el +++ b/cider-completion.el @@ -297,6 +297,8 @@ Only affects the `cider' completion category.`" (unless found-styles (setq found-styles '(styles basic))) (unless (member 'flex found-styles) + ;; This expression makes sure that 'flex style has a priority over other + ;; styles, see https://github.com/clojure-emacs/cider/pull/3696. (setq found-styles (apply #'list 'styles 'flex (cdr found-styles)))) (add-to-list 'completion-category-overrides (apply #'list 'cider found-styles (when found-cycle (list found-cycle)))))) From b842f0df07d01b63cf5fe124f3f847da6bfa7d26 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Sun, 2 Jun 2024 10:14:27 +0300 Subject: [PATCH 140/212] Use cider-nrepl 0.49.0 --- CHANGELOG.md | 6 +-- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 4 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54ef88a46..766c8b4d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Changes +- Bump the injected `cider-nrepl` to [0.49.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0490-2024-06-02). + ### Bugs fixed - [#3696](https://github.com/clojure-emacs/cider/pull/3696): Don't eagerly complete a candidate if there are other candidates matching `flex` style. @@ -27,6 +29,7 @@ - adds `cider-ns-code-reload-tool` defcustom, defaulting to `'tools.namespace`. - you can change it to `'clj-reload` to use [clj-reload](https://github.com/tonsky/clj-reload) instead of [tools.namespace](https://github.com/clojure/tools.namespace). - [#3682](https://github.com/clojure-emacs/cider/issues/3682): Add `cider-jack-in` support for [Basilisp](https://github.com/basilisp-lang/basilisp) (Python). +- [#3664](https://github.com/clojure-emacs/cider/issues/3664): Add customization inspector op to change max nested collection depth. ### Changes @@ -34,11 +37,8 @@ - [#3628](https://github.com/clojure-emacs/cider/issues/3628): `cider-ns-refresh`: summarize errors as an overlay. - [#3660](https://github.com/clojure-emacs/cider/issues/3660): Fix `cider-inspector-def-current-val` always defining in `user` namespace. - [#3661](https://github.com/clojure-emacs/cider/issues/3661): Truncate echo area output ahead of time. -- [#3664](https://github.com/clojure-emacs/cider/issues/3664): Add customization inspector op to change max nested collection depth. - Bump the injected `enrich-classpath` to [1.19.3](https://github.com/clojure-emacs/enrich-classpath/compare/v1.19.0...v1.19.3). - Bump the injected nREPL to [1.1.2](https://github.com/nrepl/nrepl/releases/tag/v1.1.2). -- Bump the injected `cider-nrepl` to [0.48.0](https://github.com/clojure-emacs/cider-nrepl/blob/v0.48.0/CHANGELOG.md#0480-2024-05-13). - - Updates [Orchard](https://github.com/clojure-emacs/orchard/blob/v0.23.2/CHANGELOG.md#0232-2024-03-10). - Bump the injected `cider-nrepl` to [0.48.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0480-2024-05-13). - Updates [clj-reload](https://github.com/tonsky/clj-reload/blob/0.6.0/CHANGELOG.md#060---may-3-2024). - Updates [tools.reader](https://github.com/clojure/tools.reader/blob/master/CHANGELOG.md). diff --git a/cider.el b/cider.el index ba7013f9e..67e83bd5e 100644 --- a/cider.el +++ b/cider.el @@ -567,7 +567,7 @@ the artifact.") Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.") -(defconst cider-required-middleware-version "0.48.0" +(defconst cider-required-middleware-version "0.49.0" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index 1d5ff61d8..01dc35412 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.48.0"]]) + :plugins [[cider/cider-nrepl "0.49.0"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index bc337231c..edf9464f5 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.48.0"] + :plugins [[cider/cider-nrepl "0.49.0"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 5c46dad8c..1898d017a 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.48.0"]] +:plugins [[cider/cider-nrepl "0.49.0"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.48.0"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.49.0"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.48.0"]]) + concat '[[cider/cider-nrepl "0.49.0"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.48.0"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.0"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.48.0"} + cider/cider-nrepl {:mvn/version "0.49.0"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.48.0' + devImplementation 'cider:cider-nrepl:0.49.0' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index b4af70b4f..baaa0d97b 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.48.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.1.2"} cider/cider-nrepl {:mvn/version "0.49.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -320,7 +320,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.48.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.49.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index a809cdc7f..b676e9883 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.48.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.49.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index b15d1c9d5..a7cdf1eca 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -60,8 +60,8 @@ or in `build.gradle`: [source, groovy] ---- dependencies { - devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.48.0' + devImplementation 'nrepl:nrepl:1.1.2' + devImplementation 'cider:cider-nrepl:0.49.0' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index 643d9c4dc..01fb01b60 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.48.0") + (setq-local cider-injected-middleware-version "0.49.0") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -154,7 +154,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -167,7 +167,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -179,7 +179,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -192,7 +192,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.48.0") + (shell-quote-argument "cider/cider-nrepl:0.49.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -201,7 +201,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.48.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -218,7 +218,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -231,7 +231,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.48.0") + (shell-quote-argument "cider/cider-nrepl:0.49.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -253,7 +253,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -264,7 +264,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.48.0") + (shell-quote-argument "cider/cider-nrepl:0.49.0") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -272,7 +272,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.48.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -287,14 +287,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.48.0")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.49.0")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.48.0"))) + :to-equal '(("cider/cider-nrepl" "0.49.0"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -323,7 +323,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.48.0") + ("cider/cider-nrepl" "0.49.0") ("mx.cider/lein-enrich-classpath" "1.19.3"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -334,7 +334,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.48.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" @@ -352,7 +352,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.48.0") + (shell-quote-argument "cider/cider-nrepl:0.49.0") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -447,7 +447,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.48.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -461,7 +461,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.48.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -478,7 +478,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.48.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -488,7 +488,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.48.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -516,7 +516,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.48.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.48.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 5f79b02fda70179349ba34a4fed1436708c669c3 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Fri, 31 May 2024 15:41:43 +0300 Subject: [PATCH 141/212] [inspector] Add function and binding for toggling view mode --- CHANGELOG.md | 2 ++ cider-inspector.el | 9 +++++++++ doc/modules/ROOT/pages/debugging/inspector.adoc | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 766c8b4d8..a31a978d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### New features +- [#3692](https://github.com/clojure-emacs/cider/pull/3692): Add ability to switch view modes in the ispector (bound to `v`). + ### Changes - Bump the injected `cider-nrepl` to [0.49.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0490-2024-06-02). diff --git a/cider-inspector.el b/cider-inspector.el index dee954011..ad0109739 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -124,6 +124,7 @@ by clicking or navigating to them by other means." (define-key map "a" #'cider-inspector-set-max-atom-length) (define-key map "c" #'cider-inspector-set-max-coll-size) (define-key map "C" #'cider-inspector-set-max-nested-depth) + (define-key map "v" #'cider-inspector-toggle-view-mode) (define-key map "d" #'cider-inspector-def-current-val) (define-key map "t" #'cider-inspector-tap-current-val) (define-key map "1" #'cider-inspector-tap-at-point) @@ -353,6 +354,14 @@ MAX-NESTED-DEPTH is the new value." (when (nrepl-dict-get result "value") (cider-inspector--render-value result 'v2)))) +(defun cider-inspector-toggle-view-mode () + "Toggle the view mode of the inspector between normal and object view mode." + (interactive) + (let ((result (cider-nrepl-send-sync-request `("op" "inspect-toggle-view-mode") + cider-inspector--current-repl))) + (when (nrepl-dict-get result "value") + (cider-inspector--render-value result 'v2)))) + (defcustom cider-inspector-preferred-var-names nil "The preferred var names to be suggested by `cider-inspector-def-current-val'. diff --git a/doc/modules/ROOT/pages/debugging/inspector.adoc b/doc/modules/ROOT/pages/debugging/inspector.adoc index fc82481dc..72bc376e1 100644 --- a/doc/modules/ROOT/pages/debugging/inspector.adoc +++ b/doc/modules/ROOT/pages/debugging/inspector.adoc @@ -76,6 +76,10 @@ You'll have access to additional keybindings in the inspector buffer | `cider-inspector-set-max-atom-length` | Set a new maximum length above which nested atoms (non-collections) are truncated +| kbd:[v] +| `cider-inspector-toggle-view-mode` +| Switch the rendering of the current value between `:normal` and `:object` view mode. In `:object` mode, any value is rendered as a plain Java object (by displaying its fields) instead of custom rendering rules that the Inspector applies in `:normal` mode. + | kbd:[d] | `cider-inspector-def-current-val` | Defines a var in the REPL namespace with current inspector value. If you tend to always choose the same name(s), you may want to set the `cider-inspector-preferred-var-names` customization option. From 19d23e002ff8a93837233987954cc1815774d689 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 3 Jun 2024 07:41:05 +0300 Subject: [PATCH 142/212] [inspector] Use inspect-refresh op for dynamic configuration updates (#3691) --- CHANGELOG.md | 1 + cider-inspector.el | 32 +++++++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a31a978d1..ce3fbe2d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Changes +- [#3691](https://github.com/clojure-emacs/cider/pull/3691): Deprecate `cider-sync-request:inspect-set-*` functions in favor of generic `inspect-refresh` op. - Bump the injected `cider-nrepl` to [0.49.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0490-2024-06-02). ### Bugs fixed diff --git a/cider-inspector.el b/cider-inspector.el index ad0109739..79a21efcd 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -294,13 +294,19 @@ See `cider-sync-request:inspect-next-sibling' and `cider-inspector--render-value (cider-inspector--render-value result 'v2) (cider-inspector-next-inspectable-object 1)))) +(defun cider-inspector--refresh-with-opts (&rest opts) + "Invokes `inspect-refresh' op with supplied extra OPTS. +Re-renders the currently inspected value." + (let ((result (cider-nrepl-send-sync-request `("op" "inspect-refresh" ,@opts) + cider-inspector--current-repl))) + (when (nrepl-dict-get result "value") + (cider-inspector--render-value result 'v2)))) + (defun cider-inspector-refresh () "Re-render the currently inspected value. See `cider-sync-request:inspect-refresh' and `cider-inspector--render-value'" (interactive) - (let ((result (cider-sync-request:inspect-refresh 'v2))) - (when (nrepl-dict-get result "value") - (cider-inspector--render-value result 'v2)))) + (cider-inspector--refresh-with-opts)) (defun cider-inspector-next-page () "Jump to the next page when inspecting a paginated sequence/map. @@ -327,32 +333,24 @@ Does nothing if already on the first page." Current page will be reset to zero." (interactive (list (read-number "Page size: " cider-inspector-page-size))) - (let ((result (cider-sync-request:inspect-set-page-size page-size 'v2))) - (when (nrepl-dict-get result "value") - (cider-inspector--render-value result 'v2)))) + (cider-inspector--refresh-with-opts "page-size" page-size)) (defun cider-inspector-set-max-atom-length (max-length) "Set the max length of nested atoms to MAX-LENGTH." (interactive (list (read-number "Max atom length: " cider-inspector-max-atom-length))) - (let ((result (cider-sync-request:inspect-set-max-atom-length max-length 'v2))) - (when (nrepl-dict-get result "value") - (cider-inspector--render-value result 'v2)))) + (cider-inspector--refresh-with-opts "max-atom-length" max-length)) (defun cider-inspector-set-max-coll-size (max-size) "Set the number of nested collection members to display before truncating. MAX-SIZE is the new value." (interactive (list (read-number "Max collection size: " cider-inspector-max-coll-size))) - (let ((result (cider-sync-request:inspect-set-max-coll-size max-size 'v2))) - (when (nrepl-dict-get result "value") - (cider-inspector--render-value result 'v2)))) + (cider-inspector--refresh-with-opts "max-coll-size" max-size)) (defun cider-inspector-set-max-nested-depth (max-nested-depth) "Set the level of nesting for collections to display beflore truncating. MAX-NESTED-DEPTH is the new value." (interactive (list (read-number "Max nested depth: " cider-inspector-max-nested-depth))) - (let ((result (cider-sync-request:inspect-set-max-nested-depth max-nested-depth 'v2))) - (when (nrepl-dict-get result "value") - (cider-inspector--render-value result 'v2)))) + (cider-inspector--refresh-with-opts "max-nested-depth" max-nested-depth)) (defun cider-inspector-toggle-view-mode () "Toggle the view mode of the inspector between normal and object view mode." @@ -515,6 +513,7 @@ instead of just its \"value\" entry." "Set the page size in paginated view to PAGE-SIZE, V2 indicates if the entire response should be returned instead of just its \"value\" entry." + (declare (obsolete "use `inspect-refresh' op instead." "1.15.0")) (let ((result (thread-first `("op" "inspect-set-page-size" "page-size" ,page-size) (cider-nrepl-send-sync-request cider-inspector--current-repl)))) @@ -526,6 +525,7 @@ instead of just its \"value\" entry." "Set the max length of nested atoms to MAX-LENGTH, V2 indicates if the entire response should be returned instead of just its \"value\" entry." + (declare (obsolete "use `inspect-refresh' op instead." "1.15.0")) (let ((result (thread-first `("op" "inspect-set-max-atom-length" "max-atom-length" ,max-length) (cider-nrepl-send-sync-request cider-inspector--current-repl)))) @@ -537,6 +537,7 @@ instead of just its \"value\" entry." "Set the number of nested collection members to display before truncating. MAX-SIZE is the new value, V2 indicates if the entire response should be returned instead of just its \"value\" entry." + (declare (obsolete "use `inspect-refresh' op instead." "1.15.0")) (let ((result (thread-first `("op" "inspect-set-max-coll-size" "max-coll-size" ,max-size) (cider-nrepl-send-sync-request cider-inspector--current-repl)))) @@ -548,6 +549,7 @@ instead of just its \"value\" entry." "Set the level of nesting for collections to display before truncating. MAX-NESTED-DEPTH is the new value, V2 indicates if the entire response should be returned instead of just its \"value\" entry." + (declare (obsolete "use `inspect-refresh' op instead." "1.15.0")) (let ((result (thread-first `("op" "inspect-set-max-nested-depth" "max-nested-depth" ,max-nested-depth) (cider-nrepl-send-sync-request cider-inspector--current-repl)))) From 49b15275d771db3a627dfcb37ec10df45f1adbf0 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Sun, 2 Jun 2024 23:08:12 +0300 Subject: [PATCH 143/212] Support adding -Djdk.attach.allowAttachSelf to jack-in params Add `cider-enable-nrepl-jvmti-agent` customizable to control this behaviour. --- CHANGELOG.md | 1 + cider.el | 21 +++++++++---- .../ROOT/pages/basics/up_and_running.adoc | 8 +++++ .../ROOT/pages/usage/code_evaluation.adoc | 6 ++++ test/cider-tests.el | 30 ++++++++++++++----- 5 files changed, 53 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce3fbe2d3..c35c5b0de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### New features - [#3692](https://github.com/clojure-emacs/cider/pull/3692): Add ability to switch view modes in the ispector (bound to `v`). +- [#3693](https://github.com/clojure-emacs/cider/pull/3693): Add `cider-enable-nrepl-jvmti-agent` defcustom to enable loading native nREPL JVMTI agent which restores thread stop ability on Java 21+. ### Changes diff --git a/cider.el b/cider.el index 67e83bd5e..0d46f5daa 100644 --- a/cider.el +++ b/cider.el @@ -173,7 +173,6 @@ then concatenated into the \"-M[your-aliases]:cider/nrepl\" form." :safe #'stringp :package-version '(cider . "1.1")) - (defcustom cider-clojure-cli-global-aliases nil "Global aliases to include when jacking in with the clojure CLI. @@ -186,7 +185,6 @@ then concatenated into the \"-M[your-aliases]:cider/nrepl\" form." :safe #'stringp :package-version '(cider . "1.14")) - (defcustom cider-shadow-cljs-command "npx shadow-cljs" "The command used to execute shadow-cljs. @@ -376,6 +374,14 @@ The repl dependendcies are most likely to be nREPL middlewares." :safe #'booleanp :version '(cider . "0.11.0")) +(defcustom cider-enable-nrepl-jvmti-agent nil + "When t, add `-Djdk.attach.allowAttachSelf' to the command line arguments. +This allows nREPL JVMTI agent to be loaded. It is needed for evaluation +interruption to properly work on Java 21 and above." + :type 'boolean + :safe #'booleanp + :version '(cider . "1.15.0")) + (defcustom cider-offer-to-open-cljs-app-in-browser t "When nil, do not offer to open ClojureScript apps in a browser on connect." :type 'boolean @@ -536,7 +542,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.1.2" +(defcustom cider-injected-nrepl-version "1.2.0-beta2" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." @@ -762,6 +768,8 @@ group:artifact:version notation and MIDDLEWARES are prepared as arguments to Clojurephant's ClojureNRepl task." (concat global-opts (unless (seq-empty-p global-opts) " ") + (when cider-enable-nrepl-jvmti-agent + "-Pjdk.attach.allowAttachSelf ") (cider--gradle-jack-in-property (append (cider--jack-in-required-dependencies) dependencies)) " " params @@ -813,7 +821,9 @@ removed, LEIN-PLUGINS, LEIN-MIDDLEWARES and finally PARAMS." (seq-map (lambda (middleware) (concat "update-in :middleware conj " middleware)) - lein-middlewares)) + lein-middlewares) + (when cider-enable-nrepl-jvmti-agent + `(,(concat "update-in :jvm-opts conj -Djdk.attach.allowAttachSelf")))) " -- ") " -- " (if (not cider-enrich-classpath) @@ -903,9 +913,10 @@ your aliases contain any mains, the cider/nrepl one will be the one used." (deps (format "{:deps {%s} :aliases {:cider/nrepl {:main-opts [%s]}}}" (string-join all-deps " ") main-opts)) (deps-quoted (cider--shell-quote-argument deps command))) - (format "%s-Sdeps %s -M%s:cider/nrepl%s" + (format "%s%s-Sdeps %s -M%s:cider/nrepl%s" ;; TODO: global-options are deprecated and should be removed in CIDER 2.0 (if global-options (format "%s " global-options) "") + (if cider-enable-nrepl-jvmti-agent "-J-Djdk.attach.allowAttachSelf " "") deps-quoted (cider--combined-aliases) (if params (format " %s" params) "")))) diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index baaa0d97b..66b74870d 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -204,6 +204,14 @@ You can further customize the command line CIDER uses for `cider-jack-in` by modifying the some options. Those differ a bit between the various tools, so we'll examine them tool by tool. +==== Enabling nREPL JVMTI agent + +Since version 1.2.0, nREPL ships together with a native JVMTI agent, so that the +eval interrupts properly work on Java 21 and later. To enable the agent, the +Java process should be launched with `-Djdk.attach.allowAttachSelf`. CIDER will +do it automatically during jack-in if `cider-enable-nrepl-jvmti-agent` is set to +`t`. + ==== Leiningen Options * `cider-lein-command` - the name of the Leiningen executable (`lein` by default) diff --git a/doc/modules/ROOT/pages/usage/code_evaluation.adoc b/doc/modules/ROOT/pages/usage/code_evaluation.adoc index dc3e625de..a2f21dc45 100644 --- a/doc/modules/ROOT/pages/usage/code_evaluation.adoc +++ b/doc/modules/ROOT/pages/usage/code_evaluation.adoc @@ -161,6 +161,12 @@ NOTE: CIDER internally increases the timeout to 30 seconds for the first sync ev == Configuration +=== Enable evaluation interrupts on Java 21 and newer + +The configuration variable `cider-enable-nrepl-jvmti-agent` has to be enabled +for interrupts to work properly on Java 21+. See +xref:basics/up_and_running.adoc#enabling-nrepl-jvmti-agent[JVMTI agent] section. + === Display Spinner During Evaluation Some evaluation operations take a while to complete, so CIDER will display a diff --git a/test/cider-tests.el b/test/cider-tests.el index 01fb01b60..b900a3999 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -147,7 +147,8 @@ (setq-local cider-injected-middleware-version "0.49.0") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) - (setq-local cider-enrich-classpath t)) + (setq-local cider-enrich-classpath t) + (setq-local cider-enable-nrepl-jvmti-agent t)) (it "can inject dependencies in a lein project" (expect (cider-inject-jack-in-dependencies "" "repl :headless" 'lein) @@ -157,6 +158,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") + " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -170,6 +172,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") + " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -182,6 +185,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") + " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -201,6 +205,7 @@ (it "can inject dependencies in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " + "-Pjdk.attach.allowAttachSelf " (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -221,6 +226,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") + " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -256,6 +262,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") + " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) (it "can concat in a boot project" @@ -272,6 +279,7 @@ (it "can concat in a gradle project" (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " + "-Pjdk.attach.allowAttachSelf " (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.0") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -337,6 +345,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") + " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless")))) @@ -446,7 +455,7 @@ (it "uses main opts in an alias to prevent other mains from winning" (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) - (let ((expected (string-join `("clojure -Sdeps " + (let ((expected (string-join `("clojure -J-Djdk.attach.allowAttachSelf -Sdeps " ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) @@ -454,13 +463,14 @@ (setq-local cider-clojure-cli-command "clojure") (setq-local cider-inject-dependencies-at-jack-in t) (setq-local cider-clojure-cli-aliases nil) + (setq-local cider-enable-nrepl-jvmti-agent t) (spy-on 'cider-project-type :and-return-value 'clojure-cli) (spy-on 'cider-jack-in-resolve-command :and-return-value "clojure") (expect (plist-get (cider--update-jack-in-cmd nil) :jack-in-cmd) :to-equal expected))) (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" - (let ((expected (string-join `("clojure -Sdeps " + (let ((expected (string-join `("clojure -J-Djdk.attach.allowAttachSelf -Sdeps " ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) @@ -469,6 +479,7 @@ (setq-local cider-allow-jack-in-without-project t) (setq-local cider-clojure-cli-command "clojure") (setq-local cider-inject-dependencies-at-jack-in t) + (setq-local cider-enable-nrepl-jvmti-agent t) (spy-on 'cider-project-type :and-return-value 'clojure-cli) (spy-on 'cider-jack-in-resolve-command :and-return-value "clojure") (expect (plist-get (cider--update-jack-in-cmd nil) :jack-in-cmd) @@ -477,7 +488,8 @@ (dolist (command '("clojure" "powershell")) (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too - (let ((expected (string-join `("-Sdeps " + (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf " + "-Sdeps " ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") @@ -487,7 +499,8 @@ command) :to-equal expected)))) (it "handles aliases correctly" - (let ((expected (string-join `("-Sdeps " + (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf " + "-Sdeps " ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) @@ -515,18 +528,18 @@ (expect (cider-clojure-cli-jack-in-dependencies nil nil deps) :to-equal expected))))) (it "allows for global options" - (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf -Sdeps " + (let ((expected (string-join `("-J-Xverify:none -J-Djdk.attach.allowAttachSelf -Sdeps " ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) (let ((cider-clojure-cli-aliases ":test")) - (expect (cider-clojure-cli-jack-in-dependencies "-J-Djdk.attach.allowAttachSelf" nil deps) + (expect (cider-clojure-cli-jack-in-dependencies "-J-Xverify:none" nil deps) :to-equal expected)))) (it "allows to specify git coordinate as cider-jack-in-dependency" (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) - (let ((expected (string-join `("clojure -Sdeps " + (let ((expected (string-join `("clojure -J-Djdk.attach.allowAttachSelf -Sdeps " ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) @@ -534,6 +547,7 @@ (setq-local cider-clojure-cli-command "clojure") (setq-local cider-inject-dependencies-at-jack-in t) (setq-local cider-clojure-cli-aliases nil) + (setq-local cider-enable-nrepl-jvmti-agent t) (spy-on 'cider-project-type :and-return-value 'clojure-cli) (spy-on 'cider-jack-in-resolve-command :and-return-value "clojure") (expect (plist-get (cider--update-jack-in-cmd nil) :jack-in-cmd) From 751f1702fe31e19599ae2eec9ddb656312de0347 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Sun, 2 Jun 2024 23:49:30 +0800 Subject: [PATCH 144/212] Limit error overlay check to JVM runtime --- cider-eval.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index bb88106aa..04da5021d 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -925,8 +925,11 @@ depending on the PHASE." (and cider-show-error-buffer (member phase (cider-clojure-compilation-error-phases)))) ;; Only show overlays for things that do look like an exception (#3587): - (or (string-match-p cider-clojure-runtime-error-regexp err) - (string-match-p cider-clojure-compilation-error-regexp err))) + ;; Note: only applicable to JVM Clojure error messages (#3687) + (if (cider-runtime-clojure-p) + (or (string-match-p cider-clojure-runtime-error-regexp err) + (string-match-p cider-clojure-compilation-error-regexp err)) + t)) ;; Display errors as temporary overlays (let ((cider-result-use-clojure-font-lock nil) (trimmed-err (funcall cider-inline-error-message-function err))) From 5953510556773d1ee8de9ca61412eae140e12925 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Mon, 3 Jun 2024 00:57:24 +0800 Subject: [PATCH 145/212] Refactor error-matching regexes Merge with cider-clojure-unexpected-error into a single regex, Match :read-eval-result and :print-eval-result error phases --- cider-eval.el | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 04da5021d..e062a467a 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -576,22 +576,15 @@ It delegates the actual error content to the eval or op handler." (defconst cider-clojure-1.10-error `(sequence - "Syntax error " - (minimal-match (zero-or-more anything)) - (or "compiling " - "macroexpanding " - "reading source ") - (minimal-match (zero-or-more anything)) - ,cider-clojure-1.10--location)) - -(defconst cider-clojure-unexpected-error - `(sequence - "Unexpected error (" (minimal-match (one-or-more anything)) ") " - (or "compiling " - "macroexpanding " - "reading source ") - (minimal-match (one-or-more anything)) - ,cider-clojure-1.10--location)) + (or "Syntax error reading source " ; phase = :read-source + (sequence + (or "Syntax error " "Unexpected error ") + (minimal-match (zero-or-more anything)) ; optional class, eg. (ClassCastException) + (or "macroexpanding " ; phase = :macro-syntax-check / :macroexpansion + "compiling ") ; phase = :compile-syntax-check / :compilation + (minimal-match (zero-or-more anything)))) ; optional symbol, eg. foo/bar + ,cider-clojure-1.10--location) + "Regexp matching error messages triggered in compilation / read / print phases.") (defconst cider-clojure-warning `(sequence @@ -608,8 +601,7 @@ It delegates the actual error content to the eval or op handler." (defconst cider-clojure-compilation-regexp (rx-to-string `(seq bol (or ,cider-clojure-warning - ,cider-clojure-1.10-error - ,cider-clojure-unexpected-error)) + ,cider-clojure-1.10-error)) 'nogroup) "A few example values that will match: \"Reflection warning, /tmp/foo/src/foo/core.clj:14:1 - \" @@ -620,8 +612,7 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" (defconst cider-clojure-compilation-error-regexp (rx-to-string - `(seq bol (or ,cider-clojure-1.10-error - ,cider-clojure-unexpected-error)) + `(seq bol ,cider-clojure-1.10-error) 'nogroup) "Like `cider-clojure-compilation-regexp', but excluding warnings such as reflection warnings. @@ -634,8 +625,10 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" (defconst cider--clojure-execution-error-regexp `(sequence - "Execution error " - (minimal-match (zero-or-more anything)) + (or "Error reading eval result " ; phase = :read-eval-result + "Error printing return value " ; phase = :print-eval-result + "Execution error ") ; phase = :execution + (minimal-match (zero-or-more anything)) ; optional class, eg. (ArithmeticException) ,cider-clojure-1.10--location)) (defconst cider--clojure-spec-execution-error-regexp From 1180bb3c2adde928972c4ac1f2fb20eaa3d8416f Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Mon, 3 Jun 2024 01:03:07 +0800 Subject: [PATCH 146/212] Remove references to <= 1.9-style error messages --- cider-eval.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index e062a467a..4eda59d8f 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -594,7 +594,8 @@ It delegates the actual error content to the eval or op handler." ":" (group-n 3 (one-or-more (any "-" digit))) (optional ":" (group-n 4 (one-or-more (any "-" digit)))) - " - ")) + " - ") + "Regexp matching various non-error messages, e.g. reflection warnings.") ;; Please keep this in sync with `cider-clojure-compilation-error-regexp', ;; which is a subset of these regexes. @@ -605,8 +606,6 @@ It delegates the actual error content to the eval or op handler." 'nogroup) "A few example values that will match: \"Reflection warning, /tmp/foo/src/foo/core.clj:14:1 - \" -\"CompilerException java.lang.RuntimeException: Unable to resolve symbol: \\ -lol in this context, compiling:(/foo/core.clj:10:1)\" \"Syntax error compiling at (src/workspace_service.clj:227:3).\" \"Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\"") @@ -618,8 +617,6 @@ lol in this context, compiling:(/foo/core.clj:10:1)\" but excluding warnings such as reflection warnings. A few example values that will match: -\"CompilerException java.lang.RuntimeException: Unable to resolve symbol: \\ -lol in this context, compiling:(/foo/core.clj:10:1)\" \"Syntax error compiling at (src/workspace_service.clj:227:3).\" \"Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\"") From 2cdac016c0911313cf364f6c87ac2892441d4f5d Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Mon, 3 Jun 2024 01:18:59 +0800 Subject: [PATCH 147/212] Add test --- test/cider-error-parsing-tests.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/cider-error-parsing-tests.el b/test/cider-error-parsing-tests.el index 8c01cd2c2..a4361ac3f 100644 --- a/test/cider-error-parsing-tests.el +++ b/test/cider-error-parsing-tests.el @@ -124,6 +124,7 @@ (expect (progn (string-match cider-clojure-compilation-regexp clojure-compiler-warning) (match-string 1 clojure-compiler-warning)) :to-equal "warning"))) + ;; FIXME: duplicate spec names (dolist (regexp (list cider-clojure-compilation-regexp cider-clojure-compilation-error-regexp)) (it "Recognizes a clojure-1.10 error message" (let ((clojure-1.10-compiler-error "Syntax error compiling at (src/ardoq/service/workspace_service.clj:227:3).")) @@ -156,7 +157,7 @@ (match-string 2 specimen)) :to-equal "src/haystack/parser.cljc")) - ;; without foo/foo symbol + ;; without exception class cause-type (let ((specimen "Execution error at (src/haystack/parser.cljc:4).")) (expect specimen :to-match cider-clojure-runtime-error-regexp) (expect (progn @@ -187,7 +188,15 @@ (expect (progn (string-match cider-clojure-runtime-error-regexp specimen) (match-string 2 specimen)) - :to-equal "FileInputStream.java")))) + :to-equal "FileInputStream.java"))) + + (it "Recognizes errors thrown during the result printing phase" + (let ((specimen "Error printing return value (ClassCastException) at clojure.core/file-seq$fn (core.clj:4997).")) + (expect specimen :to-match cider-clojure-runtime-error-regexp) + (expect (progn + (string-match cider-clojure-runtime-error-regexp specimen) + (match-string 2 specimen)) + :to-equal "core.clj")))) (describe "cider-module-info-regexp" (it "Matches module info provided by Java" From 03981778afc601f0ff703eb818c87760af6ef206 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Mon, 3 Jun 2024 01:25:31 +0800 Subject: [PATCH 148/212] Rename some variables Mark the rx spec defconst vars as private Vars named `-regexp` should be strings, not rx specs --- cider-eval.el | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cider-eval.el b/cider-eval.el index 4eda59d8f..7325abde7 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -564,7 +564,7 @@ It delegates the actual error content to the eval or op handler." ;; Reference: ;; https://github.com/clojure/clojure/blob/clojure-1.10.0/src/clj/clojure/main.clj#L251 ;; See `cider-compilation-regexp' for interpretation of match groups. -(defconst cider-clojure-1.10--location +(defconst cider--clojure-1.10-location '(sequence "at " (minimal-match (zero-or-more anything)) ;; the fully-qualified name of the function that triggered the error "(" @@ -574,7 +574,7 @@ It delegates the actual error content to the eval or op handler." ":" (group-n 4 (one-or-more (any "-" digit)))) ; column number ").")) -(defconst cider-clojure-1.10-error +(defconst cider--clojure-1.10-error `(sequence (or "Syntax error reading source " ; phase = :read-source (sequence @@ -583,10 +583,10 @@ It delegates the actual error content to the eval or op handler." (or "macroexpanding " ; phase = :macro-syntax-check / :macroexpansion "compiling ") ; phase = :compile-syntax-check / :compilation (minimal-match (zero-or-more anything)))) ; optional symbol, eg. foo/bar - ,cider-clojure-1.10--location) + ,cider--clojure-1.10-location) "Regexp matching error messages triggered in compilation / read / print phases.") -(defconst cider-clojure-warning +(defconst cider--clojure-warning `(sequence (minimal-match (zero-or-more anything)) (group-n 1 "warning") @@ -601,8 +601,8 @@ It delegates the actual error content to the eval or op handler." ;; which is a subset of these regexes. (defconst cider-clojure-compilation-regexp (rx-to-string - `(seq bol (or ,cider-clojure-warning - ,cider-clojure-1.10-error)) + `(seq bol (or ,cider--clojure-warning + ,cider--clojure-1.10-error)) 'nogroup) "A few example values that will match: \"Reflection warning, /tmp/foo/src/foo/core.clj:14:1 - \" @@ -611,7 +611,7 @@ It delegates the actual error content to the eval or op handler." (defconst cider-clojure-compilation-error-regexp (rx-to-string - `(seq bol ,cider-clojure-1.10-error) + `(seq bol ,cider--clojure-1.10-error) 'nogroup) "Like `cider-clojure-compilation-regexp', but excluding warnings such as reflection warnings. @@ -620,25 +620,25 @@ A few example values that will match: \"Syntax error compiling at (src/workspace_service.clj:227:3).\" \"Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\"") -(defconst cider--clojure-execution-error-regexp +(defconst cider--clojure-execution-error `(sequence (or "Error reading eval result " ; phase = :read-eval-result "Error printing return value " ; phase = :print-eval-result "Execution error ") ; phase = :execution (minimal-match (zero-or-more anything)) ; optional class, eg. (ArithmeticException) - ,cider-clojure-1.10--location)) + ,cider--clojure-1.10-location)) -(defconst cider--clojure-spec-execution-error-regexp +(defconst cider--clojure-spec-execution-error `(sequence "Execution error - invalid arguments to " (minimal-match (one-or-more anything)) " " - ,cider-clojure-1.10--location)) + ,cider--clojure-1.10-location)) (defconst cider-clojure-runtime-error-regexp (rx-to-string - `(seq bol (or ,cider--clojure-execution-error-regexp - ,cider--clojure-spec-execution-error-regexp)) + `(seq bol (or ,cider--clojure-execution-error + ,cider--clojure-spec-execution-error)) 'nogroup) "Matches runtime errors, as oppsed to compile-time/macroexpansion-time errors. From 9f93a5f674920a731d167c62e55fe7c365502c5a Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Mon, 3 Jun 2024 01:41:42 +0800 Subject: [PATCH 149/212] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c35c5b0de..fcaf9bcd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ### Bugs fixed - [#3696](https://github.com/clojure-emacs/cider/pull/3696): Don't eagerly complete a candidate if there are other candidates matching `flex` style. +- [#3698](https://github.com/clojure-emacs/cider/pull/3698): Fix error messages in non-JVM runtimes being suppressed when `cider-show-error-buffer` is set to `nil`. ## 1.14.0 (2024-05-30) From 03664c146b64c2f555515e35dea3299ae93fe93b Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 3 Jun 2024 14:39:56 +0300 Subject: [PATCH 150/212] Use inlined :cider/nrepl alias to inject -Djdk.attach.allowAttachSelf --- cider.el | 11 +++++++---- test/cider-tests.el | 26 ++++++++++++-------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/cider.el b/cider.el index 0d46f5daa..70dcbae64 100644 --- a/cider.el +++ b/cider.el @@ -910,13 +910,16 @@ your aliases contain any mains, the cider/nrepl one will be the one used." (cider-jack-in-normalized-nrepl-middlewares) ",")) (main-opts (format "\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[%s]\"" middleware)) - (deps (format "{:deps {%s} :aliases {:cider/nrepl {:main-opts [%s]}}}" - (string-join all-deps " ") main-opts)) + (deps (format "{:deps {%s} :aliases {:cider/nrepl {%s:main-opts [%s]}}}" + (string-join all-deps " ") + (if cider-enable-nrepl-jvmti-agent + ":jvm-opts [\"-Djdk.attach.allowAttachSelf\"], " + "") + main-opts)) (deps-quoted (cider--shell-quote-argument deps command))) - (format "%s%s-Sdeps %s -M%s:cider/nrepl%s" + (format "%s-Sdeps %s -M%s:cider/nrepl%s" ;; TODO: global-options are deprecated and should be removed in CIDER 2.0 (if global-options (format "%s " global-options) "") - (if cider-enable-nrepl-jvmti-agent "-J-Djdk.attach.allowAttachSelf " "") deps-quoted (cider--combined-aliases) (if params (format " %s" params) "")))) diff --git a/test/cider-tests.el b/test/cider-tests.el index b900a3999..b61669491 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -455,8 +455,8 @@ (it "uses main opts in an alias to prevent other mains from winning" (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) - (let ((expected (string-join `("clojure -J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + (let ((expected (string-join `("clojure -Sdeps " + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -470,8 +470,8 @@ :to-equal expected))) (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" - (let ((expected (string-join `("clojure -J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + (let ((expected (string-join `("clojure -Sdeps " + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -488,9 +488,8 @@ (dolist (command '("clojure" "powershell")) (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too - (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf " - "-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + (let ((expected (string-join `("-Sdeps " + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -499,9 +498,8 @@ command) :to-equal expected)))) (it "handles aliases correctly" - (let ((expected (string-join `("-J-Djdk.attach.allowAttachSelf " - "-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + (let ((expected (string-join `("-Sdeps " + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -528,8 +526,8 @@ (expect (cider-clojure-cli-jack-in-dependencies nil nil deps) :to-equal expected))))) (it "allows for global options" - (let ((expected (string-join `("-J-Xverify:none -J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + (let ((expected (string-join `("-J-Xverify:none -Sdeps " + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -539,8 +537,8 @@ (it "allows to specify git coordinate as cider-jack-in-dependency" (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) - (let ((expected (string-join `("clojure -J-Djdk.attach.allowAttachSelf -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + (let ((expected (string-join `("clojure -Sdeps " + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From c190a24361e33203d2b697a214c0b5f2edbc2159 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 3 Jun 2024 14:46:39 +0300 Subject: [PATCH 151/212] Clarify JVMTI agent docs --- .../ROOT/pages/basics/up_and_running.adoc | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 66b74870d..0baa0666e 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -206,11 +206,33 @@ so we'll examine them tool by tool. ==== Enabling nREPL JVMTI agent -Since version 1.2.0, nREPL ships together with a native JVMTI agent, so that the -eval interrupts properly work on Java 21 and later. To enable the agent, the -Java process should be launched with `-Djdk.attach.allowAttachSelf`. CIDER will -do it automatically during jack-in if `cider-enable-nrepl-jvmti-agent` is set to -`t`. +Since version 1.2.0, nREPL includes a native JVMTI agent which makes the eval +interrupts work properly on Java 21 and later. To enable the agent, the Java +process should be launched with `-Djdk.attach.allowAttachSelf`. CIDER will do it +automatically during jack-in if `cider-enable-nrepl-jvmti-agent` variable is set +to `t`. + +[IMPORTANT] +==== +`cider-enable-nrepl-jvmti-agent` has no effect if you start a REPL +process outside of Emacs and connect to it with `cider-connect`. In that +scenario, you have to add `-Djdk.attach.allowAttachSelf` Java property manually +through the means of the build tool. In Leiningen, add this to `project.clj`: + +[source,lisp] +---- +:jvm-opts ["-Djdk.attach.allowAttachSelf"] +---- + +In tools.deps, add this to one of the aliases that you enable with the REPL: + +[source,lisp] +---- +:aliases {:dev + {:jvm-opts ["-Djdk.attach.allowAttachSelf"] + ...}} +---- +==== ==== Leiningen Options From 9f87c68ee6de5a67c9d846b05c729325b61234d9 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Thu, 30 May 2024 09:50:05 +0000 Subject: [PATCH 152/212] Move cheatsheet buffer name to cider-cheatsheet-buffer constant --- cider-cheatsheet.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 6ab38fc60..4bdf0a221 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -34,6 +34,8 @@ (require 'seq) (require 'subr-x) +(defconst cider-cheatsheet-buffer "*cider-cheatsheet*") + (defconst cider-cheatsheet-hierarchy '(("Documentation" ("REPL" @@ -606,7 +608,7 @@ With a prefix argument FLAT, represent each candidate as a full path to var." (defun cider-cheatsheet () "Display cheatsheet in a popup buffer." (interactive) - (with-current-buffer (cider-popup-buffer "*cider-cheatsheet*") + (with-current-buffer (cider-popup-buffer cider-cheatsheet-buffer) (read-only-mode -1) (insert (cider-cheatsheet--buffer-contents)) (read-only-mode 1) From c430dc079b24168b6dad2b5c63b3a3c72a28be22 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Thu, 30 May 2024 10:02:35 +0000 Subject: [PATCH 153/212] Add customization group cider-cheatsheet --- cider-cheatsheet.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 4bdf0a221..8a0d8ade9 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -34,6 +34,11 @@ (require 'seq) (require 'subr-x) +(defgroup cider-cheatsheet nil + "Clojure cheatsheet in CIDER." + :prefix "cider-cheatsheet-" + :group 'cider) + (defconst cider-cheatsheet-buffer "*cider-cheatsheet*") (defconst cider-cheatsheet-hierarchy From 9db76ba4dc2a072f1cec4e2be30e78921a30694e Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Thu, 30 May 2024 10:46:15 +0000 Subject: [PATCH 154/212] Add customizable variable cider-cheatsheet-auto-select-buffer --- cider-cheatsheet.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 8a0d8ade9..2de99aa1d 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -41,6 +41,11 @@ (defconst cider-cheatsheet-buffer "*cider-cheatsheet*") +(defcustom cider-cheatsheet-auto-select-buffer t + "Whether to auto-select the cheatsheet popup buffer." + :type 'boolean + :package-version '(cider . "1.15.0")) + (defconst cider-cheatsheet-hierarchy '(("Documentation" ("REPL" @@ -613,7 +618,8 @@ With a prefix argument FLAT, represent each candidate as a full path to var." (defun cider-cheatsheet () "Display cheatsheet in a popup buffer." (interactive) - (with-current-buffer (cider-popup-buffer cider-cheatsheet-buffer) + (with-current-buffer (cider-popup-buffer cider-cheatsheet-buffer + cider-cheatsheet-auto-select-buffer) (read-only-mode -1) (insert (cider-cheatsheet--buffer-contents)) (read-only-mode 1) From 78e4a1c9b904e32f1a95b9e74beff3b1e64b33c9 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Fri, 31 May 2024 03:10:55 +0000 Subject: [PATCH 155/212] Add customizable variable cider-cheatsheet-default-action-function --- cider-cheatsheet.el | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 2de99aa1d..3bd4be4e5 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -46,6 +46,17 @@ :type 'boolean :package-version '(cider . "1.15.0")) +(defcustom cider-cheatsheet-default-action-function #'cider-doc-lookup + "Function to use on a var when it is selected. + +By default, documentation for a var is displayed using `cider-doc-lookup`, +but it can also be set to `cider-clojuredocs-lookup` to show documentation +from ClojureDocs or any other function accepting a var as an argument." + :type '(choice (const cider-doc-lookup) + (const cider-clojuredocs-lookup) + function) + :package-version '(cider . "1.15.0")) + (defconst cider-cheatsheet-hierarchy '(("Documentation" ("REPL" @@ -582,7 +593,7 @@ With a prefix argument FLAT, represent each candidate as a full path to var." (paths (mapcar (lambda (sections) (string-join sections " > ")) hierarchy)) (path (completing-read "Select path: " paths)) (var (car (last (split-string path " > "))))) - (cider-doc-lookup var)) + (funcall cider-cheatsheet-default-action-function var)) (let ((hierarchy cider-cheatsheet-hierarchy)) (while (stringp (caar hierarchy)) (let* ((sections (mapcar #'car hierarchy)) @@ -590,7 +601,7 @@ With a prefix argument FLAT, represent each candidate as a full path to var." (setq hierarchy (map-elt hierarchy section)))) (let* ((vars (seq-mapcat #'cider-cheatsheet--expand-vars hierarchy)) (var (completing-read "Select var: " vars))) - (cider-doc-lookup var))))) + (funcall cider-cheatsheet-default-action-function var))))) (cl-defun cider-cheatsheet--insert-hierarchy (hierarchy &optional (level 0)) "Insert HIERARCHY with visual indentation for LEVEL." @@ -604,7 +615,8 @@ With a prefix argument FLAT, represent each candidate as a full path to var." (insert-text-button var 'var var 'action (lambda (btn) - (cider-doc-lookup (button-get btn 'var))) + (funcall cider-cheatsheet-default-action-function + (button-get btn 'var))) 'help-echo (format "Show documentation for %s" var)) (insert "\n"))))) From 31af2dbb6ec259f2449b31f74d64b7e69cf6228a Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sat, 1 Jun 2024 19:12:57 +0000 Subject: [PATCH 156/212] Add a section on cheatsheet to the docs --- .../images/cider-cheatsheet-select-1.png | Bin 0 -> 10174 bytes .../images/cider-cheatsheet-select-2.png | Bin 0 -> 11575 bytes .../images/cider-cheatsheet-select-3.png | Bin 0 -> 17062 bytes .../ROOT/assets/images/cider-cheatsheet.png | Bin 0 -> 63154 bytes .../ROOT/pages/usage/misc_features.adoc | 20 ++++++++++++++++++ 5 files changed, 20 insertions(+) create mode 100644 doc/modules/ROOT/assets/images/cider-cheatsheet-select-1.png create mode 100644 doc/modules/ROOT/assets/images/cider-cheatsheet-select-2.png create mode 100644 doc/modules/ROOT/assets/images/cider-cheatsheet-select-3.png create mode 100644 doc/modules/ROOT/assets/images/cider-cheatsheet.png diff --git a/doc/modules/ROOT/assets/images/cider-cheatsheet-select-1.png b/doc/modules/ROOT/assets/images/cider-cheatsheet-select-1.png new file mode 100644 index 0000000000000000000000000000000000000000..5562e2091ac36d1ad20f2d692f9beba39af2edc6 GIT binary patch literal 10174 zcmZ{K1yog0xAmc08l<}skd#I#5s>a~0qK;yG=hXkcXuNxUD6#Q-QC^)LBIdKuijt` z?uB#qK6~#KbFR70XZiP%Xvl=f005v#y%kdg0BCja`!7Uj@OK>(vK#n8ZuC}B769C6 z0RZ9;05{;jAX@<7#0CI6`T)Qe4*>YK$qfnu;01U?X-P5Q@#!bMDeoHq&{jx^y;gSp zy+7}+9e(+Ua5U}YGA5-EA9czcD;i%J+tK{&t78@gZBPxRQ9iMv7>?r58f_4p3{?LYxlbE-GrLG9lcA3w;w)6G_|DdHkS@-_4G8N zP*PG_(TtwK1_uXoe)fqB4*pIELxG8D&ISKwf1Q77(WSU0*X*@ewgIZYm{|5C<8wrg zh?E}%TfbAfSlp#K@0$!$Iy#a&=(rO+-j8z>lvAdef4epN;D#qAcF3o*9v5muj51ee z6w!Mpot4Hq^t_zkAV!Jf(~C~0(6U;juRxu>$9N~z;~WFSNWmoS8OmiiG!Aaz^2JxX zS+94W=<%ZCzgx`n&Q&|fUY|Ecz(d8)8lSYNCkfYFuU6&b#njL3pi-MFXPKJDObhd2 zesxyDLp);90&DXi_2DWXomLU+i0&%ASft~VqSC1pf=hv0{e zY0hinGgA3^TqrJ9)f--{={aIVkG-Z`0b_0N1)TQ}8A2o=zjm((bcSWW(!*6-tfky^ zc_;MufZhZLEO1Y#c==$mj?QDHQMGrt_eP3Ktw8Ss2T7M;PYFXRFAmRjXH1Z9srf#) zlEm2_bhWBoRe4Q6oWsiplHyi_>=#H+I zt%9!OwEN+)%EZeS@8$>F4dY#$NC>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uOLRL5qcj zGPi*Bto~M6-8wgAqicnc22DR(eolvp%cU$ZxDwoT^xz)ZCW+RMEmy8hisoK|eXTAU zeu(RztZ)?6UY&XlC^{fsb*9Apu?bopryA>zfA{+9ewupFv-&U!h()vlv*>7F~)<^j9{jBFJa629c=qi}z zK1AS@>*1}}!`p|4?n9vapxqwp{|g28*Jt`mM(;@QCsf#aY!3{;eZ&-YV(;t>_3S?I z7}$IOUjP;+7B+e&4tgeLWo9-W78V|6CORf29ww$D^w8t~c7nwxLz9or|NexN&o-= literal 0 HcmV?d00001 diff --git a/doc/modules/ROOT/assets/images/cider-cheatsheet-select-3.png b/doc/modules/ROOT/assets/images/cider-cheatsheet-select-3.png new file mode 100644 index 0000000000000000000000000000000000000000..e9ed06f50e6129660eb153f5efe23166284c646d GIT binary patch literal 17062 zcmbun1yojD*EYHVr5mNYk&y0^kdj6~>6Y$J>5wkzRJv0-q*GeD8*aMeY<%A5t^YsY zH_kZ2G2GlYYwf+(T-TcOn%7*L5Cu626hwSP002;=B*l~f09qaVc?KRD{J)+a(G9$i z8b~V10)QJe0QmR=zzz77&o%%!G6TS_E&%X;1ppkI)CNU<@E5T9G7@6ICkiW(3_g59!0qQK@Kl`Y8c$_pt4Z$MQG zhp&#+sP43B8)-SQo9*TH9;A8v*m611NRjiAb7`^J+5J*O(%~%&giN zE$~f7KelOFk-U&NCmQ*Aw+((}&{${|Zyi^m0v`M=rIWQioK7dj+W2@Bs)PlLOI!W> zu3X0Tmje%%ray>NXfT3=R01s%a6-80&)35ER%leT;K}^sXz!b@rN8%%?Uw6tt1G|i;XCpcQF|TlZ{CLHcn%0R)(*72aUBr4uXP`o z^^UC+<4Du$9e0`Z>&s{Y>h9zJ~g4MUSFrY@C_qzMlNLey9&UrlpC46^m6xQ(| z)f*BiTWc|1m|pOMZP2Hl;*E^c!hKwh-dLaciVIwN^lAGLkG@ElXsZC*Hu1WRz3P<& z#bpV-`^m+FTZPPea?xu+WA(EOq_h0IBhbd^KTHwL&T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ZpWLFJoYS5(WrQrXE07maXyyCMwnf;0rNm~2C{^Y7mA~k_X!I8?pHw-*> z2&ynf`Gl_i8yEul`tw-^k&HbD#L8-u0qEph|Fhy{7xW@w>808WFnf6wcmn?toVB#V z^(p*@YG_o)N#klLm^>(Tft&@cpJM$t=aU9eD1vCTPK~ML_)n%H^~SUKFQx)UMPEO( zYg(tSzPBK$mj-$DU+NO3?~VFjC8dr(O@6;s6i}XIc?wm@EdKT&@%WyX za6Tf4Qt=}HT1yZVlXN`_hR#0`>Ed2rDd4GTGJ%QIdoT+CH3L0GkY0lBQj4aFa)qcu z1aSjdkl~bGj{2zyjDUm2QzGs9%8i%|E8qpF%YektADkl>SzkgeacQ2GAgU$Y~ z?}O?1)A>$zj6cUbL6*n_0zM|1FS0x;4GG37Uc(fOM}@c`GSL5$eEJW-x;a;+27DN? zA-Hq@YXvY*;OX3=qWHn^_tw=P9Pt~F^mj=#)HiGIWB%CO4U5FXZoY>W*o6|l31~~2 zBgf=0XWuqYZ7umf-o;%8Gocm;IIAcXgnz%?wLftoNu`x~Nws-Skel@>JOP3xQPpn4 zT!R42J2oAX`<1uajsGvwo(u?#f>+=zah{eI3s=JVOOO@d+q@3x1QJ;79r-_(6I6smmbUAN{8{p|hbe z{UzvcLI@46p3*lEga1y6fp{P&D{EJI-PS?L;R1mtzD|O>nYR zYjs+hoL1l&YEFREJR(J=vHYlIFv10FSfC4z9aOaFB0)LD^c&1eASrP$>th9Hyn%s_P^N5o z0B7(ZO?1oje`NQbVu}3 z!1m8${^pENrVwKWrB@M<;bE$@^NWCaW-|OA8TT`ID4NXf&uf7Hhdle~KmI7f16qms z4)VZAO)2k$_)g27=9E^Ak?2Nz*z{>t_&&@D;3f8{eJ)rtiSmH literal 0 HcmV?d00001 diff --git a/doc/modules/ROOT/assets/images/cider-cheatsheet.png b/doc/modules/ROOT/assets/images/cider-cheatsheet.png new file mode 100644 index 0000000000000000000000000000000000000000..f7250b2946792a60c9204c15bf01a58a8f112285 GIT binary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m(1nW zu)SsTlXs!nk=mLOcQyPLG27kfft74#Zi~s=4lZ*9 z*5Gg61-#HQe_y4*SXI2iYh+UQI`F>Ly@n5$CtvV_Q+)EScZ5%bAtJ@wmuu_M>Vk&R{Qv+^*@`OL z>g(7VaO+tcfd2q2Oe}2lOziYb%<{}^+^nqJ%$&4LOx#RNMfnb|etLkJg}#ZQ(?5Pd y{cg`N_<#q$e+OF=GXoo29W%>6J%){mo0;R6Z<73pNe6rkATBB`lJ{8K`~Lu*HbRsD literal 0 HcmV?d00001 diff --git a/doc/modules/ROOT/pages/usage/misc_features.adoc b/doc/modules/ROOT/pages/usage/misc_features.adoc index 0378e8827..dfceba105 100644 --- a/doc/modules/ROOT/pages/usage/misc_features.adoc +++ b/doc/modules/ROOT/pages/usage/misc_features.adoc @@ -329,3 +329,23 @@ If you would prefer for it to have a lower precedence, you can change `cider-xre ---- TIP: See https://www.gnu.org/software/emacs/manual/html_node/elisp/Setting-Hooks.html[Setting Hooks] for more information about depth. + +== Cheatsheet + +There are two ways to access https://clojure.org/api/cheatsheet[Clojure cheatsheet] in CIDER. + +The first one is available through `cider-cheatsheet` command and displays the cheatsheet in a popup buffer. This is how it looks with two windows displaying the cheatsheet buffer side by side: + +image::cider-cheatsheet.png[Displaying cheatsheet in buffer] + +The second way is available through `cider-cheatsheet-select` command, which uses completions in the minibuffer to find a var in the cheatsheet. By default, it provides a multi-step selection process where you need to go section by section until you find a var. This is how it looks in the minibuffer: + +image::cider-cheatsheet-select-1.png[Selecting section in cheatsheet] + +image::cider-cheatsheet-select-2.png[Selecting var in cheatsheet] + +By using a prefix argument when calling `cider-cheatsheet-select`, we can change the behavior of `cider-cheatsheet-select` so each candidate is represented as a full path to a var. This can be useful with fuzzy completion style and vertical candidates display, as in that case, we can search in any element of the path, possibly getting matches from multiple categories at the same time. This is how it looks with such a workflow: + +image::cider-cheatsheet-select-3.png[Selecting path in cheatsheet] + +It is possible to control which function is used on a var when it is selected by customizing `cider-cheatsheet-default-action-function`. By default, documentation for a var is displayed using `cider-doc-lookup`, but it can also be set to `cider-clojuredocs-lookup` to show documentation from ClojureDocs or any other function accepting a var as an argument. From 7c31f506d84f973d0843c8682edf32c2a017b8ae Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Mon, 3 Jun 2024 17:11:58 +0000 Subject: [PATCH 157/212] Update cider-cheatsheet.el package commentary --- cider-cheatsheet.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cider-cheatsheet.el b/cider-cheatsheet.el index 3bd4be4e5..fbc07dad6 100644 --- a/cider-cheatsheet.el +++ b/cider-cheatsheet.el @@ -3,6 +3,7 @@ ;; Copyright © 2019-2024 Kris Jenkins, Bozhidar Batsov and CIDER contributors ;; ;; Author: Kris Jenkins +;; Kato Muso ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -23,9 +24,6 @@ ;; A quick reference system for Clojure. Fast, searchable & available offline. -;; Mostly taken from Kris Jenkins' `clojure-cheatsheet' -;; See: https://github.com/clojure-emacs/clojure-cheatsheet - ;;; Code: (require 'cider-doc) From 0916372cdd285b058c25d13bf7759941363e767b Mon Sep 17 00:00:00 2001 From: ikappaki <34983288+ikappaki@users.noreply.github.com> Date: Tue, 4 Jun 2024 05:51:14 +0100 Subject: [PATCH 158/212] [Docs] Improve the basilisp doc structure (#3703) Co-authored-by: ikappaki --- doc/modules/ROOT/nav.adoc | 1 + .../ROOT/pages/platforms/basilisp.adoc | 56 +++++++++++-------- 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/doc/modules/ROOT/nav.adoc b/doc/modules/ROOT/nav.adoc index 06035fd88..61e5ac19c 100644 --- a/doc/modules/ROOT/nav.adoc +++ b/doc/modules/ROOT/nav.adoc @@ -14,6 +14,7 @@ ** xref:platforms/overview.adoc[Overview] ** xref:platforms/babashka.adoc[Babashka] ** xref:platforms/nbb.adoc[Nbb] +** xref:platforms/basilisp.adoc[Basilisp] ** xref:platforms/other_platforms.adoc[Other Platforms] * Using CIDER ** xref:usage/interactive_programming.adoc[Interactive Programming] diff --git a/doc/modules/ROOT/pages/platforms/basilisp.adoc b/doc/modules/ROOT/pages/platforms/basilisp.adoc index 4bef08daa..1859f5d80 100644 --- a/doc/modules/ROOT/pages/platforms/basilisp.adoc +++ b/doc/modules/ROOT/pages/platforms/basilisp.adoc @@ -5,7 +5,7 @@ since CIDER 1.14 == Overview -Basilisp aims to enable writing Clojure programs on Python with full Python interoperability. It is highly compatible with Clojure. +Basilisp aims to enable writing Clojure programs on Python with full interoperability. It is highly compatible with Clojure. To install Basilisp, run: @@ -15,16 +15,18 @@ To install Basilisp, run: There are several ways to connect to Basilisp. -* kbd:[M-x cider-jack-in] and kbd:[M-5 M-x cider-jack-in-universal] +=== jack-in -If you have created a `basilisp.edn` project file at your root of your project tree, you can jack in to the project `M-x cider-jack-in`. The `basilisp.edn` is similar to `deps.edn` for clojure-cli projects. It can be left empty just to mark the root of your project. +kbd:[M-x cider-jack-in] and kbd:[M-5 M-x cider-jack-in-universal] + +If you have created a `basilisp.edn` project file at your root of your project tree, you can jack in to the project with `M-x cider-jack-in`. The `basilisp.edn` is similar to `deps.edn` for clojure-cli projects. It can be left empty just to mark the root of your project. If you don't have or want a basilisp project file, you can use universal jack in with a numerical argument of 5: - kbd:[M-5 M-x cider-jack-in-universal], or -- kbd:[M-5 C-c C-x j u], from within file in clojure-mode +- kbd:[M-5 C-c C-x j u], from within a file in clojure-mode -(Note: an alternative to kbd:[M-5] is kbd:[C-u 5]) +NOTE: an alternative to kbd:[M-5] is kbd:[C-u 5] You can also bind the universal jack-in to Basilisp to a function to use as a shortcut, for example @@ -35,7 +37,9 @@ You can also bind the universal jack-in to Basilisp to a function to use as a sh (cider-jack-in-universal 5))) ---- -* kbd:[M-x cider-connect] +=== connect + +kbd:[M-x cider-connect] You can start its bundled nREPL server: @@ -47,31 +51,37 @@ To see available options, type `basilisp nrepl-server -h` in a shell prompt. == Configuration -The jack-in command can be configured via several defcustoms: +The jack-in command can be configured with the following defcustoms + +=== `cider-basilisp-command` -* `cider-basilisp-command` (default is `basilisp`). +(default is `basilisp`) If Basilisp is installed in a virtual environment, update this to the full path of the `basilisp` executable within that virtual environment. -* `cider-basilisp-parameters` (default is `nrepl-server`). +=== `cider-basilisp-parameters` + +(default is `nrepl-server`) + +=== Customization There at few ways to setup (custom) variables in Emacs -- https://www.gnu.org/software/emacs/manual/html_node/emacs/Easy-Customization.html[Examining and Setting Variables] +==== 1. https://www.gnu.org/software/emacs/manual/html_node/emacs/Easy-Customization.html[Examining and Setting Variables] -kbd:[C-h v cider-basilisp-command], and -kbd:[C-h v cider-basilisp-parameters] +- kbd:[C-h v cider-basilisp-command], and +- kbd:[C-h v cider-basilisp-parameters] -- https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html[Per-Diretory Local Variables] +==== 2. https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html[Per-Diretory Local Variables] Uses `.dir-locals.el` to setup per mode variables. This file is typically stored at the root of the project. For example, to set the path to the basilisp executable within a virtual environment -kbd:[M-x add-dir-local-variable] -Mode or subdirectory: `clojure-mode` -Add directory-local variable: `cider-basilisp-command` -Add cider-basilisp-command with value: `"c:/dev/venvs/312/Scripts/basilisp"` +- kbd:[M-x add-dir-local-variable] +- Mode or subdirectory: `clojure-mode` +- Add directory-local variable: `cider-basilisp-command` +- Add cider-basilisp-command with value: `"c:/dev/venvs/312/Scripts/basilisp"` This should result to updating or creating a `.dir-local.el` file like below @@ -83,15 +93,15 @@ This should result to updating or creating a `.dir-local.el` file like below ((clojure-mode . ((cider-basilisp-command . "c:/dev/venvs/312/Scripts/basilisp")))) ---- -- https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html[Specifying File Variables] +==== 3. https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html[Specifying File Variables] -It is best to put this in the top of your project's `basilisp.edn` file, and always jack-in from there +It is best to put this in the top of your project's `basilisp.edn` file, and always jack-in from there. -For example, setting `cider-basilisp-command` to start basilisp from within a virtual environment +For example, setting `cider-basilisp-command` to start basilisp from within a virtual environment: -kbd:[M-x add-dir-local-variable] -Add file-local variable: `cider-basilisp-command` -Add cider-basilisp-command with value: `"c:/dev/venvs/312/Scripts/basilisp"` +- kbd:[M-x add-dir-local-variable] +- Add file-local variable: `cider-basilisp-command` +- Add cider-basilisp-command with value: `"c:/dev/venvs/312/Scripts/basilisp"` This will result in the following in `basilisp.edn` From c8c43815c1d3f9559db72e3dca35c05724f50e8f Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sun, 2 Jun 2024 17:02:43 +0000 Subject: [PATCH 159/212] Change how docstring is formatted in ClojureDocs buffer --- cider-clojuredocs.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cider-clojuredocs.el b/cider-clojuredocs.el index 50e7620a7..3ce5594ce 100644 --- a/cider-clojuredocs.el +++ b/cider-clojuredocs.el @@ -116,9 +116,12 @@ opposite of what that option dictates." (let ((arglists (nrepl-dict-get dict "arglists"))) (dolist (arglist arglists) (insert (format " [%s]\n" arglist))) - (insert "\n") - (insert (nrepl-dict-get dict "doc")) - (insert "\n")) + (when-let* ((doc (nrepl-dict-get dict "doc")) + ;; As this is a literal docstring from the source code and + ;; there are two spaces at the beginning of lines in docstrings, + ;; we remove them to make it align nicely in ClojureDocs buffer. + (doc (replace-regexp-in-string "\n " "\n" doc))) + (insert "\n" doc "\n"))) (insert "\n== See Also\n\n") (if-let ((see-alsos (nrepl-dict-get dict "see-alsos"))) (dolist (see-also see-alsos) From 1fcc6d29ff889e226e6e0a5ab201b02bba6f0551 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sun, 2 Jun 2024 17:15:26 +0000 Subject: [PATCH 160/212] Change how buttons are formatted in ClojureDocs buffer --- cider-clojuredocs.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cider-clojuredocs.el b/cider-clojuredocs.el index 3ce5594ce..c2b10cd1a 100644 --- a/cider-clojuredocs.el +++ b/cider-clojuredocs.el @@ -125,11 +125,13 @@ opposite of what that option dictates." (insert "\n== See Also\n\n") (if-let ((see-alsos (nrepl-dict-get dict "see-alsos"))) (dolist (see-also see-alsos) - (insert-text-button (format "* %s\n" see-also) + (insert "* ") + (insert-text-button see-also 'sym see-also 'action (lambda (btn) (cider-clojuredocs-lookup (button-get btn 'sym))) - 'help-echo (format "Press Enter or middle click to jump to %s" see-also))) + 'help-echo (format "Press Enter or middle click to jump to %s" see-also)) + (insert "\n")) (insert "Not available\n")) (insert "\n== Examples\n\n") (if-let ((examples (nrepl-dict-get dict "examples"))) From 9c1975ee67d080bc768046b698251a02f4422a17 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Tue, 4 Jun 2024 23:38:18 +0000 Subject: [PATCH 161/212] Refactor code used to insert sections into ClojureDocs buffer --- cider-clojuredocs.el | 93 ++++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 33 deletions(-) diff --git a/cider-clojuredocs.el b/cider-clojuredocs.el index c2b10cd1a..cfdda9ad3 100644 --- a/cider-clojuredocs.el +++ b/cider-clojuredocs.el @@ -109,42 +109,69 @@ opposite of what that option dictates." (goto-char (point-min)) (current-buffer))) +(defun cider-clojuredocs--insert-overview (dict) + "Insert \"Overview\" section based on data from DICT." + (insert (format "= %s/%s\n" + (nrepl-dict-get dict "ns") + (nrepl-dict-get dict "name"))) + (newline) + (when-let ((arglists (nrepl-dict-get dict "arglists"))) + (dolist (arglist arglists) + (insert (format " [%s]\n" arglist))) + (newline)) + (when-let* ((doc (nrepl-dict-get dict "doc")) + ;; As this is a literal docstring from the source code and + ;; there are two spaces at the beginning of lines in docstrings, + ;; we remove them to make it align nicely in ClojureDocs buffer. + (doc (replace-regexp-in-string "\n " "\n" doc))) + (insert doc "\n") + (newline))) + +(defun cider-clojuredocs--insert-see-also (dict) + "Insert \"See Also\" section based on data from DICT." + (insert "== See Also\n") + (newline) + (if-let ((see-alsos (nrepl-dict-get dict "see-alsos"))) + (dolist (see-also see-alsos) + (insert "* ") + (insert-text-button see-also + 'sym see-also + 'action (lambda (btn) + (cider-clojuredocs-lookup (button-get btn 'sym))) + 'help-echo (format "Press Enter or middle click to jump to %s" see-also)) + (insert "\n")) + (insert "Not available\n")) + (newline)) + +(defun cider-clojuredocs--insert-examples (dict) + "Insert \"Examples\" section based on data from DICT." + (insert "== Examples\n") + (newline) + (if-let ((examples (nrepl-dict-get dict "examples"))) + (dolist (example examples) + (insert (cider-font-lock-as-clojure example) "\n") + (insert "-------------------------------------------------\n")) + (insert "Not available\n")) + (newline)) + +(defun cider-clojuredocs--insert-notes (dict) + "Insert \"Notes\" section based on data from DICT." + (insert "== Notes\n") + (newline) + (if-let ((notes (nrepl-dict-get dict "notes"))) + (dolist (note notes) + (insert note "\n") + (insert "-------------------------------------------------\n")) + (insert "Not available\n")) + (newline)) + (defun cider-clojuredocs--content (dict) "Generate a nice string from DICT." (with-temp-buffer - (insert "= " (nrepl-dict-get dict "ns") "/" (nrepl-dict-get dict "name") "\n\n") - (let ((arglists (nrepl-dict-get dict "arglists"))) - (dolist (arglist arglists) - (insert (format " [%s]\n" arglist))) - (when-let* ((doc (nrepl-dict-get dict "doc")) - ;; As this is a literal docstring from the source code and - ;; there are two spaces at the beginning of lines in docstrings, - ;; we remove them to make it align nicely in ClojureDocs buffer. - (doc (replace-regexp-in-string "\n " "\n" doc))) - (insert "\n" doc "\n"))) - (insert "\n== See Also\n\n") - (if-let ((see-alsos (nrepl-dict-get dict "see-alsos"))) - (dolist (see-also see-alsos) - (insert "* ") - (insert-text-button see-also - 'sym see-also - 'action (lambda (btn) - (cider-clojuredocs-lookup (button-get btn 'sym))) - 'help-echo (format "Press Enter or middle click to jump to %s" see-also)) - (insert "\n")) - (insert "Not available\n")) - (insert "\n== Examples\n\n") - (if-let ((examples (nrepl-dict-get dict "examples"))) - (dolist (example examples) - (insert (cider-font-lock-as-clojure example)) - (insert "\n-------------------------------------------------\n")) - (insert "Not available\n")) - (insert "\n== Notes\n\n") - (if-let ((notes (nrepl-dict-get dict "notes"))) - (dolist (note notes) - (insert note) - (insert "\n-------------------------------------------------\n")) - (insert "Not available\n")) + (cider-clojuredocs--insert-overview dict) + (cider-clojuredocs--insert-see-also dict) + (cider-clojuredocs--insert-examples dict) + (cider-clojuredocs--insert-notes dict) (buffer-string))) (defun cider-clojuredocs-lookup (sym) From feb8af556f19ceb735b7969aa4c24cf0ed9ff668 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Fri, 7 Jun 2024 17:34:44 +0000 Subject: [PATCH 162/212] Tweak docstring of cider-sync-request:clojuredocs-lookup --- cider-clojuredocs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider-clojuredocs.el b/cider-clojuredocs.el index cfdda9ad3..85ebca8de 100644 --- a/cider-clojuredocs.el +++ b/cider-clojuredocs.el @@ -40,7 +40,7 @@ (defconst cider-clojuredocs-buffer "*cider-clojuredocs*") (defun cider-sync-request:clojuredocs-lookup (ns sym) - "Perform nREPL \"resource\" op with NS and SYM." + "Perform nREPL \"clojuredocs-lookup\" op with NS and SYM." (thread-first `("op" "clojuredocs-lookup" "ns" ,ns "sym" ,sym) From 09d3dd40415f8c16d243be22400d351ba9f3abef Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Fri, 7 Jun 2024 17:35:28 +0000 Subject: [PATCH 163/212] Tweak docstrings of cider-var-info and cider-member-info --- cider-client.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cider-client.el b/cider-client.el index 99e66844b..0ae4025bd 100644 --- a/cider-client.el +++ b/cider-client.el @@ -548,7 +548,7 @@ Used only when the info nREPL middleware is not available." var-info)) (defun cider-var-info (var &optional all) - "Return VAR's info as an alist with list cdrs. + "Return info for VAR as an nREPL dict. When multiple matching vars are returned you'll be prompted to select one, unless ALL is truthy." (when (and var (not (string= var ""))) @@ -559,7 +559,7 @@ unless ALL is truthy." (if all var-info (cider--var-choice var-info))))) (defun cider-member-info (class member) - "Return the CLASS MEMBER's info as an alist with list cdrs." + "Return info for MEMBER of CLASS as an nREPL dict." (when (and class member) (cider-sync-request:info nil class member (cider-completion-get-context t)))) From 78cff168ac780d0e40d1514147acf985900a1984 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sat, 8 Jun 2024 15:45:35 +0000 Subject: [PATCH 164/212] Split cider-docstring--dumb-trim into two single-purpose functions --- cider-doc.el | 3 ++- cider-docstring.el | 26 ++++++++++++++++---------- cider-eldoc.el | 4 +++- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/cider-doc.el b/cider-doc.el index 88a4ac17f..addfdeb82 100644 --- a/cider-doc.el +++ b/cider-doc.el @@ -429,7 +429,8 @@ in a COMPACT format is specified, FOR-TOOLTIP if specified." (fetched-doc (nrepl-dict-get info "doc")) (doc (or rendered-fragments (if compact - (cider-docstring--dumb-trim fetched-doc) + (cider-docstring--trim + (cider-docstring--format fetched-doc)) fetched-doc) (unless compact "Not documented."))) diff --git a/cider-docstring.el b/cider-docstring.el index 0b3ceebaa..6a176631f 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -28,6 +28,7 @@ (require 'cl-lib) (require 'shr) +(require 'subr-x) (defsubst cider--render-pre* (dom) "Render DOM nodes, formatting them them as Java if they are strings." @@ -139,27 +140,32 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m second-attempt first-attempt))) -(defun cider-docstring--dumb-trim (s &optional n) +(defun cider-docstring--trim (s &optional n) "Returns up to the first N lines of string S, adding \"...\" if trimming was necessary. -N defaults to `cider-docstring-max-lines'. - -Also performs some bare-bones formatting, cleaning up some common whitespace issues." +N defaults to `cider-docstring-max-lines'." (when s - (let* ((s (replace-regexp-in-string "\\. " ".\n\n" s)) ;; improve the formatting of e.g. clojure.core/reduce - (n (or n cider-docstring-max-lines)) + (let* ((n (or n cider-docstring-max-lines)) (lines (split-string s "\n")) (lines-length (length lines)) (selected-lines (cl-subseq lines 0 (min n lines-length))) + (result (string-join selected-lines "\n"))) + (if (> lines-length n) + (concat result "...") + result)))) + +(defun cider-docstring--format (s) + "Performs formatting of S, cleaning up some common whitespace issues." + (when s + (let* ((s (replace-regexp-in-string "\\. " ".\n\n" s)) ;; improve the formatting of e.g. clojure.core/reduce + (lines (split-string s "\n")) (result (mapconcat (lambda (f) ;; Remove spaces at the beginning of each line, as it is common in many clojure.core defns: (replace-regexp-in-string "\\`[ ]+" "" f)) - selected-lines + lines "\n"))) - (if (> lines-length n) - (concat result "...") - result)))) + result))) (provide 'cider-docstring) ;;; cider-docstring.el ends here diff --git a/cider-eldoc.el b/cider-eldoc.el index f0ceeec8b..4c094b06c 100644 --- a/cider-eldoc.el +++ b/cider-eldoc.el @@ -218,7 +218,9 @@ information." (symbol (lax-plist-get eldoc-info "symbol")) (docstring (or (cider--render-docstring-first-sentence eldoc-info) (cider--render-docstring eldoc-info) - (cider-docstring--dumb-trim (lax-plist-get eldoc-info "docstring")))) + (cider-docstring--trim + (cider-docstring--format + (lax-plist-get eldoc-info "docstring"))))) ;; if it's a single class (and not multiple class candidates), that's it (maybe-class (car (lax-plist-get eldoc-info "class"))) (formatted-var (or (when maybe-class From 4dc4d39567eb736397fec6864c4668c582762371 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sat, 8 Jun 2024 16:06:13 +0000 Subject: [PATCH 165/212] Refactor cider-docstring--trim --- cider-docstring.el | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/cider-docstring.el b/cider-docstring.el index 6a176631f..be8c59aa5 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -27,6 +27,7 @@ ;;; Code: (require 'cl-lib) +(require 'seq) (require 'shr) (require 'subr-x) @@ -140,20 +141,14 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m second-attempt first-attempt))) -(defun cider-docstring--trim (s &optional n) - "Returns up to the first N lines of string S, +(cl-defun cider-docstring--trim (string &optional (max-lines cider-docstring-max-lines)) + "Returns up to the first MAX-LINES lines of string STRING, adding \"...\" if trimming was necessary. -N defaults to `cider-docstring-max-lines'." - (when s - (let* ((n (or n cider-docstring-max-lines)) - (lines (split-string s "\n")) - (lines-length (length lines)) - (selected-lines (cl-subseq lines 0 (min n lines-length))) - (result (string-join selected-lines "\n"))) - (if (> lines-length n) - (concat result "...") - result)))) +MAX-LINES defaults to `cider-docstring-max-lines'." + (let* ((lines (split-string string "\n")) + (string (string-join (seq-take lines max-lines) "\n"))) + (concat string (when (> (length lines) max-lines) "...")))) (defun cider-docstring--format (s) "Performs formatting of S, cleaning up some common whitespace issues." From 873cbdd2e442607b10cd2f5455954ca27ebfe200 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sat, 8 Jun 2024 16:11:11 +0000 Subject: [PATCH 166/212] Tweak docstring of cider-docstring--trim --- cider-docstring.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cider-docstring.el b/cider-docstring.el index be8c59aa5..b8b3b5f9d 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -142,10 +142,7 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m first-attempt))) (cl-defun cider-docstring--trim (string &optional (max-lines cider-docstring-max-lines)) - "Returns up to the first MAX-LINES lines of string STRING, -adding \"...\" if trimming was necessary. - -MAX-LINES defaults to `cider-docstring-max-lines'." + "Return MAX-LINES of STRING, adding \"...\" if trimming was necessary." (let* ((lines (split-string string "\n")) (string (string-join (seq-take lines max-lines) "\n"))) (concat string (when (> (length lines) max-lines) "...")))) From 61a615d051e435ea5272e3ac991517d194037cff Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sat, 8 Jun 2024 16:51:15 +0000 Subject: [PATCH 167/212] Refactor cider-docstring--format --- cider-docstring.el | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/cider-docstring.el b/cider-docstring.el index b8b3b5f9d..be45f2ded 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -147,17 +147,15 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m (string (string-join (seq-take lines max-lines) "\n"))) (concat string (when (> (length lines) max-lines) "...")))) -(defun cider-docstring--format (s) - "Performs formatting of S, cleaning up some common whitespace issues." - (when s - (let* ((s (replace-regexp-in-string "\\. " ".\n\n" s)) ;; improve the formatting of e.g. clojure.core/reduce - (lines (split-string s "\n")) - (result (mapconcat (lambda (f) - ;; Remove spaces at the beginning of each line, as it is common in many clojure.core defns: - (replace-regexp-in-string "\\`[ ]+" "" f)) - lines - "\n"))) - result))) +(defun cider-docstring--format (string) + "Performs formatting of STRING, cleaning up some common whitespace issues." + (let* ((string (replace-regexp-in-string "\\. " ".\n\n" string)) ;; improve the formatting of e.g. clojure.core/reduce + (string (mapconcat (lambda (line) + ;; Remove spaces at the beginning of each line, as it is common in many clojure.core defns: + (replace-regexp-in-string "\\`[ ]+" "" line)) + (split-string string "\n") + "\n"))) + string)) (provide 'cider-docstring) ;;; cider-docstring.el ends here From fd84fad37dcc97ada838bbd5ac6617c949345242 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sat, 8 Jun 2024 16:53:41 +0000 Subject: [PATCH 168/212] Tweak docstring of cider-docstring--format --- cider-docstring.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider-docstring.el b/cider-docstring.el index be45f2ded..007bb0a8b 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -148,7 +148,7 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m (concat string (when (> (length lines) max-lines) "...")))) (defun cider-docstring--format (string) - "Performs formatting of STRING, cleaning up some common whitespace issues." + "Return a nicely formatted STRING to be displayed to the user." (let* ((string (replace-regexp-in-string "\\. " ".\n\n" string)) ;; improve the formatting of e.g. clojure.core/reduce (string (mapconcat (lambda (line) ;; Remove spaces at the beginning of each line, as it is common in many clojure.core defns: From e25977ecc30adab15364291754ee317edf2a9cb4 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 10 Jun 2024 18:25:21 +0300 Subject: [PATCH 169/212] Pick a codename for the next release --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index 70dcbae64..b166e833d 100644 --- a/cider.el +++ b/cider.el @@ -96,7 +96,7 @@ (defconst cider-version "1.15.0-snapshot" "The current version of CIDER.") -(defconst cider-codename "Verona" +(defconst cider-codename "Cogne" "Codename used to denote stable releases.") (defcustom cider-lein-command From c29de81b50161b2cde35e784ed8e94dbd7d10019 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 10 Jun 2024 19:03:14 +0300 Subject: [PATCH 170/212] Release CIDER 1.15 ("Cogne") --- CHANGELOG.md | 2 ++ cider.el | 4 ++-- doc/antora.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcaf9bcd3..809dc9d09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master (unreleased) +## 1.15.0 (2024-06-10) + ### New features - [#3692](https://github.com/clojure-emacs/cider/pull/3692): Add ability to switch view modes in the ispector (bound to `v`). diff --git a/cider.el b/cider.el index b166e833d..d0ba96641 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.15.0-snapshot +;; Version: 1.15.0 ;; Package-Requires: ((emacs "26") (clojure-mode "5.19") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.15.0-snapshot" +(defconst cider-version "1.15.0" "The current version of CIDER.") (defconst cider-codename "Cogne" diff --git a/doc/antora.yml b/doc/antora.yml index fd9dacd59..5a9304229 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: ~ +version: 1.15 nav: - modules/ROOT/nav.adoc From 6e0defa7321d07f705614c84aa9e6a53239006b8 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 10 Jun 2024 19:04:04 +0300 Subject: [PATCH 171/212] Reset the docs version --- doc/antora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/antora.yml b/doc/antora.yml index 5a9304229..fd9dacd59 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: 1.15 +version: ~ nav: - modules/ROOT/nav.adoc From 63a6b0b2ff161981df769c2e1509f5e6dc769d92 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 10 Jun 2024 19:06:01 +0300 Subject: [PATCH 172/212] Bump the injected nREPL version --- CHANGELOG.md | 1 + cider.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 809dc9d09..dc28970f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - [#3691](https://github.com/clojure-emacs/cider/pull/3691): Deprecate `cider-sync-request:inspect-set-*` functions in favor of generic `inspect-refresh` op. - Bump the injected `cider-nrepl` to [0.49.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0490-2024-06-02). +- Bump the injected nREPL version to 1.2.0. ### Bugs fixed diff --git a/cider.el b/cider.el index d0ba96641..227edc9e9 100644 --- a/cider.el +++ b/cider.el @@ -542,7 +542,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.2.0-beta2" +(defcustom cider-injected-nrepl-version "1.2.0" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." From 528d0916bb77977c737b72bb5c5919c53da0d736 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 10 Jun 2024 19:41:37 +0300 Subject: [PATCH 173/212] Add the standard changelog sections for next release --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc28970f1..130722bfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## master (unreleased) +### New features + +### Changes + +### Bugs fixed + ## 1.15.0 (2024-06-10) ### New features From f5928ebe49f26fb16f607251c1f59496a1a79eda Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 10 Jun 2024 19:56:40 +0300 Subject: [PATCH 174/212] Fix a typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 130722bfb..50373ce2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ ### New features -- [#3692](https://github.com/clojure-emacs/cider/pull/3692): Add ability to switch view modes in the ispector (bound to `v`). +- [#3692](https://github.com/clojure-emacs/cider/pull/3692): Add ability to switch view modes in the inspector (bound to `v`). - [#3693](https://github.com/clojure-emacs/cider/pull/3693): Add `cider-enable-nrepl-jvmti-agent` defcustom to enable loading native nREPL JVMTI agent which restores thread stop ability on Java 21+. ### Changes From 3ab27097424c08a381d3046f09dca8be8bb444b6 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Tue, 11 Jun 2024 04:39:33 +0000 Subject: [PATCH 175/212] [Fix #3615] Show progress when evaluating files using `cider-load-all-files` (#3714) Show progress in echo area while recursively evaluating files in directory using cider-load-all-files. As I've noticed that messages from evaluations keep popping up, so it's very hard to see progress message, I've used inhibit-message around cider-load-file. One possible downside of this is that error messages are not displayed as well (though it will be really hard to notice some error message while messages pop up one after the other). Also, I've tweaked the prompt of cider-load-all-files because it might not be clear how files are loaded as the word "beneath" is ambiguous (it may mean one level of depth which is not the case). --- CHANGELOG.md | 2 ++ cider-eval.el | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50373ce2e..7de93bb2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Changes +- [#3714](https://github.com/clojure-emacs/cider/pull/3714): Show progress when evaluating files using `cider-load-all-files`. + ### Bugs fixed ## 1.15.0 (2024-06-10) diff --git a/cider-eval.el b/cider-eval.el index 7325abde7..0a422fe43 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -1839,9 +1839,15 @@ all ns aliases and var mappings from the namespace before reloading it." Useful when the running nREPL on remote host. When UNDEF-ALL is non-nil or called with \\[universal-argument], removes all ns aliases and var mappings from the namespaces being reloaded" - (interactive "DLoad files beneath directory: \nP") - (mapcar (lambda (file) (cider-load-file file undef-all)) - (directory-files-recursively directory "\\.clj[cs]?$"))) + (interactive "DRecursively load files in directory: \nP") + (let* ((files (directory-files-recursively directory "\\.clj[cs]?$")) + (reporter (make-progress-reporter "Loading files" 0 (length files)))) + (seq-do-indexed (lambda (file idx) + (let ((inhibit-message t)) + (cider-load-file file undef-all)) + (progress-reporter-update reporter (1+ idx) file)) + files) + (progress-reporter-done reporter))) (defalias 'cider-eval-file #'cider-load-file "A convenience alias as some people are confused by the load-* names.") From 738f393ec1264d7fbb269580964b7229cc7eb063 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sun, 9 Jun 2024 20:45:39 +0000 Subject: [PATCH 176/212] Change the way cider-docstring--format performs formatting --- cider-docstring.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cider-docstring.el b/cider-docstring.el index 007bb0a8b..965ead993 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -149,13 +149,10 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m (defun cider-docstring--format (string) "Return a nicely formatted STRING to be displayed to the user." - (let* ((string (replace-regexp-in-string "\\. " ".\n\n" string)) ;; improve the formatting of e.g. clojure.core/reduce - (string (mapconcat (lambda (line) - ;; Remove spaces at the beginning of each line, as it is common in many clojure.core defns: - (replace-regexp-in-string "\\`[ ]+" "" line)) - (split-string string "\n") - "\n"))) - string)) + ;; As this is a literal docstring from the source code and + ;; there are two spaces at the beginning of lines in docstrings, + ;; we remove them to make it align nicely when it is displayed. + (replace-regexp-in-string "\n " "\n" string)) (provide 'cider-docstring) ;;; cider-docstring.el ends here From 39ed6711580a5bf2b4ecf8ee6d09b2c452672f95 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Sun, 9 Jun 2024 20:50:28 +0000 Subject: [PATCH 177/212] Refactor cider-clojuredocs to use cider-docstring--format --- cider-clojuredocs.el | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cider-clojuredocs.el b/cider-clojuredocs.el index 85ebca8de..bfe8800de 100644 --- a/cider-clojuredocs.el +++ b/cider-clojuredocs.el @@ -25,16 +25,16 @@ ;;; Code: +(require 'subr-x) +(require 'url-vars) + (require 'cider-client) (require 'cider-common) -(require 'subr-x) +(require 'cider-docstring) (require 'cider-popup) (require 'cider-util) - (require 'nrepl-dict) -(require 'url-vars) - (defconst cider-clojuredocs-url "https://clojuredocs.org/") (defconst cider-clojuredocs-buffer "*cider-clojuredocs*") @@ -120,10 +120,7 @@ opposite of what that option dictates." (insert (format " [%s]\n" arglist))) (newline)) (when-let* ((doc (nrepl-dict-get dict "doc")) - ;; As this is a literal docstring from the source code and - ;; there are two spaces at the beginning of lines in docstrings, - ;; we remove them to make it align nicely in ClojureDocs buffer. - (doc (replace-regexp-in-string "\n " "\n" doc))) + (doc (cider-docstring--format doc))) (insert doc "\n") (newline))) From 451f72e07d21beef30800a5ed6cacc7a6d737401 Mon Sep 17 00:00:00 2001 From: Kato Muso Date: Mon, 10 Jun 2024 23:45:48 +0000 Subject: [PATCH 178/212] Tweak docstring of cider-docstring--format and remove redundant comment --- cider-docstring.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cider-docstring.el b/cider-docstring.el index 965ead993..65742169e 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -148,10 +148,14 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m (concat string (when (> (length lines) max-lines) "...")))) (defun cider-docstring--format (string) - "Return a nicely formatted STRING to be displayed to the user." - ;; As this is a literal docstring from the source code and - ;; there are two spaces at the beginning of lines in docstrings, - ;; we remove them to make it align nicely when it is displayed. + "Return a nicely formatted STRING to be displayed to the user. + +We need to format the docstring before displaying it to the user +because it is obtained from the source code. For example, this means +that it usually has two spaces before each line used for indentation +\(see https://guide.clojure.style/#docstring-indentation). While displaying +the docstring to the user, we usually want to control indentation and +other aspects of the presentation, so we format it before displaying." (replace-regexp-in-string "\n " "\n" string)) (provide 'cider-docstring) From 54641395b606657c60c55ed4238e0d700d2b5ca4 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Tue, 11 Jun 2024 07:50:18 +0800 Subject: [PATCH 179/212] Improve performance of nrepl-dict-get Avoid full traversal of dict in 2-argument call --- nrepl-dict.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nrepl-dict.el b/nrepl-dict.el index f1846d473..dadf41f7f 100644 --- a/nrepl-dict.el +++ b/nrepl-dict.el @@ -66,9 +66,12 @@ If dict is nil, return nil. If DEFAULT not provided, and KEY not in DICT, return nil. If DICT is not an nREPL dict object, an error is thrown." (when dict (if (nrepl-dict-p dict) - (if (nrepl-dict-contains dict key) - (lax-plist-get (cdr dict) key) - default) + ;; Note: The structure of the following expression avoids the + ;; expensive containment check in nearly all cases, see #3717 + (or (lax-plist-get (cdr dict) key) + (when default + (and (not (nrepl-dict-contains dict key)) + default))) (error "Not an nREPL dict object: %s" dict)))) (defun nrepl-dict-put (dict key value) From 4b1710595f88c3fed5f29d69af96a7444dae480b Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Tue, 11 Jun 2024 07:50:36 +0800 Subject: [PATCH 180/212] Deprecate 3-argument call to nrepl-dict-get Calling the function with 3 arguments will continue to work, but raise a warning during byte compilation. --- nrepl-dict.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nrepl-dict.el b/nrepl-dict.el index dadf41f7f..a408d1362 100644 --- a/nrepl-dict.el +++ b/nrepl-dict.el @@ -61,14 +61,20 @@ whose car is KEY. Comparison is done with `equal'." (member key (nrepl-dict-keys dict))) (defun nrepl-dict-get (dict key &optional default) - "Get from DICT value associated with KEY, optional DEFAULT if KEY not in DICT. -If dict is nil, return nil. If DEFAULT not provided, and KEY not in DICT, -return nil. If DICT is not an nREPL dict object, an error is thrown." + "Get from DICT value associated with KEY. +If DICT is nil, return nil. +If DICT is not an nREPL dict object, an error is thrown. + +If KEY is not in DICT, return DEFAULT (if provided). +Note that the use of DEFAULT is deprecated and will be +removed in a future release." + (declare (advertised-calling-convention (dict key) "1.16")) (when dict (if (nrepl-dict-p dict) ;; Note: The structure of the following expression avoids the ;; expensive containment check in nearly all cases, see #3717 (or (lax-plist-get (cdr dict) key) + ;; TODO: remove DEFAULT argument and the following clause (when default (and (not (nrepl-dict-contains dict key)) default))) From 9db0ceecc19e77c2c461f2889a53d944da4eccfb Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Tue, 11 Jun 2024 07:37:37 +0800 Subject: [PATCH 181/212] Add details to nrepl-dict commentary --- nrepl-dict.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nrepl-dict.el b/nrepl-dict.el index a408d1362..0b56f2ab4 100644 --- a/nrepl-dict.el +++ b/nrepl-dict.el @@ -28,7 +28,8 @@ ;;; Commentary: ;; ;; Provides functions to interact with and create `nrepl-dict's. These are -;; simply plists with an extra element at the head. +;; simply plists with an extra element at the head, and using `equal' for +;; comparison of string keys. ;;; Code: (require 'cl-lib) @@ -199,7 +200,7 @@ If NO-JOIN is given, return the first non nil dict." (t `(,dict1 ,dict2))))) -;;; Dbind +;;; Destructuring-bind of string keys (defmacro nrepl-dbind-response (response keys &rest body) "Destructure an nREPL RESPONSE dict. Bind the value of the provided KEYS and execute BODY." From abe972ad9f256972940d503a64b1012d21561146 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Tue, 11 Jun 2024 07:40:48 +0800 Subject: [PATCH 182/212] Inline nrepl-dict predicates --- nrepl-dict.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nrepl-dict.el b/nrepl-dict.el index 0b56f2ab4..d8daeb5cf 100644 --- a/nrepl-dict.el +++ b/nrepl-dict.el @@ -45,12 +45,11 @@ (maphash (lambda (k v) (nrepl-dict-put dict k v)) hash) dict)) -(defun nrepl-dict-p (object) +(defsubst nrepl-dict-p (object) "Return t if OBJECT is an nREPL dict." - (and (listp object) - (eq (car object) 'dict))) + (eq (car-safe object) 'dict)) -(defun nrepl-dict-empty-p (dict) +(defsubst nrepl-dict-empty-p (dict) "Return t if nREPL dict DICT is empty." (null (cdr dict))) From 105da319b09a436552f1b3c6194cbbc833017dd2 Mon Sep 17 00:00:00 2001 From: yuhan0 Date: Tue, 11 Jun 2024 08:05:13 +0800 Subject: [PATCH 183/212] Modify changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7de93bb2b..06efd7fc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Changes - [#3714](https://github.com/clojure-emacs/cider/pull/3714): Show progress when evaluating files using `cider-load-all-files`. +- [#3713](https://github.com/clojure-emacs/cider/pull/3713): Optimize `nrepl-dict-get` and deprecate its 3-argument arity. ### Bugs fixed From 20f9a8f97cd01bc1bc8d064e653863ccc17d6d8b Mon Sep 17 00:00:00 2001 From: Naoya Yamashita Date: Sat, 29 Jun 2024 15:24:19 +0900 Subject: [PATCH 184/212] Remove duplicate keybinding (#3719) This keybinding was first introduced in the commit[1]. There are two lines of keybindings to `C-c C-q`, probably due to a simple mistake. [1]: 6a9bc1cc05a4e393b31c5dfb79c70179fb3233f4 --- CHANGELOG.md | 1 + cider-connection.el | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06efd7fc5..ef5e653db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - [#3714](https://github.com/clojure-emacs/cider/pull/3714): Show progress when evaluating files using `cider-load-all-files`. - [#3713](https://github.com/clojure-emacs/cider/pull/3713): Optimize `nrepl-dict-get` and deprecate its 3-argument arity. +- [#3719](https://github.com/clojure-emacs/cider/pull/3719): Clean duplicate define-key ### Bugs fixed diff --git a/cider-connection.el b/cider-connection.el index a72e014e5..35a8f2f04 100644 --- a/cider-connection.el +++ b/cider-connection.el @@ -631,7 +631,6 @@ REPL defaults to the current REPL." (define-key map (kbd "j d") #'cider-describe-connection) (define-key map (kbd "j i") #'cider-describe-connection) (define-key map (kbd "C-c C-q") #'cider-quit) - (define-key map (kbd "C-c C-q") #'cider-quit) (define-key map (kbd "C-c C-r") #'cider-restart) (define-key map (kbd "C-c M-r") #'cider-restart) (define-key map (kbd "C-c C-d") #'cider-describe-connection) From d2c87b749d7280c4ea7335214648563f1f8f1b08 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Sun, 30 Jun 2024 17:42:01 +0300 Subject: [PATCH 185/212] Use cider-nrepl 0.49.1 --- CHANGELOG.md | 2 + cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 4 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 38 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef5e653db..27a137859 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ - [#3714](https://github.com/clojure-emacs/cider/pull/3714): Show progress when evaluating files using `cider-load-all-files`. - [#3713](https://github.com/clojure-emacs/cider/pull/3713): Optimize `nrepl-dict-get` and deprecate its 3-argument arity. - [#3719](https://github.com/clojure-emacs/cider/pull/3719): Clean duplicate define-key +- Bump the injected `cider-nrepl` to [0.49.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0491-2024-06-30). + - Reduces the minimal supported Clojure version to 1.10.0 (from 1.10.3). ### Bugs fixed diff --git a/cider.el b/cider.el index 227edc9e9..ab216d7b2 100644 --- a/cider.el +++ b/cider.el @@ -573,7 +573,7 @@ the artifact.") Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.") -(defconst cider-required-middleware-version "0.49.0" +(defconst cider-required-middleware-version "0.49.1" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index 01dc35412..ef10c499f 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.49.0"]]) + :plugins [[cider/cider-nrepl "0.49.1"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index edf9464f5..9e4f59935 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.49.0"] + :plugins [[cider/cider-nrepl "0.49.1"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 1898d017a..dfb365475 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.49.0"]] +:plugins [[cider/cider-nrepl "0.49.1"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.49.0"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.49.1"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.49.0"]]) + concat '[[cider/cider-nrepl "0.49.1"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.0"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.1"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.49.0"} + cider/cider-nrepl {:mvn/version "0.49.1"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.49.0' + devImplementation 'cider:cider-nrepl:0.49.1' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 0baa0666e..8b5f679e7 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.1.2"} cider/cider-nrepl {:mvn/version "0.49.0"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.2.0"} cider/cider-nrepl {:mvn/version "0.49.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -350,7 +350,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.49.0"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.49.1"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index b676e9883..46ab79c05 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.49.0"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.49.1"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index a7cdf1eca..7c94014e9 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -60,8 +60,8 @@ or in `build.gradle`: [source, groovy] ---- dependencies { - devImplementation 'nrepl:nrepl:1.1.2' - devImplementation 'cider:cider-nrepl:0.49.0' + devImplementation 'nrepl:nrepl:1.2.0' + devImplementation 'cider:cider-nrepl:0.49.1' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index b61669491..d332a392d 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.49.0") + (setq-local cider-injected-middleware-version "0.49.1") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t) @@ -155,7 +155,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -169,7 +169,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -182,7 +182,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -196,7 +196,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.0") + (shell-quote-argument "cider/cider-nrepl:0.49.1") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -206,7 +206,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.1") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -223,7 +223,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -237,7 +237,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.0") + (shell-quote-argument "cider/cider-nrepl:0.49.1") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -259,7 +259,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -271,7 +271,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.0") + (shell-quote-argument "cider/cider-nrepl:0.49.1") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -280,7 +280,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.0") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.1") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -295,14 +295,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.49.0")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.49.1")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.49.0"))) + :to-equal '(("cider/cider-nrepl" "0.49.1"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -331,7 +331,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.49.0") + ("cider/cider-nrepl" "0.49.1") ("mx.cider/lein-enrich-classpath" "1.19.3"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -342,7 +342,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.0\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -361,7 +361,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.0") + (shell-quote-argument "cider/cider-nrepl:0.49.1") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -456,7 +456,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.1\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -471,7 +471,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.1\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -489,7 +489,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -499,7 +499,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Xverify:none -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.0\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -538,7 +538,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.0\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.1\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 810337cee931d9f14aa16550a74516f8337a47f3 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Sun, 30 Jun 2024 17:38:27 +0300 Subject: [PATCH 186/212] Release 1.15.1 --- cider.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cider.el b/cider.el index ab216d7b2..a3d4d61df 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.15.0 +;; Version: 1.15.1 ;; Package-Requires: ((emacs "26") (clojure-mode "5.19") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,7 +93,7 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.15.0" +(defconst cider-version "1.15.1" "The current version of CIDER.") (defconst cider-codename "Cogne" From a6ccb6d9c66ca06353479e8e5f10eb2f7a61c19d Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 2 Jul 2024 19:36:48 +0300 Subject: [PATCH 187/212] Tweak the changelog --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a137859..11ba72139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,15 @@ ### Changes +### Bugs fixed + +## 1.15.1 (2024-07-01) + +### Changes + - [#3714](https://github.com/clojure-emacs/cider/pull/3714): Show progress when evaluating files using `cider-load-all-files`. - [#3713](https://github.com/clojure-emacs/cider/pull/3713): Optimize `nrepl-dict-get` and deprecate its 3-argument arity. -- [#3719](https://github.com/clojure-emacs/cider/pull/3719): Clean duplicate define-key +- [#3719](https://github.com/clojure-emacs/cider/pull/3719): Remove duplicated keybinding. - Bump the injected `cider-nrepl` to [0.49.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0491-2024-06-30). - Reduces the minimal supported Clojure version to 1.10.0 (from 1.10.3). From 8a7fb48c49007b9e3861ea842fa8283f51b95c06 Mon Sep 17 00:00:00 2001 From: Naoya Yamashita Date: Fri, 5 Jul 2024 08:32:10 +0900 Subject: [PATCH 188/212] `cider-docstring--format`: nil-safe (#3722) * call cider-docstring--format after checking argument * use when-let for DRY * add CHANGELOG entry --- CHANGELOG.md | 1 + cider-eldoc.el | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ba72139..1a4a3a0ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - [#3719](https://github.com/clojure-emacs/cider/pull/3719): Remove duplicated keybinding. - Bump the injected `cider-nrepl` to [0.49.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0491-2024-06-30). - Reduces the minimal supported Clojure version to 1.10.0 (from 1.10.3). +- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument ### Bugs fixed diff --git a/cider-eldoc.el b/cider-eldoc.el index 4c094b06c..1137046bb 100644 --- a/cider-eldoc.el +++ b/cider-eldoc.el @@ -218,9 +218,9 @@ information." (symbol (lax-plist-get eldoc-info "symbol")) (docstring (or (cider--render-docstring-first-sentence eldoc-info) (cider--render-docstring eldoc-info) - (cider-docstring--trim - (cider-docstring--format - (lax-plist-get eldoc-info "docstring"))))) + (when-let (docstring (lax-plist-get eldoc-info "docstring")) + (cider-docstring--trim + (cider-docstring--format docstring))))) ;; if it's a single class (and not multiple class candidates), that's it (maybe-class (car (lax-plist-get eldoc-info "class"))) (formatted-var (or (when maybe-class From 5dc096aa98908924d0809e64dc80c57372f3c1ea Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 5 Jul 2024 09:23:23 +0300 Subject: [PATCH 189/212] Move a changelog entry where it belongs --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4a3a0ed..ed5baa009 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ### Bugs fixed +- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument. + ## 1.15.1 (2024-07-01) ### Changes @@ -17,9 +19,6 @@ - [#3719](https://github.com/clojure-emacs/cider/pull/3719): Remove duplicated keybinding. - Bump the injected `cider-nrepl` to [0.49.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0491-2024-06-30). - Reduces the minimal supported Clojure version to 1.10.0 (from 1.10.3). -- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument - -### Bugs fixed ## 1.15.0 (2024-06-10) From 964a17fdc6fc79477319cc3642e178831ec7b325 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 5 Jul 2024 10:28:52 +0300 Subject: [PATCH 190/212] Tweak wording --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5baa009..14a7c5afe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ### Bugs fixed -- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument. +- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument is not nil. ## 1.15.1 (2024-07-01) From 42608a1369760b6e36a86f0a63daa876c8b24e9e Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 11 Jul 2024 16:19:59 +0300 Subject: [PATCH 191/212] Bump the injected nREPL version --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index a3d4d61df..ce5d88b87 100644 --- a/cider.el +++ b/cider.el @@ -542,7 +542,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.2.0" +(defcustom cider-injected-nrepl-version "1.3.0-beta1" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." From fa0e50eef60efcdf1b43268d7662bafb44a14b9e Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 18 Jul 2024 12:13:40 +0300 Subject: [PATCH 192/212] Bump the injected nREPL version to 1.3.0-beta2 --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index ce5d88b87..e126d7008 100644 --- a/cider.el +++ b/cider.el @@ -542,7 +542,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.3.0-beta1" +(defcustom cider-injected-nrepl-version "1.3.0-beta2" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." From fe98f8c1c9cf49c71640b51c7d66c05e77895048 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 18 Jul 2024 12:14:17 +0300 Subject: [PATCH 193/212] Update the changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14a7c5afe..8b14c96b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Changes +- Bump the injected nREPL version to 1.3. + ### Bugs fixed - [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument is not nil. From c698e1454cb416ad55c739961f9df514da9556f0 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Fri, 19 Jul 2024 23:55:03 +0300 Subject: [PATCH 194/212] Use cider-nrepl 0.49.2 --- CHANGELOG.md | 1 + cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 36 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b14c96b6..0dfaa718c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Changes - Bump the injected nREPL version to 1.3. +- Bump the injected `cider-nrepl` to [0.49.2](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0492-2024-07-19). ### Bugs fixed diff --git a/cider.el b/cider.el index e126d7008..3d68d150c 100644 --- a/cider.el +++ b/cider.el @@ -573,7 +573,7 @@ the artifact.") Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.") -(defconst cider-required-middleware-version "0.49.1" +(defconst cider-required-middleware-version "0.49.2" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index ef10c499f..bd3b61744 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.49.1"]]) + :plugins [[cider/cider-nrepl "0.49.2"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index 9e4f59935..5c7ca4b62 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.49.1"] + :plugins [[cider/cider-nrepl "0.49.2"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index dfb365475..67e41c1fb 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.49.1"]] +:plugins [[cider/cider-nrepl "0.49.2"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.49.1"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.49.2"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.49.1"]]) + concat '[[cider/cider-nrepl "0.49.2"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.1"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.2"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.49.1"} + cider/cider-nrepl {:mvn/version "0.49.2"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.49.1' + devImplementation 'cider:cider-nrepl:0.49.2' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 8b5f679e7..a0b4bf088 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.2.0"} cider/cider-nrepl {:mvn/version "0.49.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.2.0"} cider/cider-nrepl {:mvn/version "0.49.2"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -350,7 +350,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.49.1"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.49.2"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index 46ab79c05..cd6bdd5f8 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.49.1"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.49.2"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index 7c94014e9..2b06bd929 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:1.2.0' - devImplementation 'cider:cider-nrepl:0.49.1' + devImplementation 'cider:cider-nrepl:0.49.2' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index d332a392d..66731117a 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.49.1") + (setq-local cider-injected-middleware-version "0.49.2") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t) @@ -155,7 +155,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -169,7 +169,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -182,7 +182,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -196,7 +196,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.1") + (shell-quote-argument "cider/cider-nrepl:0.49.2") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -206,7 +206,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.1") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.2") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -223,7 +223,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -237,7 +237,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.1") + (shell-quote-argument "cider/cider-nrepl:0.49.2") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -259,7 +259,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -271,7 +271,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.1") + (shell-quote-argument "cider/cider-nrepl:0.49.2") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -280,7 +280,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.1") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.2") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -295,14 +295,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.49.1")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.49.2")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.49.1"))) + :to-equal '(("cider/cider-nrepl" "0.49.2"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -331,7 +331,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.49.1") + ("cider/cider-nrepl" "0.49.2") ("mx.cider/lein-enrich-classpath" "1.19.3"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -342,7 +342,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -361,7 +361,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.1") + (shell-quote-argument "cider/cider-nrepl:0.49.2") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -456,7 +456,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.1\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.2\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -471,7 +471,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.1\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.2\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -489,7 +489,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -499,7 +499,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Xverify:none -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -538,7 +538,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.1\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.2\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 81401810b55dd7a1e935c3f4b05a70734d28758a Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 23 Jul 2024 10:38:04 +0300 Subject: [PATCH 195/212] Bump the injected nREPL to 1.3.0-beta3 --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index 3d68d150c..f307c232a 100644 --- a/cider.el +++ b/cider.el @@ -542,7 +542,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.3.0-beta2" +(defcustom cider-injected-nrepl-version "1.3.0-beta3" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." From 5c1bac297341232d167a6d2beb79c39472597527 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 3 Aug 2024 11:22:36 +0300 Subject: [PATCH 196/212] Bump the injected nREPL to 1.3.0-beta4 --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index f307c232a..b1a1ada80 100644 --- a/cider.el +++ b/cider.el @@ -542,7 +542,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.3.0-beta3" +(defcustom cider-injected-nrepl-version "1.3.0-beta4" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." From 2ca9059a736822161301fdb2d0ad82f045da076f Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 13 Aug 2024 17:46:53 +0300 Subject: [PATCH 197/212] Bump the injected version of nREPL to 1.3.0 --- cider.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cider.el b/cider.el index b1a1ada80..f67bbdd54 100644 --- a/cider.el +++ b/cider.el @@ -542,7 +542,7 @@ Throws an error if PROJECT-TYPE is unknown." "List of dependencies where elements are lists of artifact name and version.") (put 'cider-jack-in-dependencies 'risky-local-variable t) -(defcustom cider-injected-nrepl-version "1.3.0-beta4" +(defcustom cider-injected-nrepl-version "1.3.0" "The version of nREPL injected on jack-in. We inject the newest known version of nREPL just in case your version of Boot or Leiningen is bundling an older one." From 3c8af8b6787245e5dfd6dbb550a0ce8de1df4dcb Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Tue, 13 Aug 2024 21:06:45 +0300 Subject: [PATCH 198/212] Use cider-nrepl 0.49.3 --- CHANGELOG.md | 2 +- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dfaa718c..f50e79da8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### Changes - Bump the injected nREPL version to 1.3. -- Bump the injected `cider-nrepl` to [0.49.2](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0492-2024-07-19). +- Bump the injected `cider-nrepl` to [0.49.3](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0493-2024-08-13). ### Bugs fixed diff --git a/cider.el b/cider.el index f67bbdd54..8e285a7db 100644 --- a/cider.el +++ b/cider.el @@ -573,7 +573,7 @@ the artifact.") Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.") -(defconst cider-required-middleware-version "0.49.2" +(defconst cider-required-middleware-version "0.49.3" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index bd3b61744..5ede67451 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.49.2"]]) + :plugins [[cider/cider-nrepl "0.49.3"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index 5c7ca4b62..d395a3060 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.49.2"] + :plugins [[cider/cider-nrepl "0.49.3"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 67e41c1fb..0b7e82d76 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.49.2"]] +:plugins [[cider/cider-nrepl "0.49.3"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.49.2"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.49.3"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.49.2"]]) + concat '[[cider/cider-nrepl "0.49.3"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.2"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.49.2"} + cider/cider-nrepl {:mvn/version "0.49.3"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.49.2' + devImplementation 'cider:cider-nrepl:0.49.3' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index a0b4bf088..836237292 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.2.0"} cider/cider-nrepl {:mvn/version "0.49.2"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.2.0"} cider/cider-nrepl {:mvn/version "0.49.3"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -350,7 +350,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.49.2"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.49.3"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index cd6bdd5f8..05b5cf93d 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.49.2"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.49.3"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index 2b06bd929..ad2d8317e 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:1.2.0' - devImplementation 'cider:cider-nrepl:0.49.2' + devImplementation 'cider:cider-nrepl:0.49.3' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index 66731117a..77269f232 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.49.2") + (setq-local cider-injected-middleware-version "0.49.3") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t) @@ -155,7 +155,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -169,7 +169,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -182,7 +182,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -196,7 +196,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.2") + (shell-quote-argument "cider/cider-nrepl:0.49.3") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -206,7 +206,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.2") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.3") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -223,7 +223,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -237,7 +237,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.2") + (shell-quote-argument "cider/cider-nrepl:0.49.3") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -259,7 +259,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -271,7 +271,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.2") + (shell-quote-argument "cider/cider-nrepl:0.49.3") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -280,7 +280,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.2") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.3") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -295,14 +295,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.49.2")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.49.3")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.49.2"))) + :to-equal '(("cider/cider-nrepl" "0.49.3"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -331,7 +331,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.49.2") + ("cider/cider-nrepl" "0.49.3") ("mx.cider/lein-enrich-classpath" "1.19.3"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -342,7 +342,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.2\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -361,7 +361,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.2") + (shell-quote-argument "cider/cider-nrepl:0.49.3") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -456,7 +456,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.2\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.3\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -471,7 +471,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.2\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.3\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -489,7 +489,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -499,7 +499,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Xverify:none -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -538,7 +538,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.2\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.3\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From cd4c1180bc5a0379aa1bb94b539cf15341b6c73f Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 15 Aug 2024 10:55:57 +0300 Subject: [PATCH 199/212] [Fix #3733] Remove support for sideloading Sideloading was removed in nREPL 1.3, as it was not particularly useful and never gain any meaningful adoption in the broader Clojure community. --- CHANGELOG.md | 1 + ROADMAP.md | 1 - cider-eval.el | 184 --------------------------------------- cider-repl.el | 2 - test/cider-eval-tests.el | 20 ----- 5 files changed, 1 insertion(+), 207 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f50e79da8..963e4958c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Bump the injected nREPL version to 1.3. - Bump the injected `cider-nrepl` to [0.49.3](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0493-2024-08-13). +- [#3733](https://github.com/clojure-emacs/cider/issues/3733): Remove support for sideloading. (this experimental feature was removed from nREPL 1.3) ### Bugs fixed diff --git a/ROADMAP.md b/ROADMAP.md index 3f6bab656..bcdff55dc 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -49,7 +49,6 @@ There's a bit of info on the subject [here](https://github.com/clojure-emacs/cid ## Implement new nREPL features -* sideloading (there's some experimental support for this) * dynamic middleware loading * ~~completion~~ * ~~lookup~~ diff --git a/cider-eval.el b/cider-eval.el index 0a422fe43..e5a68c464 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -204,190 +204,6 @@ When invoked with a prefix ARG the command doesn't prompt for confirmation." (save-excursion (quit-window nil error-win)))) - -;;; Sideloader -;; -;; nREPL includes sideloader middleware which provides a Java classloader that -;; is able to dynamically load classes and resources at runtime by interacting -;; with the nREPL client (as opposed to using the classpath of the JVM hosting -;; nREPL server). -;; -;; This performs a similar functionality as the load-file -;; operation, where we can load Clojure namespaces (as source files) or Java -;; classes (as bytecode) by simply requiring or importing them. -;; -;; See https://nrepl.org/nrepl/design/middleware.html#sideloading - -(defcustom cider-sideloader-path nil - "List of directories and jar files to scan for sideloader resources. -When not set the cider-nrepl jar will be added automatically when upgrading -an nREPL connection." - :type 'list - :group 'cider - :package-version '(cider . "1.2.0")) - -(defcustom cider-dynload-cider-nrepl-version nil - "Version of the cider-nrepl jar used for dynamically upgrading a connection. -Defaults to `cider-required-middleware-version'." - :type 'string - :group 'cider - :package-version '(cider . "1.2.0")) - -(defun cider-read-bytes (path) - "Read binary data from PATH. -Return the binary data as unibyte string." - ;; based on f-read-bytes - (with-temp-buffer - (set-buffer-multibyte nil) - (setq buffer-file-coding-system 'binary) - (insert-file-contents-literally path nil) - (buffer-substring-no-properties (point-min) (point-max)))) - -(defun cider-retrieve-resource (dirs name) - "Find a resource NAME in a list DIRS of directories or jar files. -Similar to a classpath lookup. Returns the file contents as a string." - (seq-some - (lambda (path) - (cond - ((file-directory-p path) - (let ((expanded (expand-file-name name path))) - (when (file-exists-p expanded) - (cider-read-bytes expanded)))) - ((and (file-exists-p path) (string-suffix-p ".jar" path)) - (cider-jar-retrieve-resource path name)))) - dirs)) - -(defun cider-provide-file (file) - "Provide FILE in a format suitable for sideloading." - (let ((contents (cider-retrieve-resource cider-sideloader-path file))) - (if contents - (base64-encode-string contents 'no-line-breaks) - ;; if we can't find the file we should return an empty string - (base64-encode-string "")))) - -(defun cider-sideloader-lookup-handler () - "Make a sideloader-lookup handler." - (lambda (response) - (nrepl-dbind-response response (id status type name) - (if status - (when (member "sideloader-lookup" status) - (cider-request:sideloader-provide id type name)))))) - -(defun cider-add-middleware-handler (continue) - "Make a add-middleware handler. -CONTINUE is an optional continuation function." - (lambda (response) - (nrepl-dbind-response response (status unresolved-middleware) ;; id middleware - (when unresolved-middleware - (seq-do - (lambda (mw) - (cider-repl-emit-interactive-stderr - (concat "WARNING: middleware " mw " was not found or failed to load.\n"))) - unresolved-middleware)) - (when (and status (member "done" status) continue) - (funcall continue))))) - -(defun cider-request:sideloader-start (&optional connection tooling) - "Perform the nREPL \"sideloader-start\" op. -If CONNECTION is nil, use `cider-current-repl'. -If TOOLING is truthy then the operation is performed over the tooling -session, rather than the regular session." - (cider-ensure-op-supported "sideloader-start") - (cider-nrepl-send-request `("op" "sideloader-start") - (cider-sideloader-lookup-handler) - connection - tooling)) - -(defun cider-request:sideloader-provide (id type file &optional connection) - "Perform the nREPL \"sideloader-provide\" op for ID, TYPE and FILE. -If CONNECTION is nil, use `cider-current-repl'." - (cider-nrepl-send-request `("id" ,id - "op" "sideloader-provide" - "type" ,type - "name" ,file - "content" ,(cider-provide-file file)) - (cider-sideloader-lookup-handler) - connection)) - -(defun cider-sideloader-start (&optional connection) - "Start nREPL's sideloader. -If CONNECTION is nil, use `cider-current-repl'." - (interactive) - (message "Starting nREPL's sideloader") - (cider-request:sideloader-start connection) - (cider-request:sideloader-start connection 'tooling)) - -(defvar cider-nrepl-middlewares - '("cider.nrepl/wrap-apropos" - "cider.nrepl/wrap-classpath" - "cider.nrepl/wrap-clojuredocs" - "cider.nrepl/wrap-complete" - "cider.nrepl/wrap-content-type" - "cider.nrepl/wrap-debug" - "cider.nrepl/wrap-enlighten" - "cider.nrepl/wrap-format" - "cider.nrepl/wrap-info" - "cider.nrepl/wrap-inspect" - "cider.nrepl/wrap-log" - "cider.nrepl/wrap-macroexpand" - "cider.nrepl/wrap-ns" - "cider.nrepl/wrap-out" - "cider.nrepl/wrap-slurp" - "cider.nrepl/wrap-profile" - "cider.nrepl/wrap-refresh" - "cider.nrepl/wrap-resource" - "cider.nrepl/wrap-spec" - "cider.nrepl/wrap-stacktrace" - "cider.nrepl/wrap-test" - "cider.nrepl/wrap-trace" - "cider.nrepl/wrap-tracker" - "cider.nrepl/wrap-undef" - "cider.nrepl/wrap-version" - "cider.nrepl/wrap-xref")) - -(defun cider-request:add-middleware (middlewares - &optional connection tooling continue) - "Use the nREPL dynamic loader to add MIDDLEWARES to the nREPL session. - -- If CONNECTION is nil, use `cider-current-repl'. -- If TOOLING it truthy, use the tooling session instead of the main session. -- CONTINUE is an optional continuation function, which will be called when the -add-middleware op has finished successfully." - (cider-nrepl-send-request `("op" "add-middleware" - "middleware" ,middlewares) - (cider-add-middleware-handler continue) - connection - tooling)) - -(defun cider-add-cider-nrepl-middlewares (&optional connection) - "Use dynamic loading to add the cider-nrepl middlewares to nREPL. -If CONNECTION is nil, use `cider-current-repl'." - (cider-request:add-middleware - cider-nrepl-middlewares connection nil - (lambda () - ;; When the main session is done adding middleware, then do the tooling - ;; session. At this point all the namespaces have been sideloaded so this - ;; is faster, we don't want these to race to sideload resources. - (cider-request:add-middleware - cider-nrepl-middlewares connection 'tooling - (lambda () - ;; Ask nREPL again what its capabilities are, so we know which new - ;; operations are supported. - (nrepl--init-capabilities (or connection (cider-current-repl)))))))) - -(defvar cider-required-middleware-version) -(defun cider-upgrade-nrepl-connection (&optional connection) - "Sideload cider-nrepl middleware. -If CONNECTION is nil, use `cider-current-repl'." - (interactive) - (when (not cider-sideloader-path) - (setq cider-sideloader-path (list (cider-jar-find-or-fetch - "cider" "cider-nrepl" - (or cider-dynload-cider-nrepl-version - cider-required-middleware-version))))) - (cider-sideloader-start connection) - (cider-add-cider-nrepl-middlewares connection)) - ;;; Dealing with compilation (evaluation) errors and warnings (defun cider-find-property (property &optional backward) diff --git a/cider-repl.el b/cider-repl.el index 675db2e28..9fd17c4f6 100644 --- a/cider-repl.el +++ b/cider-repl.el @@ -1692,7 +1692,6 @@ constructs." (declare-function cider-version "cider") (declare-function cider-test-run-loaded-tests "cider-test") (declare-function cider-test-run-project-tests "cider-test") -(declare-function cider-sideloader-start "cider-eval") (cider-repl-add-shortcut "clear-output" #'cider-repl-clear-output) (cider-repl-add-shortcut "clear" #'cider-repl-clear-buffer) (cider-repl-add-shortcut "clear-banners" #'cider-repl-clear-banners) @@ -1706,7 +1705,6 @@ constructs." (cider-repl-add-shortcut "classpath" #'cider-classpath) (cider-repl-add-shortcut "history" #'cider-repl-history) (cider-repl-add-shortcut "trace-ns" #'cider-toggle-trace-ns) -(cider-repl-add-shortcut "sideloader-start" #'cider-sideloader-start) (cider-repl-add-shortcut "undef" #'cider-undef) (cider-repl-add-shortcut "refresh" #'cider-ns-refresh) (cider-repl-add-shortcut "reload" #'cider-ns-reload) diff --git a/test/cider-eval-tests.el b/test/cider-eval-tests.el index 113012d08..fda7b7a23 100644 --- a/test/cider-eval-tests.el +++ b/test/cider-eval-tests.el @@ -30,26 +30,6 @@ ;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI. -(describe "cider-provide-file" - (let ((tmp-dir (temporary-file-directory))) - (it "returns an empty string when the file is not found" - (expect (cider-provide-file "abc.clj") :to-equal "")) - (it "base64 encodes without newlines" - (let ((cider-sideloader-path (list tmp-dir)) - (default-directory tmp-dir) - (filename (make-temp-file "abc.clj"))) - (with-temp-file filename - (dotimes (_ 60) (insert "x"))) - (expect (cider-provide-file filename) :not :to-match "\n"))) - (it "can handle multibyte characters" - (let ((cider-sideloader-path (list tmp-dir)) - (default-directory tmp-dir) - (filename (make-temp-file "abc.clj")) - (coding-system-for-write 'utf-8-unix)) - (with-temp-file filename - (insert "🍻")) - (expect (cider-provide-file filename) :to-equal "8J+Nuw=="))))) - (describe "cider-extract-error-info" (it "Matches Clojure compilation exceptions" (expect (cider-extract-error-info cider-compilation-regexp "Syntax error compiling clojure.core/let at (src/haystack/analyzer.clj:18:1).\n[1] - failed: even-number-of-forms? at: [:bindings] spec: :clojure.core.specs.alpha/bindings\n") From 144811a819b469cd797c88ec1f24119cfa8454af Mon Sep 17 00:00:00 2001 From: larstvei Date: Sat, 20 Jul 2024 15:17:47 +0200 Subject: [PATCH 200/212] [Fix #3725] Use defvaralias for x-gtk-use-system-tooltips on emacs29 --- cider-mode.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cider-mode.el b/cider-mode.el index ceea16a42..88278276c 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -1062,7 +1062,12 @@ property." ;;; Minor-mode definition -(defvar x-gtk-use-system-tooltips) + +(if (and (> emacs-major-version 28) + (not (boundp 'x-gtk-use-system-tooltips))) + ;; The x-gtk prefix has been dropped in Emacs 29 + (defvaralias 'x-gtk-use-system-tooltips 'use-system-tooltips) + (defvar x-gtk-use-system-tooltips)) ;;;###autoload (define-minor-mode cider-mode From 565f4f6e3a6a5c9c9e616b9e8afd7038dc98ac59 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Wed, 28 Aug 2024 16:43:52 +0300 Subject: [PATCH 201/212] Bump cider-nrepl to 0.50.1 (#3736) * Use cider-nrepl 0.50.1 * Replace clojure.tools.trace with orchard.trace * [ci] Disable parser-next dependent tests on JDK11 --- .github/workflows/test.yml | 4 +- CHANGELOG.md | 4 +- cider-mode.el | 2 +- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 4 +- test/cider-tests.el | 44 +++++++++---------- 11 files changed, 42 insertions(+), 40 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e48e98fa9..30efc5717 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -112,9 +112,9 @@ jobs: # be GH connectivity runner issues. We attempt to address this # problem by rerunning the tests more than once. eldev -p -dtTC test --test-type integration || eldev -p -dtTC test --test-type integration - + - name: Run tests that need enrich-classpath - if: "!startsWith(matrix.os, 'windows')" + if: "!startsWith(matrix.os, 'windows') && (matrix.java_version != '11')" run: | cd dev; ../clojure.sh clojure -M:gen; cd - wc -l test/File.edn diff --git a/CHANGELOG.md b/CHANGELOG.md index 963e4958c..895bf5ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ ### Changes - Bump the injected nREPL version to 1.3. -- Bump the injected `cider-nrepl` to [0.49.3](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0493-2024-08-13). +- Bump the injected `cider-nrepl` to [0.50.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0501-2024-08-28). + * Introduce new backend for CIDER tracing functionality. + * Remove special handling of Boot classpath. - [#3733](https://github.com/clojure-emacs/cider/issues/3733): Remove support for sideloading. (this experimental feature was removed from nREPL 1.3) ### Bugs fixed diff --git a/cider-mode.el b/cider-mode.el index 88278276c..780a77ca2 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -809,7 +809,7 @@ with the given LIMIT." ;; we catch that case too. ;; FIXME: This matches values too, not just keys. (when (seq-find (lambda (k) (and (stringp k) - (string-match (rx "clojure.tools.trace/traced" eos) k))) + (string-match (rx "orchard.trace/traced" eos) k))) meta) (push sym traced)) (when (and do-deprecated (nrepl-dict-get meta "deprecated")) diff --git a/cider.el b/cider.el index 8e285a7db..c08ea43cd 100644 --- a/cider.el +++ b/cider.el @@ -573,7 +573,7 @@ the artifact.") Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.") -(defconst cider-required-middleware-version "0.49.3" +(defconst cider-required-middleware-version "0.50.1" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index 5ede67451..c91d6f04f 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.49.3"]]) + :plugins [[cider/cider-nrepl "0.50.1"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index d395a3060..9cec749ea 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.49.3"] + :plugins [[cider/cider-nrepl "0.50.1"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index 0b7e82d76..d9766b832 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.49.3"]] +:plugins [[cider/cider-nrepl "0.50.1"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.49.3"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.50.1"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.49.3"]]) + concat '[[cider/cider-nrepl "0.50.1"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.49.3"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.50.1"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.49.3"} + cider/cider-nrepl {:mvn/version "0.50.1"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.49.3' + devImplementation 'cider:cider-nrepl:0.50.1' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 836237292..70f17ea44 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.2.0"} cider/cider-nrepl {:mvn/version "0.49.3"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.3.0"} cider/cider-nrepl {:mvn/version "0.50.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -350,7 +350,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.49.3"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.50.1"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index 05b5cf93d..fad330d78 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.49.3"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.50.1"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index ad2d8317e..65c79239f 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -60,8 +60,8 @@ or in `build.gradle`: [source, groovy] ---- dependencies { - devImplementation 'nrepl:nrepl:1.2.0' - devImplementation 'cider:cider-nrepl:0.49.3' + devImplementation 'nrepl:nrepl:1.3.0' + devImplementation 'cider:cider-nrepl:0.50.1' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index 77269f232..a0f864199 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.49.3") + (setq-local cider-injected-middleware-version "0.50.1") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t) @@ -155,7 +155,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -169,7 +169,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -182,7 +182,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -196,7 +196,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.3") + (shell-quote-argument "cider/cider-nrepl:0.50.1") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -206,7 +206,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.3") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.50.1") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -223,7 +223,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -237,7 +237,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.3") + (shell-quote-argument "cider/cider-nrepl:0.50.1") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -259,7 +259,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -271,7 +271,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.3") + (shell-quote-argument "cider/cider-nrepl:0.50.1") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -280,7 +280,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.49.3") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.50.1") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -295,14 +295,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.49.3")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.50.1")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.49.3"))) + :to-equal '(("cider/cider-nrepl" "0.50.1"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -331,7 +331,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.49.3") + ("cider/cider-nrepl" "0.50.1") ("mx.cider/lein-enrich-classpath" "1.19.3"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -342,7 +342,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.49.3\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -361,7 +361,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.49.3") + (shell-quote-argument "cider/cider-nrepl:0.50.1") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -456,7 +456,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.3\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.1\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -471,7 +471,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.3\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.1\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -489,7 +489,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -499,7 +499,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Xverify:none -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.49.3\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -538,7 +538,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.49.3\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.1\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 8fdb53e8be764704f5023fa024d023bffedf5a8b Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Thu, 5 Sep 2024 17:24:15 +0300 Subject: [PATCH 202/212] Bump cider-nrepl to 0.50.2 (#3738) --- CHANGELOG.md | 2 +- cider.el | 2 +- dev/docker-sample-project/project.clj | 2 +- dev/tramp-sample-project/project.clj | 2 +- .../ROOT/pages/basics/middleware_setup.adoc | 12 ++--- .../ROOT/pages/basics/up_and_running.adoc | 4 +- doc/modules/ROOT/pages/cljs/shadow-cljs.adoc | 2 +- .../ROOT/pages/cljs/up_and_running.adoc | 2 +- test/cider-tests.el | 44 +++++++++---------- 9 files changed, 36 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 895bf5ecb..18db4705e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### Changes - Bump the injected nREPL version to 1.3. -- Bump the injected `cider-nrepl` to [0.50.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0501-2024-08-28). +- Bump the injected `cider-nrepl` to [0.50.2](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0502-2024-09-03). * Introduce new backend for CIDER tracing functionality. * Remove special handling of Boot classpath. - [#3733](https://github.com/clojure-emacs/cider/issues/3733): Remove support for sideloading. (this experimental feature was removed from nREPL 1.3) diff --git a/cider.el b/cider.el index c08ea43cd..a8ea1d9b2 100644 --- a/cider.el +++ b/cider.el @@ -573,7 +573,7 @@ the artifact.") Used when `cider-jack-in-auto-inject-clojure' is set to `latest'.") -(defconst cider-required-middleware-version "0.50.1" +(defconst cider-required-middleware-version "0.50.2" "The CIDER nREPL version that's known to work properly with CIDER.") (defcustom cider-injected-middleware-version cider-required-middleware-version diff --git a/dev/docker-sample-project/project.clj b/dev/docker-sample-project/project.clj index c91d6f04f..d640f9933 100644 --- a/dev/docker-sample-project/project.clj +++ b/dev/docker-sample-project/project.clj @@ -2,4 +2,4 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.50.1"]]) + :plugins [[cider/cider-nrepl "0.50.2"]]) diff --git a/dev/tramp-sample-project/project.clj b/dev/tramp-sample-project/project.clj index 9cec749ea..f97ead85d 100644 --- a/dev/tramp-sample-project/project.clj +++ b/dev/tramp-sample-project/project.clj @@ -2,5 +2,5 @@ :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"]] :source-paths ["src"] - :plugins [[cider/cider-nrepl "0.50.1"] + :plugins [[cider/cider-nrepl "0.50.2"] [refactor-nrepl "3.9.0"]]) diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc b/doc/modules/ROOT/pages/basics/middleware_setup.adoc index d9766b832..fc98507fd 100644 --- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc +++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc @@ -32,14 +32,14 @@ Use the convenient plugin for defaults, either in your project's [source,clojure] ---- -:plugins [[cider/cider-nrepl "0.50.1"]] +:plugins [[cider/cider-nrepl "0.50.2"]] ---- A minimal `profiles.clj` for CIDER would be: [source,clojure] ---- -{:repl {:plugins [[cider/cider-nrepl "0.50.1"]]}} +{:repl {:plugins [[cider/cider-nrepl "0.50.2"]]}} ---- WARNING: Be careful not to place this in the `:user` profile, as this way CIDER's @@ -59,7 +59,7 @@ all of their projects using a `~/.boot/profile.boot` file like so: (require 'boot.repl) (swap! boot.repl/*default-dependencies* - concat '[[cider/cider-nrepl "0.50.1"]]) + concat '[[cider/cider-nrepl "0.50.2"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) @@ -76,11 +76,11 @@ run `cider-connect` or `cider-connect-cljs`. [source,clojure] ---- - :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.50.1"}} + :cider-clj {:extra-deps {cider/cider-nrepl {:mvn/version "0.50.2"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]} :cider-cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.339"} - cider/cider-nrepl {:mvn/version "0.50.1"} + cider/cider-nrepl {:mvn/version "0.50.2"} cider/piggieback {:mvn/version "0.5.3"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} @@ -99,7 +99,7 @@ NOTE: Make sure you're using https://github.com/clojurephant/clojurephant[Clojur ---- dependencies { devImplementation 'nrepl:nrepl:0.9.0' - devImplementation 'cider:cider-nrepl:0.50.1' + devImplementation 'cider:cider-nrepl:0.50.2' } tasks.named('clojureRepl') { diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc b/doc/modules/ROOT/pages/basics/up_and_running.adoc index 70f17ea44..f3aeab6c2 100644 --- a/doc/modules/ROOT/pages/basics/up_and_running.adoc +++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc @@ -73,7 +73,7 @@ simple - CIDER simply passes the extra dependencies and nREPL configuration to your build tool in the command it runs to start the nREPL server. Here's how this looks for `tools.deps`: - $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.3.0"} cider/cider-nrepl {:mvn/version "0.50.1"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' + $ clojure -Sdeps '{:deps {nrepl {:mvn/version "1.3.0"} cider/cider-nrepl {:mvn/version "0.50.2"}}}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' TIP: If you don't want `cider-jack-in` to inject dependencies automatically, set `cider-inject-dependencies-at-jack-in` to `nil`. Note that you'll have to setup @@ -350,7 +350,7 @@ It is also possible for plain `clj`, although the command is somewhat longer: [source,sh] ---- -$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.50.1"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" +$ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.50.2"}}}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ---- Alternatively, you can start nREPL either manually or using the facilities diff --git a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc index fad330d78..b66ecbe1a 100644 --- a/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc +++ b/doc/modules/ROOT/pages/cljs/shadow-cljs.adoc @@ -62,7 +62,7 @@ And connect to it with `cider-connect`. ...For that to work, `shadow-cljs.edn` contents like the following are assumed: ```clj - :dependencies [[cider/cider-nrepl "0.50.1"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) + :dependencies [[cider/cider-nrepl "0.50.2"] ;; mandatory (unless it's inherited from deps.edn or otherwise present in the classpath of shadow-cljs's JVM process) [refactor-nrepl/refactor-nrepl "3.9.0"]] ;; refactor-nrepl is optional :nrepl {:middleware [cider.nrepl/cider-middleware ;; it's advisable to explicitly add this middleware. It's automatically added by shadow-cljs (if available in the classpath), unless `:nrepl {:cider false}` diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc b/doc/modules/ROOT/pages/cljs/up_and_running.adoc index 65c79239f..b372f6c8c 100644 --- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc +++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc @@ -61,7 +61,7 @@ or in `build.gradle`: ---- dependencies { devImplementation 'nrepl:nrepl:1.3.0' - devImplementation 'cider:cider-nrepl:0.50.1' + devImplementation 'cider:cider-nrepl:0.50.2' devImplementation 'cider:cider-piggieback:0.5.3' } diff --git a/test/cider-tests.el b/test/cider-tests.el index a0f864199..c82dbe800 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -144,7 +144,7 @@ (describe "when there is a single dependency" (before-each (setq-local cider-injected-nrepl-version "0.9.0") - (setq-local cider-injected-middleware-version "0.50.1") + (setq-local cider-injected-middleware-version "0.50.2") (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t) @@ -155,7 +155,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -169,7 +169,7 @@ "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -182,7 +182,7 @@ :to-equal (concat "update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\" :exclusions [org.clojure/clojure foo.bar/baz]]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -196,7 +196,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.50.1") + (shell-quote-argument "cider/cider-nrepl:0.50.2") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -206,7 +206,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.50.1") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.50.2") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -223,7 +223,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -237,7 +237,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.50.1") + (shell-quote-argument "cider/cider-nrepl:0.50.2") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -259,7 +259,7 @@ :to-equal (concat "-o -U update-in :dependencies conj " (shell-quote-argument "[nrepl/nrepl \"0.9.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -271,7 +271,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.50.1") + (shell-quote-argument "cider/cider-nrepl:0.50.2") " cider.tasks/add-middleware" " -m " (shell-quote-argument "cider.nrepl/cider-middleware") @@ -280,7 +280,7 @@ (expect (cider-inject-jack-in-dependencies "--no-daemon" ":clojureRepl" 'gradle) :to-equal (concat "--no-daemon " "-Pjdk.attach.allowAttachSelf " - (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.50.1") + (shell-quote-argument "-Pdev.clojurephant.jack-in.nrepl=nrepl:nrepl:0.9.0,cider:cider-nrepl:0.50.2") " :clojureRepl " (shell-quote-argument "--middleware=cider.nrepl/cider-middleware"))))) @@ -295,14 +295,14 @@ (setq-local cider-jack-in-nrepl-middlewares '(("refactor-nrepl.middleware/wrap-refactor" :predicate middlewares-predicate) "cider.nrepl/cider-middleware" ("another/middleware")))) (it "includes plugins whose predicates return true" (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.50.1")))) + :to-equal '(("refactor-nrepl" "2.0.0") ("cider/cider-nrepl" "0.50.2")))) (it "includes middlewares whose predicates return true" (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware" "another/middleware"))) (it "ignores plugins whose predicates return false" (spy-on 'plugins-predicate :and-return-value nil) (expect (cider-jack-in-normalized-lein-plugins) - :to-equal '(("cider/cider-nrepl" "0.50.1"))) + :to-equal '(("cider/cider-nrepl" "0.50.2"))) (spy-on 'middlewares-predicate :and-return-value nil) (expect (cider-jack-in-normalized-nrepl-middlewares) :to-equal '("cider.nrepl/cider-middleware" "another/middleware"))) @@ -331,7 +331,7 @@ :and-return-value '("refactor-nrepl.middleware/wrap-refactor" "cider.nrepl/cider-middleware")) (spy-on 'cider-jack-in-normalized-lein-plugins :and-return-value '(("refactor-nrepl" "2.0.0") - ("cider/cider-nrepl" "0.50.1") + ("cider/cider-nrepl" "0.50.2") ("mx.cider/lein-enrich-classpath" "1.19.3"))) (setq-local cider-jack-in-dependencies-exclusions '()) (setq-local cider-enrich-classpath t)) @@ -342,7 +342,7 @@ " -- update-in :plugins conj " (shell-quote-argument "[refactor-nrepl \"2.0.0\"]") " -- update-in :plugins conj " - (shell-quote-argument "[cider/cider-nrepl \"0.50.1\"]") + (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" @@ -361,7 +361,7 @@ " -d " (shell-quote-argument "nrepl/nrepl:0.9.0") " -d " - (shell-quote-argument "cider/cider-nrepl:0.50.1") + (shell-quote-argument "cider/cider-nrepl:0.50.2") " -d " (shell-quote-argument "refactor-nrepl:2.0.0") " cider.tasks/add-middleware" @@ -456,7 +456,7 @@ (setq-local cider-jack-in-dependencies nil) (setq-local cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware")) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.1\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.2\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) @@ -471,7 +471,7 @@ (it "allows specifying custom aliases with `cider-clojure-cli-aliases`" (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.1\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.2\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:dev:test:cider/nrepl") ""))) (setq-local cider-jack-in-dependencies nil) @@ -489,7 +489,7 @@ (it (format "should remove duplicates, yielding the same result (for %S command invocation)" command) ;; repeat the same test for PowerShell too (let ((expected (string-join `("-Sdeps " - ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" + ,(cider--shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}" command) " -M:dev:test:cider/nrepl") ""))) @@ -499,7 +499,7 @@ :to-equal expected)))) (it "handles aliases correctly" (let ((expected (string-join `("-Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -527,7 +527,7 @@ :to-equal expected))))) (it "allows for global options" (let ((expected (string-join `("-J-Xverify:none -Sdeps " - ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.1\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {cider/cider-nrepl {:mvn/version \"0.50.2\"} nrepl/nrepl {:mvn/version \"0.9.0\"}} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:test:cider/nrepl") "")) (deps '(("nrepl/nrepl" "0.9.0")))) @@ -538,7 +538,7 @@ (setq-local cider-jack-in-dependencies '(("org.clojure/tools.deps" (("git/sha" . "6ae2b6f71773de7549d7f22759e8b09fec27f0d9") ("git/url" . "https://github.com/clojure/tools.deps/"))))) (let ((expected (string-join `("clojure -Sdeps " - ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.1\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") + ,(shell-quote-argument "{:deps {nrepl/nrepl {:mvn/version \"0.9.0\"} cider/cider-nrepl {:mvn/version \"0.50.2\"} org.clojure/tools.deps { :git/sha \"6ae2b6f71773de7549d7f22759e8b09fec27f0d9\" :git/url \"https://github.com/clojure/tools.deps/\" }} :aliases {:cider/nrepl {:jvm-opts [\"-Djdk.attach.allowAttachSelf\"], :main-opts [\"-m\" \"nrepl.cmdline\" \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}") " -M:cider/nrepl") ""))) (setq-local cider-allow-jack-in-without-project t) From 87b836f289d5e3935b515eaac2959bd2e1d3ed37 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 9 Sep 2024 22:51:07 +0300 Subject: [PATCH 203/212] Correctly quote allowAttachSelf argument for Leiningen (#3739) --- CHANGELOG.md | 1 + cider.el | 2 +- test/cider-tests.el | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18db4705e..d5bd42e2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ### Bugs fixed - [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument is not nil. +- [#3739](https://github.com/clojure-emacs/cider/pull/3739): Leiningen jack in fails when `cider-enable-nrepl-jvmti-agent` is enabled. ## 1.15.1 (2024-07-01) diff --git a/cider.el b/cider.el index a8ea1d9b2..5f9345a52 100644 --- a/cider.el +++ b/cider.el @@ -823,7 +823,7 @@ removed, LEIN-PLUGINS, LEIN-MIDDLEWARES and finally PARAMS." middleware)) lein-middlewares) (when cider-enable-nrepl-jvmti-agent - `(,(concat "update-in :jvm-opts conj -Djdk.attach.allowAttachSelf")))) + `(,(concat "update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'")))) " -- ") " -- " (if (not cider-enrich-classpath) diff --git a/test/cider-tests.el b/test/cider-tests.el index c82dbe800..1cdbd8817 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -158,7 +158,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") - " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" + " -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -172,7 +172,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") - " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" + " -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -185,7 +185,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") - " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" + " -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -226,7 +226,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") - " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" + " -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) @@ -262,7 +262,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") - " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" + " -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless"))) (it "can concat in a boot project" @@ -345,7 +345,7 @@ (shell-quote-argument "[cider/cider-nrepl \"0.50.2\"]") " -- update-in :plugins conj " (shell-quote-argument "[mx.cider/lein-enrich-classpath \"1.19.3\"]") - " -- update-in :jvm-opts conj -Djdk.attach.allowAttachSelf" + " -- update-in :jvm-opts conj '\"-Djdk.attach.allowAttachSelf\"'" " -- update-in :middleware conj cider.enrich-classpath.plugin-v2/middleware" " -- repl :headless")))) From 76eac5aa634adba9a5b632cfe670467ebe319126 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 24 Sep 2024 09:32:20 +0300 Subject: [PATCH 204/212] Release CIDER 1.16 ("Kherson") --- CHANGELOG.md | 12 ++++++------ cider.el | 6 +++--- doc/antora.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5bd42e2c..96bc14925 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,20 +2,20 @@ ## master (unreleased) -### New features +## 1.16.0 (2024-09-24) ### Changes -- Bump the injected nREPL version to 1.3. +- Bump the injected nREPL version to [1.3](https://github.com/nrepl/nrepl/releases/tag/v1.3.0). +- [#3733](https://github.com/clojure-emacs/cider/issues/3733): Remove support for sideloading. (this experimental feature was removed from nREPL 1.3) - Bump the injected `cider-nrepl` to [0.50.2](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0502-2024-09-03). - * Introduce new backend for CIDER tracing functionality. + * Introduce new backend for CIDER tracing functionality (replacing `tools.trace`). * Remove special handling of Boot classpath. -- [#3733](https://github.com/clojure-emacs/cider/issues/3733): Remove support for sideloading. (this experimental feature was removed from nREPL 1.3) ### Bugs fixed -- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument is not nil. -- [#3739](https://github.com/clojure-emacs/cider/pull/3739): Leiningen jack in fails when `cider-enable-nrepl-jvmti-agent` is enabled. +- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call `cider-docstring--format` after checking argument is not `nil`. +- [#3739](https://github.com/clojure-emacs/cider/pull/3739): Leiningen jack-in fails when `cider-enable-nrepl-jvmti-agent` is enabled. ## 1.15.1 (2024-07-01) diff --git a/cider.el b/cider.el index 5f9345a52..ec5f5f92d 100644 --- a/cider.el +++ b/cider.el @@ -11,7 +11,7 @@ ;; Steve Purcell ;; Maintainer: Bozhidar Batsov ;; URL: https://www.github.com/clojure-emacs/cider -;; Version: 1.15.1 +;; Version: 1.16.0 ;; Package-Requires: ((emacs "26") (clojure-mode "5.19") (parseedn "1.2.1") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1")) ;; Keywords: languages, clojure, cider @@ -93,10 +93,10 @@ (require 'sesman) (require 'package) -(defconst cider-version "1.15.1" +(defconst cider-version "1.16.0" "The current version of CIDER.") -(defconst cider-codename "Cogne" +(defconst cider-codename "Kherson" "Codename used to denote stable releases.") (defcustom cider-lein-command diff --git a/doc/antora.yml b/doc/antora.yml index fd9dacd59..cd2c1b77c 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: ~ +version: 1.16 nav: - modules/ROOT/nav.adoc From 582f5885f8d947be86f2b82b4088b20110da6715 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 24 Sep 2024 09:32:57 +0300 Subject: [PATCH 205/212] Reset the docs version --- doc/antora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/antora.yml b/doc/antora.yml index cd2c1b77c..fd9dacd59 100644 --- a/doc/antora.yml +++ b/doc/antora.yml @@ -2,6 +2,6 @@ name: cider title: CIDER # We always provide version without patch here (e.g. 1.1), # as patch versions should not appear in the docs. -version: 1.16 +version: ~ nav: - modules/ROOT/nav.adoc From a38a92c7f814efaeb247c3bccca1c11a8dccc519 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 24 Sep 2024 09:53:38 +0300 Subject: [PATCH 206/212] [Docs] Update the compatibility matrix --- doc/modules/ROOT/pages/about/compatibility.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/modules/ROOT/pages/about/compatibility.adoc b/doc/modules/ROOT/pages/about/compatibility.adoc index a0304a1a1..f8ea78c5d 100644 --- a/doc/modules/ROOT/pages/about/compatibility.adoc +++ b/doc/modules/ROOT/pages/about/compatibility.adoc @@ -182,6 +182,20 @@ Below you can find the official compatibility matrix for CIDER. | 8 | 1.10 +| 1.15 +| 26.1 +| 1.0 +| 0.49 +| 8 +| 1.10 + +| 1.16 +| 26.1 +| 1.0 +| 0.50 +| 8 +| 1.10 + |=== TIP: You can also check the requirements of a particular CIDER version by inspecting From 0b70bf86ef726dd8947b9fdfd459e805a2487c89 Mon Sep 17 00:00:00 2001 From: Martin Kavalar Date: Tue, 24 Sep 2024 21:46:17 +0200 Subject: [PATCH 207/212] Restore syntax highlighting in result minibuffer --- CHANGELOG.md | 4 ++++ cider-overlays.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96bc14925..39ec0d575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Bugs fixed + +- [#3742](https://github.com/clojure-emacs/cider/issues/3742): Restore syntax highlighting in result minibuffer. + ## 1.16.0 (2024-09-24) ### Changes diff --git a/cider-overlays.el b/cider-overlays.el index 81c36e29e..511f89a19 100644 --- a/cider-overlays.el +++ b/cider-overlays.el @@ -317,7 +317,7 @@ focused." :where point :duration cider-eval-result-duration :prepend-face (or overlay-face 'cider-result-overlay-face)))) - (msg (format "%s%s" cider-eval-result-prefix value)) + (msg (format "%s%s" cider-eval-result-prefix font-value)) (max-msg-length (* (floor (* (frame-height) max-mini-window-height)) (frame-width))) (msg (if (> (string-width msg) max-msg-length) From 2c6a3c21dc04b28a4dfb328dcc48a7d196eb8efd Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 25 Sep 2024 16:34:19 +0300 Subject: [PATCH 208/212] [Docs] Tweak some wording --- doc/modules/ROOT/pages/debugging/debugger.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/debugging/debugger.adoc b/doc/modules/ROOT/pages/debugging/debugger.adoc index e06cecbf0..3df79dcdd 100644 --- a/doc/modules/ROOT/pages/debugging/debugger.adoc +++ b/doc/modules/ROOT/pages/debugging/debugger.adoc @@ -7,7 +7,7 @@ http://www.gnu.org/software/emacs/manual/html_node/elisp/Edebug.html[Edebug]. Yo image::cider_debugger.gif[CIDER Debugger] WARNING: The debugger **does not** support ClojureScript. -You might want to use https://github.com/jpmonettas/cider-storm[Cider Storm] instead. +Check out https://github.com/jpmonettas/cider-storm[Cider Storm] if you need to debug ClojureScript code. == Using the Debugger From be4b4acb6d32cb32118fc46042ab07184c194b37 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 25 Sep 2024 16:40:28 +0300 Subject: [PATCH 209/212] [Docs] Document cider-result-use-clojure-font-lock --- doc/modules/ROOT/pages/usage/code_evaluation.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/modules/ROOT/pages/usage/code_evaluation.adoc b/doc/modules/ROOT/pages/usage/code_evaluation.adoc index a2f21dc45..60340e8a7 100644 --- a/doc/modules/ROOT/pages/usage/code_evaluation.adoc +++ b/doc/modules/ROOT/pages/usage/code_evaluation.adoc @@ -183,6 +183,16 @@ Set this variable to `nil` to disable it. NOTE: CIDER uses internally the excellent package https://github.com/Malabarba/spinner.el[spinner.el]. +=== Syntax Highlighting of Results + +By default the results of interactive evaluation (both those displayed in the minibuffer and in overlays) are font-locked as Clojure code. +You can disable this by tweaking the configuration option `cider-result-use-clojure-font-lock`: + +[source,lisp] +---- +(setq cider-result-use-clojure-font-lock nil) +---- + === Overlays When you evaluate code in Clojure files, the result is displayed in the buffer From e51ebbc19c5b29515e4799de38b43b2ed0aa77f3 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Wed, 9 Oct 2024 14:59:52 +0300 Subject: [PATCH 210/212] [docstring] Don't crash if string doc is nil --- CHANGELOG.md | 1 + cider-docstring.el | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39ec0d575..f5ab81717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Bugs fixed - [#3742](https://github.com/clojure-emacs/cider/issues/3742): Restore syntax highlighting in result minibuffer. +- [#3747](https://github.com/clojure-emacs/cider/issues/3747): Fix errors when docstring is nil. ## 1.16.0 (2024-09-24) diff --git a/cider-docstring.el b/cider-docstring.el index 65742169e..2ff46e1e4 100644 --- a/cider-docstring.el +++ b/cider-docstring.el @@ -143,9 +143,10 @@ Prioritize rendering as much as possible while staying within `cider-docstring-m (cl-defun cider-docstring--trim (string &optional (max-lines cider-docstring-max-lines)) "Return MAX-LINES of STRING, adding \"...\" if trimming was necessary." - (let* ((lines (split-string string "\n")) - (string (string-join (seq-take lines max-lines) "\n"))) - (concat string (when (> (length lines) max-lines) "...")))) + (when string + (let* ((lines (split-string string "\n")) + (string (string-join (seq-take lines max-lines) "\n"))) + (concat string (when (> (length lines) max-lines) "..."))))) (defun cider-docstring--format (string) "Return a nicely formatted STRING to be displayed to the user. From ced9f25cb67fe1fca32f04f77a8ef7c114ccc4e5 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Wed, 9 Oct 2024 11:39:36 +0300 Subject: [PATCH 211/212] [completion] Fix custom completion style and make it default for fuzzy matching --- CHANGELOG.md | 4 ++ cider-completion.el | 41 ++++++++++++++++--- .../ROOT/pages/usage/code_completion.adoc | 19 ++++----- 3 files changed, 49 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5ab81717..e52b14906 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Changes + +- [#3746](https://github.com/clojure-emacs/cider/issues/3746): Bring back `cider` completion style for activating backend-driven completion. + ### Bugs fixed - [#3742](https://github.com/clojure-emacs/cider/issues/3742): Restore syntax highlighting in result minibuffer. diff --git a/cider-completion.el b/cider-completion.el index 8e9271454..b06899333 100644 --- a/cider-completion.el +++ b/cider-completion.el @@ -256,6 +256,14 @@ in the buffer." ;; Fuzzy completion for company-mode +(defun cider-completion-try-completion (string collection pred _) + "Return longest common substring of all completions of STRING in COLLECTION, +also pass PRED to `try-completion'. + +This function is only needed to be a correct citizen in +`completion-styles-alist'." + (try-completion string collection pred)) + (defun cider-company-unfiltered-candidates (string &rest _) "Return CIDER completion candidates for STRING as is, unfiltered." (cider-complete string)) @@ -268,17 +276,40 @@ in the buffer." ;; which introduced `cider-company-enable-fuzzy-completion') (add-to-list 'completion-styles-alist '(cider - cider-company-unfiltered-candidates + cider-completion-try-completion cider-company-unfiltered-candidates "CIDER backend-driven completion style.")) (defun cider-company-enable-fuzzy-completion () - "Enable backend-driven fuzzy completion in the current buffer. + "Enables `cider' completion style for CIDER in all buffers. -DEPRECATED: please use `cider-enable-flex-completion' instead." - (setq-local completion-styles '(cider))) +DEPRECATED: please use `cider-enable-cider-completion-style' instead." + (interactive) + (cider-enable-cider-completion-style)) + +(defun cider-enable-cider-completion-style () + "Enables `cider' completion style for CIDER in all buffers. -(make-obsolete 'cider-company-enable-fuzzy-completion 'cider-enable-flex-completion "1.8.0") +This style supports non-prefix completion candidates returned by the +completion backend. Only affects the `cider' completion category." + (interactive) + (let* ((cider (assq 'cider completion-category-overrides)) + (found-styles (assq 'styles cider)) + (new-styles (if found-styles + (cons 'styles (cons 'cider (cdr found-styles))) + '(styles cider basic))) + (new-cider (if cider + (cons 'cider + (cons new-styles + (seq-remove (lambda (x) (equal 'styles (car x))) + (cdr cider)))) + (list 'cider new-styles))) + (new-overrides (cons new-cider + (seq-remove (lambda (x) (equal 'cider (car x))) + completion-category-overrides)))) + (setq completion-category-overrides new-overrides))) + +(make-obsolete 'cider-company-enable-fuzzy-completion 'cider-enable-cider-completion-style "1.17.0") (defun cider-enable-flex-completion () "Enables `flex' (fuzzy) completion for CIDER in all buffers. diff --git a/doc/modules/ROOT/pages/usage/code_completion.adoc b/doc/modules/ROOT/pages/usage/code_completion.adoc index 9665b99c7..e354b587f 100644 --- a/doc/modules/ROOT/pages/usage/code_completion.adoc +++ b/doc/modules/ROOT/pages/usage/code_completion.adoc @@ -41,9 +41,12 @@ CIDER defines a specialized completion category through the `cider-complete-at-p added to `completion-at-point-functions`, establishing a dedicated completion category named `cider`. -The CIDER completion at point function supports most completion styles, including -`partial-completion`, `orderless` and `flex` (read more below). - +The CIDER completion at point function supports most completion styles, +including `partial-completion`, `orderless` and `flex`. It also supports a +custom completion style that is confusingly named `cider` too. Activating it +provides a richer set of completion candidates (see +xref:usage/code_completion.adoc#fuzzy-candidate-matching[fuzzy candidate +matching]). Sometimes the user may want to use a different completion style just for the CIDER complete at point function. That can be achieved by setting @@ -58,8 +61,6 @@ complete at point function. The following snippet accomplishes that: This specifies that the `cider` completion category should employ the basic completion style by default. -You can also enable the `flex` completion style by activating xref:usage/code_completion.adoc#fuzzy-candidate-matching[fuzzy candidate matching]. - == Auto-completion While the standard Emacs tooling works just fine, we suggest that @@ -146,15 +147,15 @@ emacs22)` since Emacs 23. For a better description of how those completion styles operates, refer to the official Emacs manual on https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Styles.html[how completion alternatives are chosen]. -CIDER provides a function to enable the `flex` completion style for CIDER-specific +CIDER provides a function to enable the `cider` completion style for CIDER-specific completions. If you wish to enable that, you can add this to your config: [source,lisp] ---- -(cider-enable-flex-completion) +(cider-enable-cider-completion-style) ---- -This adds the `flex` completion style, as introduced in Emacs 27. +This adds the `cider` completion style for CIDER buffers. Now, `company-mode` (and other completion packages like `corfu`) will accept certain fuzziness when matching candidates against the @@ -163,8 +164,6 @@ the possible completion candidates and `cji` will complete to `clojure.java.io`. Different completion examples are shown https://github.com/alexander-yakushev/compliment/wiki/Examples[here]. -NOTE: `cider-company-enable-fuzzy-completion` (now deprecated) should be used for Emacs < 27. - === Completion annotations Completion candidates will be annotated by default with an abbreviation From 7b051c4298816fdb70f3d301f0840379e28eca63 Mon Sep 17 00:00:00 2001 From: Oleksandr Yakushev Date: Mon, 21 Oct 2024 20:57:54 +0300 Subject: [PATCH 212/212] [completion] Use ignore instead of try-completion-function in CIDER completion style (#3750) --- cider-completion.el | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/cider-completion.el b/cider-completion.el index b06899333..1e89adca2 100644 --- a/cider-completion.el +++ b/cider-completion.el @@ -256,14 +256,6 @@ in the buffer." ;; Fuzzy completion for company-mode -(defun cider-completion-try-completion (string collection pred _) - "Return longest common substring of all completions of STRING in COLLECTION, -also pass PRED to `try-completion'. - -This function is only needed to be a correct citizen in -`completion-styles-alist'." - (try-completion string collection pred)) - (defun cider-company-unfiltered-candidates (string &rest _) "Return CIDER completion candidates for STRING as is, unfiltered." (cider-complete string)) @@ -276,7 +268,8 @@ This function is only needed to be a correct citizen in ;; which introduced `cider-company-enable-fuzzy-completion') (add-to-list 'completion-styles-alist '(cider - cider-completion-try-completion + ;; Use `ignore' in place of "try-competion function". + ignore cider-company-unfiltered-candidates "CIDER backend-driven completion style."))