Skip to content

Extract ClojureScript REPL creation into cider-cljs.el#3903

Merged
bbatsov merged 1 commit into
masterfrom
extract-cljs
May 10, 2026
Merged

Extract ClojureScript REPL creation into cider-cljs.el#3903
bbatsov merged 1 commit into
masterfrom
extract-cljs

Conversation

@bbatsov
Copy link
Copy Markdown
Member

@bbatsov bbatsov commented May 10, 2026

Pure extraction follow-up to #3902. Moves the ~340-line "ClojureScript REPL creation" section out of cider.el into its own cider-cljs.el module: the cljs-repl registry (cider-cljs-repl-types, cider-register-cljs-repl-type), per-flavor init-form builders (figwheel, figwheel-main, shadow-cljs, krell, custom), requirement checks, the dispatch entry points (cider-cljs-repl-form, cider-verify-cljs-repl-requirements, cider--check-cljs), and cider--offer-to-open-app-in-browser which is used by the cljs jack-in flow.

The cider-register-cljs-repl-type registry was already a clean seam — the few callers from cider.el reach the new file via require, and the new file only needs cider-client and nrepl-dict. No behavior changes.

cider.el drops from 1801 to 1463 lines.

  • Compiles clean with eldev compile --warnings-as-errors
  • All 547 tests pass (eldev test)
  • No CHANGELOG entry — pure refactor with no user-visible change

Move the ~340-line "ClojureScript REPL creation" section out of
cider.el and into its own module.  The new file holds:

- the cljs-repl registry (cider-cljs-repl-types,
  cider-register-cljs-repl-type, cider-default-cljs-repl,
  cider-select-cljs-repl)
- per-flavor helpers and init-form builders
  (cider-shadow-cljs-init-form, cider-figwheel-main-init-form,
  cider-shadow-select-cljs-init-form, cider-custom-cljs-repl-init-form,
  the supporting cider--shadow-* / cider--figwheel-main-* utilities)
- requirement checks (cider-check-figwheel-requirements,
  cider-check-shadow-cljs-requirements, etc., plus the
  ClojureScript/Piggieback presence checks)
- the cljs-repl dispatch entry points cider-cljs-repl-form,
  cider-verify-cljs-repl-requirements, cider--check-cljs
- cider--offer-to-open-app-in-browser, used by the cljs jack-in flow

The cider-register-cljs-repl-type registry was already a clean seam:
the few callers from cider.el (cider--check-cljs, cider-cljs-repl-form,
cider--offer-to-open-app-in-browser) still reach the new file via
require.  cider-cljs.el itself only needs cider-client (for
cider-library-present-p, cider-sync-tooling-eval) and nrepl-dict.

cider.el drops from 1801 to 1463 lines.
@bbatsov bbatsov merged commit 5da43e7 into master May 10, 2026
13 checks passed
@bbatsov bbatsov deleted the extract-cljs branch May 10, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant