Thanks Sean!

I've thought about this issue for a while. arrdem suggested a clojars 
search fallback. Maybe someone has pageranked clojure libraries? crossclj?

I agree. The editing is sort of silly, especially for om (well, that m 
looks really expensive to me.. ). Still, there isn't a risk of adding some 
weird library that hasn't been user-approved. I want to address the 
inconvenience by prompting when dependencies aren't found.

In the next feature release, maps will probably be specified like this:

:plz [["my-om-dependencies.edn" :as "foo"] ["my-gui-dependencies.edn" :as 
"bar"]]

Each edn file will look the same, and the merging is still in order (so 
there's still a global map of abbreviations), but then you can do

lein plz add cljs bar

where the cljs dependency comes from the global map (probably merged from 
om-dependencies), and bar includes each dependency in 
"my-gui-dependencies.edn".

When an abbreviation isn't found, there will be some call to the outside 
world (clojars/crossclj search?) for relevant information to display to the 
user, followed by

Which dependency do you want to add? [the-number/s(kip)/q(uit)]

If the dependency corresponding to the-number is added, then:

Do you want to file it to a group? [the-number/c(reate-group)/no]
What abbreviations should it have?

Let me know what you think.

On Monday, August 18, 2014 6:59:08 PM UTC-7, Sean Corfield wrote:
>
> Just wanted to say "thank you!" for this. It certainly is useful!
>
> A possible enhancement: to try to locate and add dependencies that are not 
> known as abbreviations. For example, `lein plz add om` doesn't do anything 
> (and doesn't tell you!) so you have to edit your .edn file and add {om 
> #{"om"}} making the addition of the abbreviation substantially longer than 
> the full dependency name :)
>
> Sean
>
> On Aug 16, 2014, at 5:19 PM, john walker <john.lo...@gmail.com 
> <javascript:>> wrote:
>
> This is a lein plugin that helps you add dependencies to projects pretty 
> quickly. The git repo is here: https://github.com/johnwalker/lein-plz
>
> Basically, you write something like this:
>
>
> lein new foo
> cd foo
> lein plz add cljs async match jdbc
>
> and get this:
>
> (defproject foo "0.1.0-SNAPSHOT"
>   :description "FIXME: write description"
>   :url "http://example.com/FIXME";
>   :license {:name "Eclipse Public License"
>             :url "http://www.eclipse.org/legal/epl-v10.html"}
>   :dependencies [[org.clojure/clojure "1.6.0"]
>                  [org.clojure/clojurescript "0.0-2311"]
>                  [org.clojure/core.async "0.1.319.0-6b1aca-alpha"]
>                  [org.clojure/core.match "0.2.2"]
>                  [org.clojure/java.jdbc "0.3.5"]])
>
> I hope it's useful.
>
>
>

-- 
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