all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gábor Boskovits" <boskovits@gmail.com>
To: alex.ter.weele@gmail.com
Cc: 32295@debbugs.gnu.org
Subject: [bug#32295] [PATCH] gnu: clojure: Fix index generation
Date: Sun, 29 Jul 2018 08:38:38 +0200	[thread overview]
Message-ID: <CAE4v=pjqL1fOUWxdNjjAWax_Zi1SaxwABUqj5sRAE4SpuMCvLQ@mail.gmail.com> (raw)
In-Reply-To: <87d0v6rbbv.fsf@librem.i-did-not-set--mail-host-address--so-tickle-me>

[-- Attachment #1: Type: text/plain, Size: 2898 bytes --]

Alex ter Weele <alex.ter.weele@gmail.com> ezt írta (időpont: 2018. júl.
29., V, 5:05):

> Gábor Boskovits <boskovits@gmail.com> writes:
>
> > I could use some help from someone more familiar with clojure uses.
> >
> > On current master clojure does not build, as the manifest contains
> > Class-Path: .
> > and jar -i throws exception in phase 'generate-jar-indices.
> >
> > The patch I proposed removes the classpath from the manifest. Do you
> > think this can interfere with normal uses of clojure?
> >
>
> Gábor,
>
> I applied your patch and did the following:
>
> $ guix environment guix -- make -j4 && ./pre-inst-env guix environment
> --ad-hoc icedtea clojure
> ...
> $ java -jar $GUIX_ENVIRONMENT/share/java/clojure-1.9.0.jar
> Clojure 1.9.0
> user=> (inc 0)
> 1
> user=> (clojure.set/difference #{1 2} #{1})
> ClassNotFoundException clojure.set  java.net.URLClassLoader.findClass
> (URLClassLoader.java:381)
> user=> (require 'clojure.set)
> nil
> user=> (clojure.set/difference #{1 2} #{1})
> #{2}
>
> Constructing the environment caused Clojures's test suite to run with no
> failures. Based on a cursory test, I think that Clojure is working as
> expected.
>
>
Thanks for the review, I will apply this patch then.


> I also looked into what the removed line
> means. https://ant.apache.org/manual/Tasks/jar.html explains that
> <manifest> in the "jar" task specifies an inline
> manifest.
> https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#classpath
> explains the meaning of a Class-Path in a manifest. So, I believe that
> means that at runtime, JARs in the same directory as the Clojure JAR
> will be available on the classpath.
>
> I believe that the <attribute name="Class-Path" value="."/> line was
> added in this commit
>
> https://github.com/clojure/clojure/commit/36868a7734f15c51eb1831aa9d72a14544496987#diff-2cccd7bf48b7a9cc113ff564acd802a8R30.
> The
> age of the commit and the commit message lead me to believe that it was
> added as a convenience during the early development of Clojure and may
> be removable upstream now. I may ask about that on the Clojure mailing
> list.
>
> > Another possible solution would be to delete the index generation
> > phase, but I'm not sure about the implications here either.
> >
> > WDYT?
>
> I also tried this and did the same as above. Clojure's test suite ran
> again and had no failures. However, generate-jar-indices in (guix build
> ant-build-system) has a docstring which suggests that the phase is
> necessary to prevent garbage collection of the dependencies of the JAR
> file. So it would seem like your patch is the best way to go ☺
>
> P.S.: Gábor, thanks for your work on Java packages recently! With a
> maven-build-system, I think I can bootstrap leiningen, which I'd really
> like to see in the distribution.
>
>

[-- Attachment #2: Type: text/html, Size: 3982 bytes --]

  reply	other threads:[~2018-07-29  6:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-28  6:08 [bug#32295] [PATCH] gnu: clojure: Fix index generation Gábor Boskovits
2018-07-28  6:29 ` Gábor Boskovits
2018-07-29  3:05   ` Alex ter Weele
2018-07-29  6:38     ` Gábor Boskovits [this message]
2018-07-29 10:01 ` bug#32295: " Gábor Boskovits

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE4v=pjqL1fOUWxdNjjAWax_Zi1SaxwABUqj5sRAE4SpuMCvLQ@mail.gmail.com' \
    --to=boskovits@gmail.com \
    --cc=32295@debbugs.gnu.org \
    --cc=alex.ter.weele@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.