Make javac run in a subprocess. Fixes #809. #886

merged 2 commits into from Dec 14, 2012
Commits on Dec 13, 2012
  1. @hyPiRion

    Make javac run in a subprocess. Fixes #809.

    hyPiRion committed Dec 13, 2012
    If we're not making javac run in a subprocess, libraries the project
    depends on which leiningen has another version of will clash. This is
    because leiningen append its standalone to java's bootclasspath, which
    makes the ToolProvider add these classpaths automatically into the java
    compiler it returns. By starting a subprocess without leiningen added to
    the bootclasspath, we avoid this library clashing.
    UI changes as a result of this patch: Whenever javac fails, the task one
    wanted to run will be responsible for aborting Leiningen, whereas javac
    did this itself when it discovered that the compilation failed. As we're
    running in a subprocess, an abort message such as
        Uberjar aborting because jar/compilation failed: Subprocess failed
    will appear, though this will only be appended to the javac error
    message and the "Compilation of Java sources (lein javac) failed."
    This commit also adds the overhead of starting a subprocess when one
    have to compile java sources, but it will not start one if no
    .class-files are outdated/not existing.
    Not tested on Windows.
Commits on Dec 14, 2012
  1. @hyPiRion

    Check compiler existence within javac subprocess.

    hyPiRion committed Dec 14, 2012
    Also added ^:displace to avoid adding multiple clojure-versions onto the
    classpath, and fully expanded non-`clojure.core` namespaces.