This patch updates Clojure to 1.11.1. It also adds the 'reset-class-timestamps
phase to the Clojure build system.
This phase makes sure the timestamp of compiled class files is set to a later
point in time than the timestamp of the corresponding Clojure source files. If
the timestamps of the class and source files are the same, the Clojure
compiler will compile the sources again which can lead to issues. This problem
has been discussed here [1]. The suggested solution was to keep/adjust the
timestamps of the class files.
[1] https://www.mail-archive.com/clojure@googlegroups.com/msg99928.html
* gnu/packages/clojure.scm (clojure): Update to 1.11.1 and update all of
LIBRARIES accordingly.
[arguments]: In 'unpack-library-sources' phase, copy from
"core-specs-alpha-src" and "spec-alpha-src" as well. Add
phases 'closure-spec-skip-macros', 'clojure-spec-compile',
'maven-classpath-properties', and 'reset-class-timestamps'.
* guix/build/clojure-build-system.scm (regular-jar-file?)
(reset-class-timestamps): New procedures.
(%standard-phases): Add 'reset-class-timestamps' phase.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix/build/clojure-build-system.scm (compile-java): New variable.
(build): Copy classes compiled from Java and optionally Java sources to
the final jar.
(%standard-phases): Add compile-java phase before build.
* guix/build/clojure-utils.scm (%java-source-dirs): New variable.
(%java-compile-dir): New variable.
* guix/build-system/clojure.scm (clojure-build): Include %java-source-dirs and
%java-compile-dir.
(builder): Include %java-source-dirs and %java-compile-dir.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/build/clojure-build-system.scm (check): Exit test process with a
non-zero exit code if tests fail.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>