NEW: devel/leiningen

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

NEW: devel/leiningen

Jon Bernard
Hi ports@,

Attached is a port of leiningen, for automating clojure projects.

DESCR:

Leiningen is the easiest way to use Clojure.  With a focus on project
automation and declarative configuration, it gets out of your way and
lets you focus on your code.

--
Jon

leiningen-2.7.1.tgz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NEW: devel/leiningen

Edd Barrett-3
Hi Jon,

On Thu, Jun 29, 2017 at 10:38:32AM -0400, Jon Bernard wrote:
> Attached is a port of leiningen, for automating clojure projects.

Comments:

 * There's a hard-coded path to bash in a patch. You will need to use a
   variable (LOCALBASE) in place of /usr/local and then use
   ${SUBST_CMD} in a custom make target, maybe post-install.

 * Did you try that script with /bin/sh? If it works that would be
   preferable. Otherwise, bash needs to be a RUN_DEPEND.

 * mandoc linter is unhappy with the man page:

   $ mandoc -Tlint /usr/local/man/man1/lein.1
   mandoc: /usr/local/man/man1/lein.1:2:17: WARNING: cannot parse date, using it verbatim: 2011 June 30

   Consider pathcing?

 * I was surprised to see that your port did not RUN_DEPEND on clojure.
   I see that upon first `lein repl` the tool will download a clojure
   using (the horror) maven (which must be bundled?). I *think*, but
   other porters can correct me, we would prefer to use the in-tree
   clojure instead of a moving target. Is this possible?

 * Even if I let it do its thing, the repl doesn't seem to work:

    ---8<---
    $ lein repl    
    Retrieving org/clojure/clojure/1.8.0/clojure-1.8.0.pom from central
    Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
    Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.pom from central
    Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
    Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.pom from clojars
    Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar from central
    Retrieving org/clojure/clojure/1.8.0/clojure-1.8.0.jar from central
    Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.jar from clojars
    REPL server launch timed out.
    --->8---

I know nothing about Clojure or lein, so I'm going to CC our clojure
MAINTAINER, Jasper.

Cheers

--
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk

Reply | Threaded
Open this post in threaded view
|

Re: NEW: devel/leiningen

Ingo Schwarze
Hi Edd,

Edd Barrett wrote on Sun, Jul 02, 2017 at 05:12:15PM +0100:

>  * mandoc linter is unhappy with the man page:
>
>    $ mandoc -Tlint /usr/local/man/man1/lein.1
>    mandoc: /usr/local/man/man1/lein.1:2:17: WARNING: cannot parse date, using it verbatim: 2011 June 30
>
>    Consider pathcing?

No, most definitely not!

Do not patch ports manuals except to prevent very badly broken
formatting or serious information loss, and even in those cases,
only if the problem also occurs with groff.

In the very unusual case that a mere WARNING from mandoc causes
unintelligible rendering or information loss, that's a bug in mandoc,
and then we want to patch mandoc to either format properly or at
least issue an ERROR rather than a WARNING, before even considering
to patch the port.

In this case, the string renders as "2011 June 30" (as the message
says), and that is perfectly understandable for humans.  Now that
we have the STYLE message level, i will probably downgrade this
particular message from WARNING to STYLE soon.

In the base system, we have unusually high standards for code
cleanness (because that helps developers when doing maintenance)
und uniformity of presentation (because that helps users).  So in
the base system, the number of WARNINGs is low and we try to fix
as many of them as is reasonable.  But in non-OpenBSD software, you
will have a hard time to find *anything* that does not trigger at
least a few WARNINGs.

For routine checking of a port, unless you are planning to help
upstream to get their manuals up to OpenBSD base system quality
standards, it is completely sufficient to run

  mandoc -Tlint -Werror

Even if a ports page throws ERRORs, that usually doesn't require
patching the port, but in that case, it is useful to check that
none of the ERRORs cause broken formatting or information loss.
While all ERRORs carry a potential risk of causing such damage, in
practice, only a minority of them actually does cause such damage.
If you find that kind of damage, then helping upstream to get it
fixed is definitely useful.

For more information, see

  https://www.openbsd.org/faq/ports/specialtopics.html#Mandoc

Yours,
  Ingo

Reply | Threaded
Open this post in threaded view
|

Re: NEW: devel/leiningen

Jasper Lievisse Adriaanse-2
In reply to this post by Edd Barrett-3
On Sun, Jul 02, 2017 at 05:12:15PM +0100, Edd Barrett wrote:

> Hi Jon,
>
> On Thu, Jun 29, 2017 at 10:38:32AM -0400, Jon Bernard wrote:
> > Attached is a port of leiningen, for automating clojure projects.
>
> Comments:
>
>  * There's a hard-coded path to bash in a patch. You will need to use a
>    variable (LOCALBASE) in place of /usr/local and then use
>    ${SUBST_CMD} in a custom make target, maybe post-install.
>
>  * Did you try that script with /bin/sh? If it works that would be
>    preferable. Otherwise, bash needs to be a RUN_DEPEND.
>
>  * mandoc linter is unhappy with the man page:
>
>    $ mandoc -Tlint /usr/local/man/man1/lein.1
>    mandoc: /usr/local/man/man1/lein.1:2:17: WARNING: cannot parse date, using it verbatim: 2011 June 30
>
>    Consider pathcing?
>
>  * I was surprised to see that your port did not RUN_DEPEND on clojure.
>    I see that upon first `lein repl` the tool will download a clojure
>    using (the horror) maven (which must be bundled?). I *think*, but
>    other porters can correct me, we would prefer to use the in-tree
>    clojure instead of a moving target. Is this possible?
>
>  * Even if I let it do its thing, the repl doesn't seem to work:
>
>     ---8<---
>     $ lein repl    
>     Retrieving org/clojure/clojure/1.8.0/clojure-1.8.0.pom from central
>     Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
>     Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.pom from central
>     Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
>     Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.pom from clojars
>     Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar from central
>     Retrieving org/clojure/clojure/1.8.0/clojure-1.8.0.jar from central
>     Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.jar from clojars
>     REPL server launch timed out.
>     --->8---
>
> I know nothing about Clojure or lein, so I'm going to CC our clojure
> MAINTAINER, Jasper.
>
> Cheers
>
> --
> Best Regards
> Edd Barrett
>
> http://www.theunixzoo.co.uk

We used to have a port of leiningen, but I removed it more than 3 years ago:

------------8<------------
Revision 1.6, Sat Nov 9 10:40:20 2013 UTC (3 years, 7 months ago) by jasper
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED

remove leiningen; the upstream script is not really intended to get packaged
anyway.
------------8<------------

Might be worth considering before proceeding to re-add the files if the
situation has improved since 2013.

--
jasper

Reply | Threaded
Open this post in threaded view
|

Re: NEW: devel/leiningen

Jon Bernard
* Jasper Lievisse Adriaanse <[hidden email]> wrote:

>On Sun, Jul 02, 2017 at 05:12:15PM +0100, Edd Barrett wrote:
>> Hi Jon,
>>
>> On Thu, Jun 29, 2017 at 10:38:32AM -0400, Jon Bernard wrote:
>> > Attached is a port of leiningen, for automating clojure projects.
>>
>> Comments:
>>
>>  * There's a hard-coded path to bash in a patch. You will need to use a
>>    variable (LOCALBASE) in place of /usr/local and then use
>>    ${SUBST_CMD} in a custom make target, maybe post-install.
>>
>>  * Did you try that script with /bin/sh? If it works that would be
>>    preferable. Otherwise, bash needs to be a RUN_DEPEND.
>>
>>  * mandoc linter is unhappy with the man page:
>>
>>    $ mandoc -Tlint /usr/local/man/man1/lein.1
>>    mandoc: /usr/local/man/man1/lein.1:2:17: WARNING: cannot parse date, using it verbatim: 2011 June 30
>>
>>    Consider pathcing?
>>
>>  * I was surprised to see that your port did not RUN_DEPEND on clojure.
>>    I see that upon first `lein repl` the tool will download a clojure
>>    using (the horror) maven (which must be bundled?). I *think*, but
>>    other porters can correct me, we would prefer to use the in-tree
>>    clojure instead of a moving target. Is this possible?
>>
>>  * Even if I let it do its thing, the repl doesn't seem to work:
>>
>>     ---8<---
>>     $ lein repl
>>     Retrieving org/clojure/clojure/1.8.0/clojure-1.8.0.pom from central
>>     Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
>>     Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.pom from central
>>     Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
>>     Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.pom from clojars
>>     Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar from central
>>     Retrieving org/clojure/clojure/1.8.0/clojure-1.8.0.jar from central
>>     Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.jar from clojars
>>     REPL server launch timed out.
>>     --->8---
>>
>> I know nothing about Clojure or lein, so I'm going to CC our clojure
>> MAINTAINER, Jasper.
>>
>> Cheers
>>
>> --
>> Best Regards
>> Edd Barrett
>>
>> http://www.theunixzoo.co.uk
>
>We used to have a port of leiningen, but I removed it more than 3 years ago:
>
>------------8<------------
>Revision 1.6, Sat Nov 9 10:40:20 2013 UTC (3 years, 7 months ago) by jasper
>Branch: MAIN
>CVS Tags: HEAD
>Changes since 1.5: +1 -1 lines
>FILE REMOVED
>
>remove leiningen; the upstream script is not really intended to get packaged
>anyway.
>------------8<------------
>
>Might be worth considering before proceeding to re-add the files if the
>situation has improved since 2013.

I believe the upstream offering has changed since that time, there is
now a 'lein-pkg' script which is intended for downstream packagers [1].

If you have time to review, I'd be very curious to know what you think.
I suspect Edd's repl timeout is unrelated to the package itself,
possibly a transient server error fetching the requisite jars.

[1] https://github.com/technomancy/leiningen/blob/master/bin/lein-pkg#L3-L5

--
Jon