Hi Nikita,

it does sound like a good advice from a dependency perspective. If you don't do 
that clojurescript and all its dependencies leak to projects using your library 
and that's definitively problematic. For clojure/clojurescript projects it's 
even more important to consider that point.

That said clojure/clojurescript are not regular dependency and by defining a 
version you also declare the minimum language features needed by your library.
That's definitively a grey area as both concepts are merged now.

Julien

Le samedi 7 juin 2014 11:08:31 UTC-3, Nikita Beloglazov a écrit :
> Hi
> 
> I have a question about best practice for development clojure/clojurescript 
> libraries.
> Usually you can see following in  project.clj in some library:
> 
> 
> 
> 
> :dependencies [[org.clojure/clojure "1.5.1"]
> 
>                [org.clojure/clojurescript "0.0-2197"]]
> 
> 
> 
> Why not to put clojure and clojurescript deps under :dev profile?  All 
> clojure and clojurescript projects explicitly specify versions of clojure ans 
> clojurescript in their project.clj so I find it reduntant and potentially 
> conflicting to inherit them from library. So why put it library project.clj 
> in the first place?
> 
> 
> 
> So I would suggest to use :dev profile for this:
> 
> 
> 
> :profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]
> 
>                                 [org.clojure/clojurescript "0.0-2197"]]}}}
> 
> 
> Using dev profile means that you have clojure and clojurescript for 
> development but when you release library - the library doesn't depend on them 
> and users get just code without "infrastructure" deps. I see following pros 
> with this approach:
> 
> No potential conflicts between library and project depsReduces confusion like 
> "ah, library depends on clojure 1.6.0, that means it doesn't work with 1.5.1".
> 
> I can't think of cons of this approach. 
> 
> 
> I'd be happy to hear other people opinions on that question.
> 
> 
> Thanks,
> Nikita

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to