[ANN] Leiningen 2.0.0-preview3

569 views
Skip to first unread message

Phil Hagelberg

unread,
Apr 12, 2012, 1:39:28 PM4/12/12
to clo...@googlegroups.com, lein...@googlegroups.com

Hello folks.

I'm happy to announce the release of the third preview of Leiningen 2.0.0.

Highlights include the ability to show a full dependency tree a la "mvn
dependency:tree", a host of repl improvements, better offline support,
and the ability to load "lein new" templates on-demand.

* Add HTTP nREPL support for repl task via :connect option. (Chas Emerick,
Phil Hagelberg)
* Improve repl startup time, output consistency, Windows support. (Lee Hinman,
Colin Jones)
* Stop using numeric exit codes for task failures.
* Dynamically resolve unknown templates in new task.
* Automatically activate offline profile when needed.
* Honor $http_proxy environment variable. (Juergen Hoetzel)
* Allow arbitrary :filespecs to be included in jars.
* Let custom :prep-tasks be specified in project.clj.
* Include :java-source-paths and dev/test deps in pom. (Nelson Morris)
* Add offline profile.
* Prevent project JVMs from outlasting Leiningen's process. (Colin Jones)
* Update lein.bat to work with version 2. (Andrew Kondratovich)
* Show a dependency tree in deps task. (Chas Emerick, Nelson Morris)
* Support connecting to nrepl server in repl task. (Chas Emerick, Colin Jones)
* Pretty-print pom.xml. (Nelson Morris)
* Display task aliases in help task. (Michael S. Klishin)
* Only compile stale java source files. (Stephen C. Gilardi)
* Respect :java-cmd in project.clj. (Michael S. Klishin)
* Show progress when downloading search indices. (Justin Kramer)

If you have an earlier preview version, you can pull this in via "lein
upgrade". If you only have Leiningen 1.x installed, you will have to
download preview3 by hand:

https://raw.github.com/technomancy/leiningen/preview/bin/lein

Note that this does not conflict in any way with Leiningen 1.x; you can
keep the two of them installed side-by-side. It's common to save the
above script as "lein2" to differentiate between the two of them if you
have projects that don't yet work with Leiningen 2.

So far we've found the preview2 release to be quite stable, so now would
be a great time to try upgrading if you've been holding off:

https://github.com/technomancy/leiningen/wiki/Upgrading

If you're interested in contributing, I've categorized the existing
TODOs into low-hanging fruit, intermediate, and complex; pick something
and hop on the #leiningen channel in freenode:

https://github.com/technomancy/leiningen/blob/master/todo.org

thanks!

-Phil

Michael Klishin

unread,
Apr 12, 2012, 5:39:20 PM4/12/12
to lein...@googlegroups.com, clo...@googlegroups.com
Phil Hagelberg:

> I'm happy to announce the release of the third preview of Leiningen 2.0.0.

lein2-preview3 is already live on travis-ci.org. More about using lein2 in our Clojure guide [1], see [2]
if you are only getting started.

1. http://about.travis-ci.org/docs/user/languages/clojure/
2. http://about.travis-ci.org/docs/user/getting-started/

MK

Jacek Laskowski

unread,
Apr 12, 2012, 11:48:19 PM4/12/12
to clo...@googlegroups.com
On Thu, Apr 12, 2012 at 11:39 PM, Michael Klishin
<michael....@gmail.com> wrote:

> 1. http://about.travis-ci.org/docs/user/languages/clojure/

I believe it begs for the following change:

s/Standalone Leiningen 2.0.0 [preview 2]./Standalone Leiningen 2.0.0
[preview 3]./

in CI environment for Clojure Projects.

Jacek

--
Jacek Laskowski
Functional languages (Clojure), Java EE, and IBM WebSphere -
http://blog.japila.pl
"Never discourage anyone who continually makes progress, no matter how
slow." Plato

nick rothwell

unread,
Apr 13, 2012, 4:35:33 AM4/13/12
to lein...@googlegroups.com, clo...@googlegroups.com
Trivial bug report: saying

lein new

throws an ArityException rather than reporting an error and suggesting usage.

Niels van Klaveren

unread,
Apr 15, 2012, 4:05:08 PM4/15/12
to lein...@googlegroups.com, clo...@googlegroups.com
lein new error under Windows 7 x64:

>lein version
Leiningen 2.0.0-preview3 on Java 1.6.0_31 Java HotSpot(TM) 64-Bit Server VM

>lein new quiltest
Generating a project called quiltest based on the 'default' template.
java.lang.IllegalArgumentException: No implementation of method: :make-reader of
 protocol: #'clojure.java.io/IOFactory found for class: nil
        at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:495)
        at clojure.java.io$fn__7795$G__7790__7802.invoke(io.clj:63)
        at clojure.java.io$reader.doInvoke(io.clj:96)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at leiningen.new.templates$slurp_resource.invoke(templates.clj:29)
        at leiningen.new.templates$renderer$fn__713.doInvoke(templates.clj:79)
        at clojure.lang.RestFn.invoke(RestFn.java:423)
        at leiningen.new.default$default.invoke(default.clj:15)
        at clojure.lang.Var.invoke(Var.java:401)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.Var.applyTo(Var.java:518)
        at clojure.core$apply.invoke(core.clj:602)
        at leiningen.new$create.doInvoke(new.clj:54)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at leiningen.new$create.invoke(new.clj:47)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invoke(core.clj:600)
        at leiningen.new$new.doInvoke(new.clj:101)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:405)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:518)
        at clojure.core$apply.invoke(core.clj:602)
        at leiningen.core.main$resolve_task$fn__699.doInvoke(main.clj:66)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:602)
        at leiningen.core.main$apply_task.invoke(main.clj:88)
        at leiningen.core.main$_main$fn__731.invoke(main.clj:140)
        at leiningen.core.main$_main.doInvoke(main.clj:140)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:405)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:518)
        at clojure.core$apply.invoke(core.clj:600)
        at clojure.main$main_opt.invoke(main.clj:323)
        at clojure.main$main.doInvoke(main.clj:426)
        at clojure.lang.RestFn.invoke(RestFn.java:457)
        at clojure.lang.Var.invoke(Var.java:413)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:518)
        at clojure.main.main(main.java:37)

Op donderdag 12 april 2012 19:39:28 UTC+2 schreef Phil Hagelberg het volgende:
Op donderdag 12 april 2012 19:39:28 UTC+2 schreef Phil Hagelberg het volgende:

Tim King

unread,
Apr 17, 2012, 10:15:25 PM4/17/12
to lein...@googlegroups.com, clo...@googlegroups.com
Hi,
I am also getting this error on Windows.

I think I have tracked down the source of the problem in lein-newnew.

c.j.io/resource expects a path separated by "/", and (.getPath file) returns a path separated by the system dependent separator (i.e. "leiningen\\new\\default\\project.clj").

I have a fix that is working for me, and I'm happy to submit a pull request. 

Cheers,
Tim

adrians

unread,
May 1, 2012, 11:25:11 AM5/1/12
to lein...@googlegroups.com, clo...@googlegroups.com
I'm also getting this error, with same spec Windows but with Java 7. Unfortunately, I also get this with lein 1.7.1. Tried to build from source, but "lein install" generates a snapshot jar that only includes a few source files. Can anyone offer a solution to building your own lein?

Thanks,
Adrian

Stuart Sierra

unread,
May 2, 2012, 3:56:08 PM5/2/12
to clo...@googlegroups.com, lein...@googlegroups.com
Just want to say thanks to Phil and everyone else who has contributed to Leiningen. It's been pleasing to see the evolution from a limited script to a solid development tool.
-S

Jim - FooBar();

unread,
May 2, 2012, 3:58:00 PM5/2/12
to clo...@googlegroups.com
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

(+ 10) !!!

Thanks Phil for such a wonderful tool... :)
Reply all
Reply to author
Forward
0 new messages