Skip to content

Move jack-in dispatch + user-level commands to cider-jack-in.el#3906

Merged
bbatsov merged 1 commit into
masterfrom
extract-jack-in-dispatch
May 12, 2026
Merged

Move jack-in dispatch + user-level commands to cider-jack-in.el#3906
bbatsov merged 1 commit into
masterfrom
extract-jack-in-dispatch

Conversation

@bbatsov
Copy link
Copy Markdown
Member

@bbatsov bbatsov commented May 12, 2026

Continues the jack-in extraction so cider-jack-in.el now owns the jack-in subsystem end to end:

  • Registry + dispatch: cider-jack-in-tools, cider-register-jack-in-tool, cider--jack-in-tool, cider--jack-in-tool-command, cider-jack-in-command, cider-jack-in-resolve-command, cider-jack-in-params.
  • Built-in tool registrations for clojure-cli/lein/babashka/shadow-cljs/gradle/nbb/basilisp.
  • Command resolution: cider--resolve-command, cider--resolve-project-command, cider--resolve-prefix-command.
  • The cljs jack-in macro cider--with-cljs-jack-in-deps moves here from cider-cljs.el since it's jack-in machinery that only happens to be cljs-flavored - all the dynamic vars it let-binds live in cider-jack-in.el.
  • User-level commands: cider--start-nrepl-server, cider-jack-in-clj, cider-start-nrepl-server, cider-jack-in-cljs, cider-jack-in-clj&cljs.

cider-jack-in.el and cider-cljs.el now have no cross-requires - each is required independently by cider.el. cider-jack-in.el forward-declares the few symbols it reaches into cider.el (cider--update-params, cider-connect-sibling-{clj,cljs}) and into cider-cljs.el (cider--update-cljs-type, cider--check-cljs); all resolve at runtime once cider.el's requires have completed.

The ;;;###autoload cookies on the user-level commands are preserved, so M-x cider-jack-in-clj etc. keep working without explicit require.

cider.el drops from 1413 to 1181 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

Pull the rest of the jack-in core out of cider.el so cider-jack-in.el
owns the jack-in subsystem end to end:

- registry + dispatch: cider-jack-in-tools, cider-register-jack-in-tool,
  cider--jack-in-tool, cider--jack-in-tool-command, cider-jack-in-command,
  cider-jack-in-resolve-command, cider-jack-in-params.
- built-in tool registrations for clojure-cli/lein/babashka/shadow-cljs/
  gradle/nbb/basilisp.
- command resolution: cider--resolve-command, cider--resolve-project-command,
  cider--resolve-prefix-command.
- the cljs jack-in helper macro cider--with-cljs-jack-in-deps (moved here
  from cider-cljs.el since it's jack-in machinery that only happens to be
  cljs-flavored - all the vars it let-binds live in cider-jack-in.el).
- user-level commands: cider--start-nrepl-server, cider-jack-in-clj,
  cider-start-nrepl-server, cider-jack-in-cljs, cider-jack-in-clj&cljs.

cider-jack-in.el and cider-cljs.el now have no cross-requires; each is
required independently by cider.el.  cider-jack-in.el forward-declares
the few symbols it reaches into cider.el for (cider--update-params,
cider-connect-sibling-clj, cider-connect-sibling-cljs) and into
cider-cljs.el (cider--update-cljs-type, cider--check-cljs).  All these
are resolved at runtime once cider.el has loaded its dependencies.

The ;;;###autoload cookies on cider-jack-in-{clj,cljs,clj&cljs} are
preserved, so M-x dispatch keeps working without explicit require.

cider.el drops from 1413 to 1181 lines.
@bbatsov bbatsov merged commit fc0c0c0 into master May 12, 2026
13 checks passed
@bbatsov bbatsov deleted the extract-jack-in-dispatch branch May 12, 2026 15:50
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