When the default behavior for `:jvm-opts` is additive, it can lead to
unexpected results if a project tries to add its own options which
conflict with the defaults. For example, the following setting:
:jvm-opts ["-XX:-TieredCompilation"]
Results in a JVM command line like this, in which the project's JVM
options are overridden by the defaults:
-XX:-TieredCompilation -XX:+TieredCompilation -XX:TieredStopAtLevel=1
By setting :displace metadata on the default :jvm-opts, any project
configuration of :jvm-opts will replace the defaults.
Fixes issues when a task is applied via trampoline:
Exception in thread "main" java.io.FileNotFoundException: /tmp/form-init2098686718977910298.clj (No such file or directory)
Ensures that the form can be read by read-string. Fixes issues when
the form is lazy, which result in invalid init files like:
clojure.lang.LazySeq@451d3cd3
slurp-resource previously expected the resource to use Unix-style line
endings, which it would then convert into system-specific line endings
using fix-line-separators. The problem with that approach is that
templates built on Windows contain resources with CRLF-terminated lines
and so slurp-resource returned CRCRLF-terminated lines.
The new slurp-to-lf function behaves similarly to slurp, but it
normalizes the line endings in the resource to LF. This ensures that
slurp-resource is able to produce the correct system-specific line
endings.
All of the other copy-to-jar methods call unix-path on (:path spec),
thus ensuring that files added to the jar from a Windows machine end up
with Unix-style path names. The byte array variant of copy-to-jar is
the one exception though and the result is that tools such as
lein-cljsbuild will leave Windows-style paths in jar files generated
with the "lein jar" command.
We want missing namespaces in :aot to not be silently ignored.
Implemented by removing the file-existence check from the function
that determines which namespaces need to be compiled.
This means we won't get the error if you compile an existing namespace
and subsequently delete the *.clj file. Oh well.
Despite the documentation on java.util.jar.Manifest [1], the Manifest class
seems to require an endline in its input. If not, it drops the last line (on my
system, version [2], anyway).
[1] http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html
[2] $ java -version
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
The bug is from a commit from Feb 6 which changes how the classpath is passed javac to use @argfiles parameter.
SHA-1: 3867d4d17c
According to the javac specification (http://docs.oracle.com/javase/6/docs/technotes/tools/windows/javac.html) :
"An argument file can include javac options and source filenames in any combination. The arguments within a file can be space-separated or newline-separated. If a filename contains embedded spaces, put the whole filename in double quotes, and double each backslash ("My Files\\\\Stuff.java")."