Extract jack-in dependency injection into cider-jack-in.el#3902
Merged
Conversation
Move the ~400-line "Jack-in dependencies injection" section out of cider.el and into its own module. The new file holds: - the deps/middleware/plugin defvars (cider-jack-in-dependencies, cider-jack-in-lein-plugins, cider-jack-in-nrepl-middlewares, etc.) - per-tool jack-in command builders (cider-lein-jack-in-dependencies, cider-clojure-cli-jack-in-dependencies, cider-gradle-jack-in-dependencies, cider-shadow-cljs-jack-in-dependencies) - inject-fns the tool registry dispatches to (cider--lein-inject-deps, cider--clojure-cli-inject-deps, cider--shadow-cljs-inject-deps, cider--gradle-inject-deps) - shared helpers (cider--shell-quote-argument, cider--powershell-encode-command, cider--combined-aliases, etc.) The recently-added cider-register-jack-in-tool API is the natural seam: tools register an :inject-fn from this file, so cider.el only needs to require cider-jack-in and the registry plumbing keeps working unchanged. The few values cider-jack-in.el reads from cider.el (cider-clojure-cli-*, cider-enable-nrepl-jvmti-agent, cider-jack-in-tools, cider--jack-in-tool) are forward-declared to avoid a circular require. cider.el drops from 2207 to 1801 lines.
3 tasks
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.
Moves the ~400-line "Jack-in dependencies injection" section out of
cider.elinto its owncider-jack-in.elmodule. Pure extraction — no behavior changes, just relocation.The recently-added
cider-register-jack-in-toolAPI made this clean: tool registrations still reference inject-fns by symbol (#'cider--clojure-cli-inject-depsetc.), so the registry plumbing keeps working unchanged. The handful of valuescider-jack-in.elreads fromcider.el(clojure-cli command/aliases, the registry itself) are forward-declared to avoid a circular require.cider.eldrops from 2207 to 1801 lines, and the deps-injection logic now lives in a single focused file rather than buried in the main entry-point module.eldev compile --warnings-as-errorseldev test)