Hi James,

James Reeves writes:

> I'm working on a Clojure package manager called Capra, and I need some
> opinions on the syntax for specifying dependencies.

First of all, thanks for the effort you are putting into this missing
and much desired part of Clojure ecosystem.

I have a suggestion, and I hope it is not totally unhelpful. Here it
goes:

How about a system that deduces external dependencies out of (ns ...)
calls from a project, and possibly consults an extra file (e.g.,
./.dependencies) for the whole project that contains information like
below, in order to deduce the version required for the library.

  [org.apache.commons.codec 1.4]
  [org.apache.commons.httpclient 3.1]

If a project imports a library in several files, you should not have
to
explain the version you need in each file, because they are likely to
be
the same.

Additionally, it would be interesting to have a central local
repository
(~/.m2) of installed (fetched) libraries, and deduce library versions
out of there, and create .dependencies automatically (if that file
does
not exist). The user may later modify .dependencies to select another
versions of a library.

Per file assertion of the library version, without the need for an
external .dependencies file is nice for small single file projects /
scripts.  In that case maybe it is possible (by the way of with-ns
'clojure.core), to instruct :import statements to look into meta-data
of
imported libraries:

(ns example
  (:import #^{:version "1.4"}
org.apache.commons.codec.digest.DigestUtils))

Thanks,
Gilaras

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to