Subject: [bug#31333] [PATCH 02/22] gnu: Add groovy-bootstrap.

From: Danny Milosavljevic <[email-masked]>
Date: Sun, 6 May 2018 19:48:02 +0200

Hi Julien,

> +         (add-before 'build 'fix-java8
> +           ;; Fix "Reference to plus is ambiguous"
> +           (lambda _
> +             (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java"
> +               (("toList\\(left\\)")
> +                "(List<T>)toList(left)"))))

#t

Also, is it possible to eventually upstream this fix?

> +         (add-before 'build 'generate-exception-utils
> +           (lambda _
> +             (system* "javac" "-cp" (getenv "CLASSPATH")
> +                      "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java")

Hmm, is ignoring the exit status intentional?

> +             (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
> +                                                         ":config/ant/src")
> +                             "org.codehaus.groovy.ExceptionUtilsGenerator"
> +                             "target/classes/org/codehaus/groovy/runtime/ExceptionUtils.class"))))
> +         (add-before 'build 'generate-dgminfo
> +           (lambda _
> +             (mkdir-p "target/classes/org/codehaus/groovy/runtime")
> +             (mkdir-p "target/classes/META-INF")
> +             (system* "javac" "-cp" (getenv "CLASSPATH")
> +                      "src/main/org/codehaus/groovy/tools/DgmConverter.java")

Exit status ignored

> +             (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
> +                                                         ":src/main")
> +                             "org.codehaus.groovy.tools.DgmConverter"))))
> +         (add-before 'build 'copy-resources
> +           (lambda _
> +             (with-directory-excursion "src/main"
> +               (for-each (lambda (file)
> +                           (mkdir-p (string-append "../../target/classes/"
> +                                                   (dirname file)))
> +                           (copy-file file
> +                                      (string-append "../../target/classes/"
> +                                                     file)))
> +                  (find-files "." ".*.(txt|properties|xml|html)")))))

#t

Otherwise LGTM!