Skip to content
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

Split cider-interaction into smaller libraries #1068

Closed
bbatsov opened this issue Apr 4, 2015 · 8 comments
Closed

Split cider-interaction into smaller libraries #1068

bbatsov opened this issue Apr 4, 2015 · 8 comments
Assignees
Labels

Comments

@bbatsov
Copy link
Member

@bbatsov bbatsov commented Apr 4, 2015

Right now cider-interaction.el is the dumping ground for all sorts of unrelated functionality. It was always my intention for it to exist only temporarily and to be superseded by small more focused libraries.

Not sure when/if I'll get to doing this myself. In the mean time - help is welcome!

@vspinu
Copy link
Contributor

@vspinu vspinu commented Apr 7, 2015

A preliminary proposal here:

  • Move all doc functions into cider-doc.el, possibly with some refactoring
  • Move all completion functionality into cider-completion.el (merge with cider-eldoc.el?)
  • Move low level nrepl interaction functionality into cider-client.el
  • Move repl related stuff into cider-repl.el
  • Leave cider-eval-* and cider-find-* stuff in cider-interaction.el

IMO eldoc is much more related to completion than to documentation and having it together with other completion would make it easier to reuse caching engine if any.

@bbatsov
Copy link
Member Author

@bbatsov bbatsov commented Apr 7, 2015

Move all doc functions into cider-doc.el, possibly with some refactoring

Most of them are already there.

I'd actually prefer a refactoring that would split the library into more autoloadable parts (cider-apropos and cider-eldoc are a good example).

Move all completion functionality into cider-completion.el

Fine by me.

IMO eldoc is much more related to completion than to documentation and having it together with other completion would make it easier to reuse caching engine if any.

There's no longer need for this. Let's keep eldoc as is.

Move repl related stuff into cider-repl.el

This is more or less the case even now.

Leave cider-eval-* and cider-find-* stuff in cider-interaction.el

I'd prefer killing cider-interaction altogether - it can be replaced by something like cider-core and cider-misc. The name is an unfortunately accident - we used to have a mode called nrepl-interaction-mode and when I split the original nrepl.el I called one of the files nrepl-interaction. It was supposed to be a temp setup, but here we are 2 years later. :-)

@cichli
Copy link
Member

@cichli cichli commented Apr 7, 2015

Yep, all makes sense. Including cider-complete-at-point in cider-complete.el will mean that file depends on cider-eldoc.el (needed for cider-company-docsig) - we can just have a tiny cider-capf.el containing the relevant bits for that if we really want to keep them independent.

I'm also not sure if the bits for formatting and tracing are deserving of their own files or they should just go in misc.

I'll start tackling this issue (along with the compilation warnings, see #875) this week.

@vspinu
Copy link
Contributor

@vspinu vspinu commented Apr 7, 2015

it can be replaced by something like cider-core and cider-misc.

These are among the most non-suggestive names I could think of :) At least interaction stands for interacting with the process, and things like "send code to" (aka eval), "set-ns", "fiind var" etc can be easily called interactions.

Over-shattering into small files almost always leads to a nightmare with circular dependencies. Which in turn leads to more "util" files like cider-capf.el proposed by @cichli.

@bbatsov
Copy link
Member Author

@bbatsov bbatsov commented Apr 7, 2015

These are among the most non-suggestive names I could think of :) At least interaction stands for interacting with the process, and things like "send code to" (aka eval), "set-ns", "fiind var" etc can be easily called interactions.

The problem is you can call pretty much everything an interaction. Let's start the splitting and we'll have a better idea what makes sense and what doesn't.

I'm also not sure if the bits for formatting and tracing are deserving of their own files or they should just go in misc.

Formatting probably doesn't need a separate library, but tracing can be extracted I guess (I planned to do so when I added different commands for namespaces and vars).

@bbatsov
Copy link
Member Author

@bbatsov bbatsov commented Apr 7, 2015

One more comment on the topic - we might actually merge cider.el with cider-interaction (or whatever is left from it), as right now cider.el is pretty much an empty shell.

@bbatsov
Copy link
Member Author

@bbatsov bbatsov commented Sep 12, 2015

@cichli You mentioned a while back you planned to work on this. Any progress? With all the ongoing refactoring it'd be nice to fit this in 0.10 as well.

@bbatsov
Copy link
Member Author

@bbatsov bbatsov commented Jul 10, 2016

I'm guessing we can close this, as nothing focused has been done on this front in quite a while.

@bbatsov bbatsov closed this Jul 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.