Move jack-in dispatch + user-level commands to cider-jack-in.el#3906
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues the jack-in extraction so cider-jack-in.el now owns the jack-in subsystem end to end:
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.cider--resolve-command,cider--resolve-project-command,cider--resolve-prefix-command.cider--with-cljs-jack-in-depsmoves 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.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
;;;###autoloadcookies on the user-level commands are preserved, soM-x cider-jack-in-cljetc. keep working without explicit require.cider.el drops from 1413 to 1181 lines.
eldev compile --warnings-as-errorseldev test)