* [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8. @ 2017-12-29 19:17 Gábor Boskovits 2018-01-17 8:30 ` Chris Marusich 2018-06-24 16:13 ` bug#29897: " Gábor Boskovits 0 siblings, 2 replies; 8+ messages in thread From: Gábor Boskovits @ 2017-12-29 19:17 UTC (permalink / raw) To: 29897; +Cc: Gábor Boskovits * 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 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8. 2017-12-29 19:17 [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8 Gábor Boskovits @ 2018-01-17 8:30 ` Chris Marusich 2018-01-17 12:15 ` Gábor Boskovits 2018-06-24 16:13 ` bug#29897: " Gábor Boskovits 1 sibling, 1 reply; 8+ messages in thread From: Chris Marusich @ 2018-01-17 8:30 UTC (permalink / raw) To: Gábor Boskovits; +Cc: 29897 [-- Attachment #1: Type: text/plain, Size: 1206 bytes --] Gábor Boskovits <boskovits@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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8. 2018-01-17 8:30 ` Chris Marusich @ 2018-01-17 12:15 ` Gábor Boskovits 2018-01-25 9:30 ` Chris Marusich 0 siblings, 1 reply; 8+ messages in thread From: Gábor Boskovits @ 2018-01-17 12:15 UTC (permalink / raw) To: Chris Marusich; +Cc: 29897 [-- Attachment #1: Type: text/plain, Size: 1460 bytes --] 2018-01-17 9:30 GMT+01:00 Chris Marusich <cmmarusich@gmail.com>: > Gábor Boskovits <boskovits@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. [-- Attachment #2: Type: text/html, Size: 2134 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8. 2018-01-17 12:15 ` Gábor Boskovits @ 2018-01-25 9:30 ` Chris Marusich 2018-01-25 21:47 ` Gábor Boskovits 0 siblings, 1 reply; 8+ messages in thread From: Chris Marusich @ 2018-01-25 9:30 UTC (permalink / raw) To: Gábor Boskovits; +Cc: 29897 [-- Attachment #1.1: Type: text/plain, Size: 1057 bytes --] Gábor Boskovits <boskovits@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 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: 0001-gnu-java-aqute-libg-Explicitly-build-for-Java-7.patch --] [-- Type: text/x-patch, Size: 2224 bytes --] From ff975ea3c3e26a57bd97e13f20e7b8aa380b91e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com> Date: Fri, 29 Dec 2017 20:17:00 +0100 Subject: [PATCH] gnu: java-aqute-libg: Explicitly build for Java 7. * gnu/packages/java.scm (java-aqute-libg)[arguments]: Add keyword make-flags to use source and target 1.7. Co-authored-by: Chris Marusich <cmmarusich@gmail.com> --- gnu/packages/java.scm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 2724f0f20..ae7e98977 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -6003,7 +6003,28 @@ it manages project dependencies, gives diffs jars, and much more.") (arguments `(#:jar-name "java-aqute-libg.jar" #:source-dir "aQute.libg/src" - #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory + ;; The build fails when source/target are more recent than 1.7. This + ;; is a known issue. See: 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 1.8, and it still works on 1.6, the upstream + ;; target. It works fine on 1.7, however, so we use 1.7. + #:make-flags (list "-Dant.build.javac.source=1.7" + "-Dant.build.javac.target=1.7") + #:phases + (modify-phases %standard-phases + (add-before 'check 'create-java-test-dir + ;; Move the test directory into test/java, since that's where + ;; ant-build-system's default project in build.xml expects to find + ;; the test classes. + (lambda _ + (rename-file "aQute.libg/test" "aQute.libg/test.tmp") + (mkdir "aQute.libg/test") + (rename-file "aQute.libg/test.tmp" "aQute.libg/test/java")))) + #:test-dir "aQute.libg/test")) + (native-inputs + `(("hamcrest" ,java-hamcrest-core) + ("java-junit" ,java-junit))) (inputs `(("slf4j" ,java-slf4j-api) ("osgi-annot" ,java-osgi-annotation) -- 2.15.1 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8. 2018-01-25 9:30 ` Chris Marusich @ 2018-01-25 21:47 ` Gábor Boskovits 2018-01-26 9:58 ` Gábor Boskovits 0 siblings, 1 reply; 8+ messages in thread From: Gábor Boskovits @ 2018-01-25 21:47 UTC (permalink / raw) To: Chris Marusich; +Cc: 29897 [-- Attachment #1: Type: text/plain, Size: 1375 bytes --] 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@gmail.com>: > Gábor Boskovits <boskovits@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 > [-- Attachment #2: Type: text/html, Size: 2033 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8. 2018-01-25 21:47 ` Gábor Boskovits @ 2018-01-26 9:58 ` Gábor Boskovits 2018-01-26 10:33 ` Gábor Boskovits 0 siblings, 1 reply; 8+ messages in thread From: Gábor Boskovits @ 2018-01-26 9:58 UTC (permalink / raw) To: Chris Marusich; +Cc: 29897 [-- Attachment #1: Type: text/plain, Size: 2684 bytes --] 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@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@gmail.com>: > >> Gábor Boskovits <boskovits@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 >> > > [-- Attachment #2: Type: text/html, Size: 4193 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8. 2018-01-26 9:58 ` Gábor Boskovits @ 2018-01-26 10:33 ` Gábor Boskovits 0 siblings, 0 replies; 8+ messages in thread From: Gábor Boskovits @ 2018-01-26 10:33 UTC (permalink / raw) To: Chris Marusich; +Cc: 29897 [-- Attachment #1: Type: text/plain, Size: 2939 bytes --] 2018-01-26 10:58 GMT+01:00 Gábor Boskovits <boskovits@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@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@gmail.com>: >> >>> Gábor Boskovits <boskovits@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 >>> >> >> > [-- Attachment #2: Type: text/html, Size: 4906 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#29897: gnu: java-aqute-libg: Fix compilation on java8. 2017-12-29 19:17 [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8 Gábor Boskovits 2018-01-17 8:30 ` Chris Marusich @ 2018-06-24 16:13 ` Gábor Boskovits 1 sibling, 0 replies; 8+ messages in thread From: Gábor Boskovits @ 2018-06-24 16:13 UTC (permalink / raw) To: 29897-done [-- Attachment #1: Type: text/plain, Size: 145 bytes --] Pushed to master as: aca7dcdd1eee3c879ef1cca2f417988fa0d12b03 2ab089b7ba531b0a28e9fe65a44a8a4af4b1d2bf 78754995e847115e5c9141521497b0b41319fc4b. [-- Attachment #2: Type: text/html, Size: 208 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-06-24 16:14 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-12-29 19:17 [bug#29897] [PATCH core-updates] gnu: java-aqute-libg: Fix compilation on java8 Gábor Boskovits 2018-01-17 8:30 ` Chris Marusich 2018-01-17 12:15 ` Gábor Boskovits 2018-01-25 9:30 ` Chris Marusich 2018-01-25 21:47 ` Gábor Boskovits 2018-01-26 9:58 ` Gábor Boskovits 2018-01-26 10:33 ` Gábor Boskovits 2018-06-24 16:13 ` bug#29897: " Gábor Boskovits
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.