Discussion:
[ANN] Leiningen 2.3.1 released
Phil Hagelberg
2013-08-13 17:37:18 UTC
Permalink
Hello folks.

With some help from Nelson Morris I've pushed out the 2.3.1 release of
Leiningen. This fixes the self-install issues as well as the issue
around AOT classes not being included in jar files. It also adds a new
flag (:monkeypatch-clojure-test false) you can use to disable
Leiningen's monkeypatch of the `clojure.test` library.

As usual, if you installed manually you can upgrade with `lein
upgrade`. If you need to back out for some reason, you can downgrade with
`lein upgrade 2.2.0`.

-Phil
Keith Irwin
2013-08-13 18:40:36 UTC
Permalink
Alas, uberjar (or jar) still won't compile my :main namespace. The only way I can get either to include an executable main is to use the :aot key.

>From the source, it looks like the code will add :main to :aot, but....

Keith

On Aug 13, 2013, at 10:37 AM, Phil Hagelberg <phil-Tr7DW4wtY2wdnm+***@public.gmane.org> wrote:

>
> Hello folks.
>
> With some help from Nelson Morris I've pushed out the 2.3.1 release of
> Leiningen. This fixes the self-install issues as well as the issue
> around AOT classes not being included in jar files. It also adds a new
> flag (:monkeypatch-clojure-test false) you can use to disable
> Leiningen's monkeypatch of the `clojure.test` library.
>
> As usual, if you installed manually you can upgrade with `lein
> upgrade`. If you need to back out for some reason, you can downgrade with
> `lein upgrade 2.2.0`.
>
> -Phil
Keith Irwin
2013-08-13 19:13:41 UTC
Permalink
This seems to have solved it for me (in my project's project.clj file):

:profiles {:uberjar {:aot [myapp.core]}}

Alas, by reading the code, I can't see where the uberjar/jar tasks don't already automatically do that (adding the :main declaration to :aot).

On Aug 13, 2013, at 11:40 AM, Keith Irwin <keith-kJcdsBlDm/BWk0Htik3J/***@public.gmane.org> wrote:

> Alas, uberjar (or jar) still won't compile my :main namespace. The only way I can get either to include an executable main is to use the :aot key.
>
>> From the source, it looks like the code will add :main to :aot, but....
>
> Keith
>
> On Aug 13, 2013, at 10:37 AM, Phil Hagelberg <phil-Tr7DW4wtY2wdnm+***@public.gmane.org> wrote:
>
>>
>> Hello folks.
>>
>> With some help from Nelson Morris I've pushed out the 2.3.1 release of
>> Leiningen. This fixes the self-install issues as well as the issue
>> around AOT classes not being included in jar files. It also adds a new
>> flag (:monkeypatch-clojure-test false) you can use to disable
>> Leiningen's monkeypatch of the `clojure.test` library.
>>
>> As usual, if you installed manually you can upgrade with `lein
>> upgrade`. If you need to back out for some reason, you can downgrade with
>> `lein upgrade 2.2.0`.
>>
>> -Phil
>
Phil Hagelberg
2013-08-13 21:19:10 UTC
Permalink
Phil Hagelberg writes:

> With some help from Nelson Morris I've pushed out the 2.3.1 release of
> Leiningen. This fixes the self-install issues as well as the issue
> around AOT classes not being included in jar files. It also adds a new
> flag (:monkeypatch-clojure-test false) you can use to disable
> Leiningen's monkeypatch of the `clojure.test` library.

It looks like there's still one issue[1] remaining. If your project relies
needs AOT but does not set `:aot` in project.clj, relying on the
implicit AOT from `:main` instead, you will have to add in an explicit
`:aot` entry. I strongly recommend being explicit about `:aot` anyway.

Even better, you can scope the AOT to only being active during the
uberjar task, which I also highly recommend:

:profiles {:uberjar {:aot :all}}

That way you won't have stray class files interfering with reloading
during development.

We'll probably cut a 2.3.2 release soon addressing this since it was an
unintentional breaking change--I meant to wait for 3.0 to fix the
implicit :aot problem.

-Phil

[1] https://github.com/technomancy/leiningen/issues/1289
Loading...