Are clojure core alpha namespaces chosen to avoid upgrade conflicts?


#1

Hello!

Browsing throught the source code for tools.deps.alpha, I noticed two things:

  • Package name is with qualified – org.clojure/tools.deps.alpha {:mvn/version "0.6.480"} can co-exist with any org.clojure/tools.deps {:mvn/version "1.0.0"}.
  • Namespaces are qualified. clojure.tools.deps.alpha is defined, but clojure.tools.deps is never defined.

Hypothesis: When tools.deps is to go out of alpha, tools.deps.alpha and tools.deps can co-exist on the classpath in a codebase.

A possible upgrading strategy could be as follows:

  1. Use tools.deps.alpha {:mvn/version "0.6.480"} and ensure that everything works.
  2. Introduce tools.deps {:mvn/version "1.0.0"} without any breakage
  3. Gradually migrate codebase from reliance on tools.deps.alpha to tools.deps
  4. Remove dependency on tools.deps.alpha {:mvn/version "0.6.480"} when migration is complete.

So, are clojure core alpha namespaces chosen to avoid upgrade conflicts? Like with tools.deps and spec. Are there other reasons?

Kind regards,
Teodor


#2

Yes, that’s the idea.


#3

Thanks for the quick reply and the high-quality tooling!


#4

Rich Hickey gave on talk on this subject if you are interested in more background.


#5

Hello, @thheller! You’re right. I watched the talk a year ago, but it didn’t sink in. Since then, I’ve gotten more experience with writing API that others consume, and this time it stuck with me. It’s good to see this explained and exemplified from the core team.
Thanks!