GNU bug report logs - #29897
[PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8.

Previous Next

Package: guix-patches;

Reported by: Gábor Boskovits <boskovits <at> gmail.com>

Date: Fri, 29 Dec 2017 19:18:01 UTC

Severity: normal

Tags: patch

Done: Gábor Boskovits <boskovits <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29897 in the body.
You can then email your comments to 29897 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#29897; Package guix-patches. (Fri, 29 Dec 2017 19:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gábor Boskovits <boskovits <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 29 Dec 2017 19:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Gábor Boskovits <boskovits <at> gmail.com>
Subject: [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8.
Date: Fri, 29 Dec 2017 20:17:00 +0100
* gnu/packages/java.scm (java-aqute-libg)[arguments]: Add keyword make-flags to use
  source and target 1.7.

This is an issue know upstream:
https://github.com/bndtools/bnd/issues/1327

It is closed as won't fix. There is no way to change the source, so that is works
on java8, and it still works on java6, the upstream target. It works fine on
java7, however, so we use java7.
---
 gnu/packages/java.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 8a244328f..584cbafa4 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -5999,6 +5999,8 @@ it manages project dependencies, gives diffs jars, and much more.")
     (arguments
      `(#:jar-name "java-aqute-libg.jar"
        #:source-dir "aQute.libg/src"
+       #:make-flags (list (string-append "-Dant.build.javac.source=" "1.7")
+                          (string-append "-Dant.build.javac.target=" "1.7"))
        #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
     (inputs
      `(("slf4j" ,java-slf4j-api)
-- 
2.15.1





Information forwarded to guix-patches <at> gnu.org:
bug#29897; Package guix-patches. (Wed, 17 Jan 2018 08:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 29897 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: 29897 <at> debbugs.gnu.org
Subject: Re: [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix
 compilation on java8.
Date: Wed, 17 Jan 2018 00:30:03 -0800
[Message part 1 (text/plain, inline)]
Gábor Boskovits <boskovits <at> gmail.com> writes:

> * gnu/packages/java.scm (java-aqute-libg)[arguments]: Add keyword make-flags to use
>   source and target 1.7.

As a matter of Git style, the first line of a commit message should not
be longer than about 50 characters, and it should not span more than 1
line.  Maybe we could replace the first line with the following instead?

  gnu: java-aqute-libg: Explicitly build for Java 7.

In addition, the comment in the commit message is helpful, but it would
be better to move it or copy it into the actual source code.  That way,
when somebody reads the source, they'll know immediately why we
explicitly build for Java 7 without having to resort to searching the
Git history.

> +       #:make-flags (list (string-append "-Dant.build.javac.source=" "1.7")
> +                          (string-append "-Dant.build.javac.target=" "1.7"))

You can also write this list in the following form, which is simpler:

  (list "-Dant.build.javac.source=1.7" "-Dant.build.javac.target=1.7")

I'll make these changes and commit this in the next day or two, unless
you have additional comments or you submit a new patch before then.

- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29897; Package guix-patches. (Wed, 17 Jan 2018 12:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 29897 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 29897 <at> debbugs.gnu.org
Subject: Re: [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix
 compilation on java8.
Date: Wed, 17 Jan 2018 13:15:56 +0100
[Message part 1 (text/plain, inline)]
2018-01-17 9:30 GMT+01:00 Chris Marusich <cmmarusich <at> gmail.com>:

> Gábor Boskovits <boskovits <at> gmail.com> writes:
>
> > * gnu/packages/java.scm (java-aqute-libg)[arguments]: Add keyword
> make-flags to use
> >   source and target 1.7.
>
> As a matter of Git style, the first line of a commit message should not
> be longer than about 50 characters, and it should not span more than 1
> line.  Maybe we could replace the first line with the following instead?
>
>   gnu: java-aqute-libg: Explicitly build for Java 7.
>
> In addition, the comment in the commit message is helpful, but it would
> be better to move it or copy it into the actual source code.  That way,
> when somebody reads the source, they'll know immediately why we
> explicitly build for Java 7 without having to resort to searching the
> Git history.
>
> > +       #:make-flags (list (string-append "-Dant.build.javac.source="
> "1.7")
> > +                          (string-append "-Dant.build.javac.target="
> "1.7"))
>
> You can also write this list in the following form, which is simpler:
>
>   (list "-Dant.build.javac.source=1.7" "-Dant.build.javac.target=1.7")
>
> I'll make these changes and commit this in the next day or two, unless
> you have additional comments or you submit a new patch before then.
>
> -
> Chris
>

Thanks for the corrections.
Looks good to me,
I won't send an updated patch then.
Please commit with the modifications.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29897; Package guix-patches. (Thu, 25 Jan 2018 09:31:01 GMT) Full text and rfc822 format available.

Message #14 received at 29897 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: 29897 <at> debbugs.gnu.org
Subject: Re: [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix
 compilation on java8.
Date: Thu, 25 Jan 2018 01:30:22 -0800
[Message part 1 (text/plain, inline)]
Gábor Boskovits <boskovits <at> gmail.com> writes:

> Thanks for the corrections.
> Looks good to me,
> I won't send an updated patch then.
> Please commit with the modifications.

I made the modifications and also tried to enable the tests (see
attached patch), but I discovered that some of the tests are failing
(and some are passing).  Perhaps we should try fixing the tests while
we're here?  If you do

  /pre-inst-env guix build --keep-failed java-aqute-libg

you can see the failures.  The build directory will be kept.  If we go
to it, we can find a report of the test failures under the path:

  bnd-3.4.0.REL/aQute.libg/test/test-reports

Unfortunately, the ant-build-system doesn't compile the classes with
debug info by default.  To enable line numbers etc. in the stack traces,
we'll need to add

  debug="true"

to the relevant <javac> tags, as described here:

https://ant.apache.org/manual/Tasks/javac.html

If you could help debug the failures, that would be nice.  I will also
look as I get time.

-- 
Chris
[0001-gnu-java-aqute-libg-Explicitly-build-for-Java-7.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29897; Package guix-patches. (Thu, 25 Jan 2018 21:48:01 GMT) Full text and rfc822 format available.

Message #17 received at 29897 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 29897 <at> debbugs.gnu.org
Subject: Re: [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix
 compilation on java8.
Date: Thu, 25 Jan 2018 22:47:46 +0100
[Message part 1 (text/plain, inline)]
It seems, that moving the tests and not moving the tesresources directory
breaks the relatitve paths in the tests.
Tomorrow I will check what happens if we also move the testresources.

2018-01-25 10:30 GMT+01:00 Chris Marusich <cmmarusich <at> gmail.com>:

> Gábor Boskovits <boskovits <at> gmail.com> writes:
>
> > Thanks for the corrections.
> > Looks good to me,
> > I won't send an updated patch then.
> > Please commit with the modifications.
>
> I made the modifications and also tried to enable the tests (see
> attached patch), but I discovered that some of the tests are failing
> (and some are passing).  Perhaps we should try fixing the tests while
> we're here?  If you do
>
>   /pre-inst-env guix build --keep-failed java-aqute-libg
>
> you can see the failures.  The build directory will be kept.  If we go
> to it, we can find a report of the test failures under the path:
>
>   bnd-3.4.0.REL/aQute.libg/test/test-reports
>
> Unfortunately, the ant-build-system doesn't compile the classes with
> debug info by default.  To enable line numbers etc. in the stack traces,
> we'll need to add
>
>   debug="true"
>
> to the relevant <javac> tags, as described here:
>
> https://ant.apache.org/manual/Tasks/javac.html
>
> If you could help debug the failures, that would be nice.  I will also
> look as I get time.
>
> --
> Chris
>
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29897; Package guix-patches. (Fri, 26 Jan 2018 09:59:01 GMT) Full text and rfc822 format available.

Message #20 received at 29897 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 29897 <at> debbugs.gnu.org
Subject: Re: [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix
 compilation on java8.
Date: Fri, 26 Jan 2018 10:58:23 +0100
[Message part 1 (text/plain, inline)]
Actually, is seems that I was wrong after all, I could not move the
testresources to a location which is good.
I've checked in build.gradle how is it done. The relevant part is this:

    /* test folders are not part of jar but used by unit tests  */
    def testfolders = ['testresources/', 'testdata/']
    jar {
      projectDirInputsExcludes << '.*'
      projectDirInputsExcludes += testfolders
    }
    test {
      testLogging {
        exceptionFormat 'full'
      }
      inputs.files fileTree(projectDir) {
        include testfolders
        exclude {
          def f = it.file
          if (f.directory && f.list().length == 0) {
            return true
          }
          try {
            return "git check-ignore ${f}".execute().waitFor() == 0
          } catch (Exception e) {
            return false
          }
        }
      }

How could we replicate this behaviour?

It would also worth checking if the situation regarding these test is the
same in version 3.5.0?

Currently I see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30062
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30062> as a blocking issue
to the upgrade.

2018-01-25 22:47 GMT+01:00 Gábor Boskovits <boskovits <at> gmail.com>:

> It seems, that moving the tests and not moving the tesresources directory
> breaks the relatitve paths in the tests.
> Tomorrow I will check what happens if we also move the testresources.
>
> 2018-01-25 10:30 GMT+01:00 Chris Marusich <cmmarusich <at> gmail.com>:
>
>> Gábor Boskovits <boskovits <at> gmail.com> writes:
>>
>> > Thanks for the corrections.
>> > Looks good to me,
>> > I won't send an updated patch then.
>> > Please commit with the modifications.
>>
>> I made the modifications and also tried to enable the tests (see
>> attached patch), but I discovered that some of the tests are failing
>> (and some are passing).  Perhaps we should try fixing the tests while
>> we're here?  If you do
>>
>>   /pre-inst-env guix build --keep-failed java-aqute-libg
>>
>> you can see the failures.  The build directory will be kept.  If we go
>> to it, we can find a report of the test failures under the path:
>>
>>   bnd-3.4.0.REL/aQute.libg/test/test-reports
>>
>> Unfortunately, the ant-build-system doesn't compile the classes with
>> debug info by default.  To enable line numbers etc. in the stack traces,
>> we'll need to add
>>
>>   debug="true"
>>
>> to the relevant <javac> tags, as described here:
>>
>> https://ant.apache.org/manual/Tasks/javac.html
>>
>> If you could help debug the failures, that would be nice.  I will also
>> look as I get time.
>>
>> --
>> Chris
>>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29897; Package guix-patches. (Fri, 26 Jan 2018 10:34:01 GMT) Full text and rfc822 format available.

Message #23 received at 29897 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 29897 <at> debbugs.gnu.org
Subject: Re: [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix
 compilation on java8.
Date: Fri, 26 Jan 2018 11:33:34 +0100
[Message part 1 (text/plain, inline)]
2018-01-26 10:58 GMT+01:00 Gábor Boskovits <boskovits <at> gmail.com>:

> Actually, is seems that I was wrong after all, I could not move the
> testresources to a location which is good.
> I've checked in build.gradle how is it done. The relevant part is this:
>
>     /* test folders are not part of jar but used by unit tests  */
>     def testfolders = ['testresources/', 'testdata/']
>     jar {
>       projectDirInputsExcludes << '.*'
>       projectDirInputsExcludes += testfolders
>     }
>     test {
>       testLogging {
>         exceptionFormat 'full'
>       }
>       inputs.files fileTree(projectDir) {
>         include testfolders
>         exclude {
>           def f = it.file
>           if (f.directory && f.list().length == 0) {
>             return true
>           }
>           try {
>             return "git check-ignore ${f}".execute().waitFor() == 0
>           } catch (Exception e) {
>             return false
>           }
>         }
>       }
>
> How could we replicate this behaviour?
>
> It would also worth checking if the situation regarding these test is the
> same in version 3.5.0?
>
> I have checked this. The situation is the same for 3.5.0.


> Currently I see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30062
> <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30062> as a blocking issue
> to the upgrade.
>
> 2018-01-25 22:47 GMT+01:00 Gábor Boskovits <boskovits <at> gmail.com>:
>
>> It seems, that moving the tests and not moving the tesresources directory
>> breaks the relatitve paths in the tests.
>> Tomorrow I will check what happens if we also move the testresources.
>>
>> 2018-01-25 10:30 GMT+01:00 Chris Marusich <cmmarusich <at> gmail.com>:
>>
>>> Gábor Boskovits <boskovits <at> gmail.com> writes:
>>>
>>> > Thanks for the corrections.
>>> > Looks good to me,
>>> > I won't send an updated patch then.
>>> > Please commit with the modifications.
>>>
>>> I made the modifications and also tried to enable the tests (see
>>> attached patch), but I discovered that some of the tests are failing
>>> (and some are passing).  Perhaps we should try fixing the tests while
>>> we're here?  If you do
>>>
>>>   /pre-inst-env guix build --keep-failed java-aqute-libg
>>>
>>> you can see the failures.  The build directory will be kept.  If we go
>>> to it, we can find a report of the test failures under the path:
>>>
>>>   bnd-3.4.0.REL/aQute.libg/test/test-reports
>>>
>>> Unfortunately, the ant-build-system doesn't compile the classes with
>>> debug info by default.  To enable line numbers etc. in the stack traces,
>>> we'll need to add
>>>
>>>   debug="true"
>>>
>>> to the relevant <javac> tags, as described here:
>>>
>>> https://ant.apache.org/manual/Tasks/javac.html
>>>
>>> If you could help debug the failures, that would be nice.  I will also
>>> look as I get time.
>>>
>>> --
>>> Chris
>>>
>>
>>
>
[Message part 2 (text/html, inline)]

Reply sent to Gábor Boskovits <boskovits <at> gmail.com>:
You have taken responsibility. (Sun, 24 Jun 2018 16:14:02 GMT) Full text and rfc822 format available.

Notification sent to Gábor Boskovits <boskovits <at> gmail.com>:
bug acknowledged by developer. (Sun, 24 Jun 2018 16:14:02 GMT) Full text and rfc822 format available.

Message #28 received at 29897-done <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: 29897-done <at> debbugs.gnu.org
Subject: gnu: java-aqute-libg: Fix compilation on java8.
Date: Sun, 24 Jun 2018 18:13:03 +0200
[Message part 1 (text/plain, inline)]
Pushed to master as:
aca7dcdd1eee3c879ef1cca2f417988fa0d12b03
2ab089b7ba531b0a28e9fe65a44a8a4af4b1d2bf
78754995e847115e5c9141521497b0b41319fc4b.
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 23 Jul 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.