Skip to content

Remove Boot support #3812

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Changes

- [#3782](https://github.com/clojure-emacs/cider/issues/3782): **(Breaking)** Drop official support for Emacs 26.
- [#3812](https://github.com/clojure-emacs/cider/issues/3812): **(Breaking)** Remove support for Boot.
- [#3793](https://github.com/clojure-emacs/cider/issues/3793): **(Breaking)** Remove features that relied on printed exception parsing:
- `cider-stacktrace-analyze-string` and `cider-stacktrace-analyze-at-point` functions.
- Automatic stacktrace parsing in log viewer.
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ install CIDER with the following command:

### Launch an nREPL server and client from Emacs

Simply open in Emacs a file belonging to your `lein`, `tools.deps` or `boot` project (like
Simply open in Emacs a file belonging to your `lein` or `tools.deps` project (like
`foo.clj`) and type <kbd>M-x</kbd> `cider-jack-in`. This will start an nREPL
server with all the project dependencies loaded in and CIDER will automatically
connect to it.
Expand All @@ -82,12 +82,6 @@ You can go to your project's directory in a terminal and type there
$ lein repl
```

Or with Boot:

```
$ boot repl -s wait
```

Alternatively you can start nREPL either manually or by the facilities provided
by your project's build tool (`tools.deps`, Gradle, Maven, etc).

Expand Down
65 changes: 8 additions & 57 deletions cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ By default we favor the project-specific shadow-cljs over the system-wide."
: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-boot-command nil "1.8.0")
(make-obsolete-variable 'cider-boot-parameters nil "1.8.0")
(make-obsolete-variable 'cider-boot-global-options nil "1.8.0")
(make-obsolete-variable 'cider-clojure-cli-global-options 'cider-clojure-cli-parameters "1.8.0")
(make-obsolete-variable 'cider-shadow-cljs-global-options 'cider-shadow-cljs-parameters "1.8.0")
(make-obsolete-variable 'cider-gradle-global-options 'cider-gradle-parameters "1.8.0")
Expand All @@ -300,7 +302,7 @@ By default we favor the project-specific shadow-cljs over the system-wide."
(if (executable-find "clojure") 'clojure-cli 'lein)
"The default tool to use when doing `cider-jack-in' outside a project.
This value will only be consulted when no identifying file types, i.e.
project.clj for leiningen or build.boot for boot, could be found.
project.clj for leiningen or deps.edn for clojure-cli, could be found.

As the Clojure CLI is bundled with Clojure itself, it's the default.
In the absence of the Clojure CLI (e.g. on Windows), we fallback
Expand All @@ -320,7 +322,7 @@ to Leiningen."
nil
"Allow choosing a build system when there are many.
When there are project markers from multiple build systems (e.g. lein and
boot) the user is prompted to select one of them. When non-nil, this
clojure-cli) the user is prompted to select one of them. When non-nil, this
variable will suppress this behavior and will select whatever build system
is indicated by the variable if present. Note, this is only when CIDER
cannot decide which of many build systems to use and will never override a
Expand Down Expand Up @@ -432,7 +434,6 @@ The plist supports the following keys
"Determine the command `cider-jack-in' needs to invoke for the PROJECT-TYPE."
(pcase project-type
('lein cider-lein-command)
('boot cider-boot-command)
('clojure-cli cider-clojure-cli-command)
('babashka cider-babashka-command)
('shadow-cljs cider-shadow-cljs-command)
Expand Down Expand Up @@ -477,7 +478,6 @@ Throws an error if PROJECT-TYPE is unknown."
" "
r)
r)))
('boot (cider--resolve-command cider-boot-command))
('clojure-cli (if (and cider-enrich-classpath
(not (eq system-type 'windows-nt))
(executable-find (cider--get-enrich-classpath-clojure-cli-script)))
Expand Down Expand Up @@ -510,7 +510,6 @@ Throws an error if PROJECT-TYPE is unknown."
"Determine the command line options for `cider-jack-in' for the PROJECT-TYPE."
(pcase project-type
('lein cider-lein-global-options)
('boot cider-boot-global-options)
('clojure-cli cider-clojure-cli-global-options)
('babashka cider-babashka-global-options)
('shadow-cljs cider-shadow-cljs-global-options)
Expand All @@ -527,7 +526,6 @@ Throws an error if PROJECT-TYPE is unknown."
;; Please be careful when changing them.
(pcase project-type
('lein cider-lein-parameters)
('boot cider-boot-parameters)
('clojure-cli cider-clojure-cli-parameters)
('babashka cider-babashka-parameters)
('shadow-cljs cider-shadow-cljs-parameters)
Expand All @@ -545,7 +543,7 @@ Throws an error if PROJECT-TYPE is unknown."
(defcustom cider-injected-nrepl-version "1.3.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."
your version of Leiningen is bundling an older one."
:type 'string
:package-version '(cider . "1.2.0")
:safe #'stringp)
Expand Down Expand Up @@ -692,45 +690,13 @@ returned by this function only contains strings."
(car spec)
spec)))))

(defun cider--list-as-boot-artifact (list)
"Return a boot artifact string described by the elements of LIST.
LIST should have the form (ARTIFACT-NAME ARTIFACT-VERSION). The returned
string is quoted for passing as argument to an inferior shell."
(concat "-d " (shell-quote-argument (format "%s:%s" (car list) (cadr list)))))

(defun cider--jack-in-required-dependencies ()
"Returns the required CIDER deps.
They are normally added to `cider-jack-in-dependencies',
unless it's a Lein project."
`(("nrepl/nrepl" ,cider-injected-nrepl-version)
("cider/cider-nrepl" ,cider-injected-middleware-version)))

(defun cider-boot-dependencies (dependencies)
"Return a list of boot artifact strings created from DEPENDENCIES."
(concat (mapconcat #'cider--list-as-boot-artifact dependencies " ")
(unless (seq-empty-p dependencies) " ")))

(defun cider-boot-middleware-task (params middlewares)
"Create a command to add MIDDLEWARES with corresponding PARAMS."
(concat "cider.tasks/add-middleware "
(mapconcat (lambda (middleware)
(format "-m %s" (shell-quote-argument middleware)))
middlewares
" ")
" " params))

(defun cider-boot-jack-in-dependencies (global-opts params dependencies middlewares)
"Create boot jack-in dependencies.
Does so by concatenating GLOBAL-OPTS, DEPENDENCIES,
and MIDDLEWARES. PARAMS and MIDDLEWARES are passed on to
`cider-boot-middleware-task` before concatenating and DEPENDENCIES
are passed on to `cider-boot-dependencies`."
(concat global-opts
(unless (seq-empty-p global-opts) " ")
"-i \"(require 'cider.tasks)\" " ;; Note the space at the end here
(cider-boot-dependencies (append (cider--jack-in-required-dependencies) dependencies))
(cider-boot-middleware-task params middlewares)))

(defun cider--gradle-dependency-notation (dependency)
"Returns Gradle's GAV dependency syntax.
For a \"group/artifact\" \"version\") DEPENDENCY list
Expand Down Expand Up @@ -959,8 +925,8 @@ See also `cider-jack-in-auto-inject-clojure'."
These are set in `cider-jack-in-dependencies', `cider-jack-in-lein-plugins'
and `cider-jack-in-nrepl-middlewares' are injected from the CLI according
to the used PROJECT-TYPE, and COMMAND if provided. Eliminates the need for
hacking profiles.clj or the boot script for supporting CIDER with its nREPL
middleware and dependencies."
hacking profiles.clj for supporting CIDER with its nREPL middleware and
dependencies."
(pcase project-type
('lein (cider-lein-jack-in-dependencies
global-opts
Expand All @@ -970,12 +936,6 @@ middleware and dependencies."
cider-jack-in-dependencies-exclusions
(cider-jack-in-normalized-lein-plugins)
cider-jack-in-lein-middlewares))
('boot (cider-boot-jack-in-dependencies
global-opts
params
(cider-add-clojure-dependencies-maybe
cider-jack-in-dependencies)
(cider-jack-in-normalized-nrepl-middlewares)))
('clojure-cli (cider-clojure-cli-jack-in-dependencies
global-opts
params
Expand Down Expand Up @@ -1057,12 +1017,6 @@ Generally you should not disable this unless you run into some faulty check."
(unless (cider-library-present-p "weasel.repl.server")
(user-error "Weasel in not available. Please check https://docs.cider.mx/cider/basics/clojurescript/#browser-connected-clojurescript-repl for details")))

(defun cider-check-boot-requirements ()
"Check whether we can start a Boot ClojureScript REPL."
(cider-verify-piggieback-is-present)
(unless (cider-library-present-p "adzerk.boot-cljs-repl")
(user-error "The Boot ClojureScript REPL is not available. Please check https://github.com/adzerk-oss/boot-cljs-repl/blob/master/README.md for details")))

(defun cider-check-krell-requirements ()
"Check whether we can start a Krell ClojureScript REPL."
(cider-verify-piggieback-is-present)
Expand Down Expand Up @@ -1223,8 +1177,6 @@ The supplied string will be wrapped in a do form if needed."
cider-check-node-requirements)
(weasel "(do (require 'weasel.repl.websocket) (cider.piggieback/cljs-repl (weasel.repl.websocket/repl-env :ip \"127.0.0.1\" :port 9001)))"
cider-check-weasel-requirements)
(boot "(do (require 'adzerk.boot-cljs-repl) (adzerk.boot-cljs-repl/start-repl))"
cider-check-boot-requirements)
(shadow cider-shadow-cljs-init-form cider-check-shadow-cljs-requirements)
(shadow-select cider-shadow-select-cljs-init-form cider-check-shadow-cljs-requirements)
(krell "(require '[clojure.edn :as edn]
Expand Down Expand Up @@ -2072,7 +2024,6 @@ Search for lein or java processes including nrepl.command nREPL."
PROJECT-DIR defaults to current project."
(let* ((default-directory (or project-dir (clojure-project-dir (cider-current-dir))))
(build-files '((lein . "project.clj")
(boot . "build.boot")
(clojure-cli . "deps.edn")
(babashka . "bb.edn")
(shadow-cljs . "shadow-cljs.edn")
Expand Down
6 changes: 3 additions & 3 deletions doc/modules/ROOT/pages/basics/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ CIDER officially supports Emacs 27.1+, Java 8+, and Clojure(Script) 1.10+. If
you need to work with earlier versions, check
xref:about/compatibility.adoc#compatibility-matrix[compatibility matrix].

You'll also need a recent version of either the Clojure CLI tools or your
favorite build tool (Leiningen, Boot, or Gradle) to be able to start CIDER via
`cider-jack-in`. Generally it's a good idea to use the latest stable versions.
You'll also need a recent version of your favorite build tool (Clojure CLI,
Leiningen, or Gradle) to be able to start CIDER via `cider-jack-in`. Generally
it's a good idea to use the latest stable versions.

== Installation via package.el

Expand Down
39 changes: 0 additions & 39 deletions doc/modules/ROOT/pages/cljs/other_repls.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,6 @@ documentation lookup, the namespace browser, and macroexpansion).

TIP: For more information on Weasel you should consult its https://github.com/nrepl/weasel/blob/master/README.md[documentation].

== Boot ClojureScript REPL

`boot-cljs` is another browser-connected ClojureScript REPL, that's targeting the Boot build tool.
Internally, it's powered by Weasel. Let's go over the steps required to use it.

. Add this to your dependencies in `build.boot`:
+
[source,clojure]
----
[adzerk/boot-cljs "X.Y.Z" :scope "test"]
[adzerk/boot-cljs-repl "X.Y.Z" :scope "test"]
[pandeiro/boot-http "X.Y.Z" :scope "test"]
[weasel "0.7.1" :scope "test"]
[cider/piggieback "0.5.3" :scope "test"] ; not needed for cider-jack-in-cljs
----
+
and this at the end of `build.boot`:
+
[source,clojure]
----
(require
'[adzerk.boot-cljs :refer [cljs]]
'[adzerk.boot-cljs-repl :refer [cljs-repl]]
'[pandeiro.boot-http :refer [serve]])

(deftask dev []
(comp (serve)
(watch)
(cljs-repl) ; order is important!!
(cljs)))
----
+
. Type kbd:[M-x] `customize-variable` kbd:[RET] `cider-boot-parameters`
and insert `dev`.
. Open a file in your project and type kbd:[M-x] `cider-jack-in-cljs`.
. Connect to the running server with your browser. The address is printed on the terminal, but it's probably `+http://localhost:3000+`.

For more information visit https://github.com/adzerk-oss/boot-cljs-repl[boot-cljs-repl].

== nbb (node.js babashka)

CIDER has built-in support for `nbb`. You can either jack in to an nbb project with `M-x clojure-jack-in-cljs`.
Expand Down
15 changes: 3 additions & 12 deletions doc/modules/ROOT/pages/cljs/up_and_running.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ to connect to an already running nREPL server using
=== Manual Piggieback Setup

To setup piggieback, add the following dependencies to your project
(`project.clj` in a Leiningen based project or `build.boot` in a Boot
project or `deps.edn`):
(`project.clj` or `deps.edn`):

[source,clojure]
----
;; use whatever are the most recent versions here
[cider/piggieback "0.5.3"]
[org.clojure/clojure "1.11.1"]
[cider/piggieback "0.6.0"]
[org.clojure/clojure "1.12.0"]
----

as well as `piggieback` nREPL middleware:
Expand All @@ -38,14 +37,6 @@ in `project.clj`:
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}
----

or in `build.boot`:

[source,clojure]
----
(task-options!
repl {:middleware '[cider.piggieback/wrap-cljs-repl]})
----

or in `deps.edn`:

[source,clojure]
Expand Down
11 changes: 4 additions & 7 deletions doc/modules/ROOT/pages/troubleshooting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ least what's being required).

=== Warning saying you have to use newer nREPL

CIDER currently requires at least nREPL 0.6 to work properly. As nREPL comes
bundled with Leiningen and Boot, from time to time you might have to override the
CIDER currently requires at least nREPL 1.0 to work properly. As nREPL comes
bundled with Leiningen, from time to time you might have to override the
version supplied by them (e.g. if you're forced to use an older version of
Leiningen or there's no release bundling the required nREPL version yet). Leiningen
users can add this to their `profiles.clj` to force the proper dependency:
Expand All @@ -172,8 +172,6 @@ users can add this to their `profiles.clj` to force the proper dependency:
{:repl {:dependencies [[nrepl/nrepl "x.y.z"]]}}
----

The procedure is pretty similar for Boot.

IMPORTANT: Make sure you add the newer nREPL dependency to the `:dependencies` key instead
of `:plugins` (where the `cider-nrepl` Lein plugin resides). That's a pretty common
mistake.
Expand Down Expand Up @@ -230,7 +228,6 @@ in the "Middleware Setup" section.
* Do `C-h v cider-inject-dependencies-at-jack-in`, and check that this variable is non-nil.
* Make sure your project depends on at least Clojure `1.7.0`.
* If you use Leiningen, make sure your `lein --version` is at least `2.9.0`.
* If you use Boot and you've changed `cider-boot-parameters`, that's probably the cause.

If the above doesn't work, you can try specifying the cider-nrepl middleware
manually, as per the
Expand All @@ -242,8 +239,8 @@ in the "Middleware Setup" section.
This means you're manually adding the cider-nrepl middleware in your project,
but you shouldn't do that because `cider-jack-in` already does that for
you. Look into the following files, and ensure you've removed all references to
`cider-nrepl` and `nrepl`: `project.clj`, `build.boot`,
`~/.lein/profiles.clj` and `~/.boot/profile.boot`.
`cider-nrepl` and `nrepl`: `project.clj`, `deps.edn`,
`~/.lein/profiles.clj` and `~/.clojure/deps.edn`.

=== I get some error related to refactor-nrepl on startup

Expand Down
6 changes: 3 additions & 3 deletions doc/modules/ROOT/pages/usage/code_completion.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ keys to cancel the prompt by customizing:

Sometimes, the completion fails to recognize new classes that came with
dependencies that were loaded dynamically after the REPL was started (e.g. via
Boot). Executing `M-x cider-completion-flush-caches` (or going through the menu
`+CIDER Interaction->Misc->Flush completion cache+`) forces the completion backend
to re-read all classes it can find on the classpath.
Clojure 1.12 `add-lib`). Executing `M-x cider-completion-flush-caches` (or going
through the menu `+CIDER Interaction->Misc->Flush completion cache+`) forces the
completion backend to re-read all classes it can find on the classpath.

== Implementation Details

Expand Down
Loading
Loading