nrepl/piggieback

scope "provided" for clojure and clojurescript dependencies

martinklepsch opened this issue · 8 comments

Many projects encounter build problems because piggieback pulls in very old versions of clj and cljs. Would you be open to a PR adding :scope "provided" to these dependencies so they don't interfere with dependency resolution in any way?

Sure, sounds fine to me.

@martinklepsch I guess I should consider adding this to weasel, too. Is this a common thing for tooling packages? (I kind of remember adding :scope "provided" to Weasel's clj and cljs dependencies a while ago, but removing it because I suspected it was causing problems)

Also, I'm still totally clueless (having grown up with Bundler) about the way Maven resolves dependency conflicts, so hey :-)

Oh, yeah, this is what I ended up doing (probably cargo culted, TBH): recommending that folks add Weasel's dependency on clojure as an "exclusion":

nrepl/weasel@8bfeb29

What's the difference to an end user between adding exclusions for piggieback's clj/cljs dependencies, and piggieback depending on those in the "provided" scope?

Yeah, discussing this a bit more with @micha he also noted that really a global exclusion of ClojureScript might be the best way which is similar to what you put in weasels Readme.

Using :scope "provided" would probably fix some of the problems but as @micha described it "only cover up the symptoms".

The alternative would be to bump the dependency on ClojureScript and try to keep that somewhat in sync but this can also cause trouble I assume.

Revisiting issues here; on reflection:

  1. I'll just remove the Clojure dep entirely, it's superfluous.
  2. Until it's necessary because of some requirements on piggieback's part, I see no reason to change the CLJS dep. Every project should have its own CLJS dependency, which will take precedence over piggieback's declaration. Maybe that'll produce Leiningen "pedantic" warnings, but that's a separate topic.

Happy to hear any further comments, suggestions, arguments between now and whenever I land a commit. :-)

Whoops, not sure how I never ended up opening that PR, sorry about that.

You suggestions seem fine 👍

So, I forgot that nREPL still depends on Clojure 1.2.0, so removing the dep here isn't right. Went with the provided scope option after all.