Hi, On Monday, June 15, 2015 at 11:05:52 AM UTC+3, Tassilo Horn wrote: > > Juho Teperi <juho....@iki.fi <javascript:>> writes: > > > I have tried to describe how to set Clojure version with Boot > > here: https://github.com/boot-clj/boot/wiki/Setting-Clojure-version > > Yes, I'm using that now, i.e., I set BOOT_CLOJURE_VERSION in > boot.properties. Is there a way to access that from my build.boot so > that I can do something like > > :dependencies `[[org.clojure/clojure > ~(System/getenv "BOOT_CLOJURE_VERSION")] > ...]
> Apparently, that returns nil and so does System/getProperty for > "BOOT_CLOJURE_VERSION" or "boot.clojure.version". > Boot might do this automatically in future. https://github.com/boot-clj/boot/issues/230 > > > It should also explain why the duplication is required. > > Well, it explains why I have to have it in my :dependencies but not why > I also need to have BOOT_CLOJURE_VERSION. Of course, there's a > technical reason in that build.boot's evaluation already requires > clojure to be up and running but it wouldn't be overly complicated to > check if there's a declared clojure dep with just some shell processing. > > While we are at it: why do I also need to pin the boot version when > using a boot.properties? > Technical reasons. Micha is thinking about fixing the implementation so that it allows other Boot env variables and allows leaving out variables you don't want to set. https://github.com/boot-clj/boot/issues/229 > > And what's the thing with :scope "provided"? IIUC, this means that apps > depending on my lib won't incorporate my lib's clojure dep transitively. > But is that really what I want? I mean, I use transducers so some > flavor of clojure 1.7.0 is a strict requirement. I don't really want to > dictate a specific version, i.e., 1.7.0-beta* or later would be fine. > But with :scope "provided" any app depending on my lib would just use > 1.6.0 by default if I understand correctly, and that will simply not > work. With the explicit (non-provided scope) declarations, users are > still able to use whatever clojure 1.7 version they want using > :exclusions, no? > Even if your library has direct dependency to Clojure, there is no assurance that that version will be used. If your lib has Clj 1.7 depenency and the app has dependency to 1.6.0, the app's dependency will be used. It the application doesn't have Clojure dependency first transitive Clojure dependency will be used and there is no knowing what that is (might be e.g. 1.4.0 depending on what library the app has first in dependencies). This page should describe how dependencies are resolved: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html Especially the dependency mediation part under transitive dependencies header. > > Bye, > Tassilo > -- 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.