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

Namespace migration #4

Closed
cemerick opened this issue Nov 6, 2017 · 10 comments
Closed

Namespace migration #4

cemerick opened this issue Nov 6, 2017 · 10 comments
Milestone

Comments

@cemerick
Copy link
Collaborator

cemerick commented Nov 6, 2017

As a consequence of #1, it seems necessary to eventually move nREPL out of the clojure.tools.nrepl.* namespaces associated with Clojure Contrib. After all, tools.nrepl may yet be maintained separately from this effort, and no one benefits from same-named namespaces floating around in multiple artifacts.

I see two options:

  1. Cut over to cemerick.nrepl.* namespaces, and stop distributing clojure.tools.nrepl.*-namespaced code from here ASAP.
  2. Move the actual code to cemerick.nrepl.* namespaces, replacing the clojure.tools.nrepl.* namespaces with stubs that use immigrate or similar to ensure API compatibility for downstream tools and libraries. This arrangement can persist for some period of time, eventually moving those stubs into a separate "nrepl-compat" library, that can be added in downstream as needed to provide those clojure.tools.nrepl.* namespaces.

Thoughts?

@cemerick
Copy link
Collaborator Author

cemerick commented Nov 6, 2017

Let me know what you think, @technomancy, @bbatsov, @trptcolin, @cursive-ide?

@cemerick cemerick added this to the 1.0.0 milestone Nov 6, 2017
@cursive-ide
Copy link

I think that option 1 should be fine as long as the wire protocol hasn't changed. That means that the client and server can be upgraded independently, and I don't really see much benefit to keeping them around if the new namespaces are equivalent and it's just a matter of renaming them.

It's been a while, but I don't think there's anything like namespaced keywords or anything else where the nREPL namespaces would leak into the protocol, right?

@trptcolin
Copy link
Contributor

Agreed on option 1.

At first I was thinking the only issues I’d foresee w/ option 1 would be if anybody’s got themselves into a non-repeatable situation w/ version ranges or something like that? But this would be a brand new group/artifact pair anyway, so I don’t see any risk of breakage. And even if it wasn’t, there’s less risk than elsewhere because nrepl is pretty high-level and we’re unlikely to see many transitive dependencies around it.

@cemerick did you have thoughts on arguments in favor of option 2? I guess maybe it saves coordination work for cases like nrepl middleware where you have several libs that need to all depend on the same ns[es]?

@cemerick
Copy link
Collaborator Author

cemerick commented Nov 8, 2017

@cursive-ide No, there's no namespaced keywords in use that I'm aware of.

@trptcolin My sole motivation re: option (2) is to make the transition as painless as possible. A quick sed is about as easy as it gets I guess, so maybe I'm agonizing too much. :-P You're right that middleware authors are going to be most hard-hit.

@trptcolin
Copy link
Contributor

@cemerick: well, middleware users are the real interesting piece, i’d think, since they’ll now have to ensure compatibility among N middlewares. Unfortunately i’m not a middleware user so I can’t give much of an informed opinion here.

@cemerick
Copy link
Collaborator Author

cemerick commented Nov 8, 2017

Users only ever need to e.g. drop a middleware's var name into their project.clj; it's the authors that might be using org.clojure.*-namespaced vars in their middleware descriptors. Or am I missing something?

@trptcolin
Copy link
Contributor

I’m sure @bbatsov has a clearer picture, but i’m talking about dependency versions: if as an end user I have in my profiles.clj (or wherever) e.g.

:plugins [[refactor-nrepl "2.3.1"]
          [cider/cider-nrepl "0.14.0"]]

Then I need to ensure those all line up and are compatible w/ my nrepl variant, including any bumps to lein/boot version.

@bbatsov
Copy link
Contributor

bbatsov commented Nov 8, 2017

Cut over to cemerick.nrepl.* namespaces, and stop distributing clojure.tools.nrepl.*-namespaced code from here ASAP.

That's what I'd advise to do. For me updating our namespaces is going to be trivial. I think the middleware surrounding CIDER + piggieback is probably the bulk of the 3rd party middleware out there and as we have complete control over them the actual migration can happen very fast.

@cemerick
Copy link
Collaborator Author

Well, I guess we have consensus, then.

The plan then: 0.3.0 will contain the clojure.tools.* namespaces as previously discussed on the ML, etc. I think providing a checkpoint release that matches the last tools.nrepl release is important.

The next release (0.4.0, I guess) will switch over namespaces, without any compatibility shims.

Thanks for the feedback 😄

@bbatsov
Copy link
Contributor

bbatsov commented Nov 27, 2017

All of this makes perfect sense to me! 👍

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

No branches or pull requests

4 participants