Skip to content

Commit

Permalink
Fix issues with 2.4.0 release
Browse files Browse the repository at this point in the history
- Need to delete files in the fileset dirs before writing to them
  because the underlying blob files are immutable.
- Remove BOOT_CLOJURE_NAME dependency before adding jars to the
  classpath--this is a workaround for a really weird issue:

      clojure.lang.ExceptionInfo: loader constraint violation:
      loader (instance of java/net/URLClassLoader) previously initiated
      loading for a different type with name "clojure/lang/Compiler$Expr"
  • Loading branch information
micha committed Oct 27, 2015
1 parent 123d255 commit 61c948f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion boot/base/src/main/java/boot/App.java
Expand Up @@ -377,7 +377,7 @@ public static class Exit extends Exception {

public static String
readVersion() throws Exception {
Properties p = new Properties();
Properties p = new Properties();
try (InputStream in = resource("boot/base/version.properties")) {
p.load(in); }
return p.getProperty("version"); }
Expand Down
4 changes: 2 additions & 2 deletions boot/pod/src/boot/file.clj
Expand Up @@ -138,9 +138,9 @@
(io/make-parents dst-file)
(when-not (.canWrite (io/file dst-par))
(throw (ex-info (format "Can't write to directory (%s)." dst-par) {:dir dst-par})))
(when (.exists dst-file) (.delete dst-file))
(if *hard-link*
(do (when (.exists dst-file) (.delete dst-file))
(hard-link src-file dst-file))
(hard-link src-file dst-file)
(doto dst-file cp-src! (.setLastModified last-mod)))))

(defn copy-files
Expand Down
10 changes: 7 additions & 3 deletions boot/pod/src/boot/pod.clj
Expand Up @@ -238,8 +238,12 @@
(with-call-worker (boot.aether/resolve-dependencies ~env)))

(defn resolve-dependency-jars
[env]
(->> env resolve-dependencies (map (comp io/file :jar))))
[env & [ignore-clj?]]
(let [clj-dep (symbol (boot.App/config "BOOT_CLOJURE_NAME"))
rm-clj (if-not ignore-clj?
identity
(partial remove #(= clj-dep (first (:dep %)))))]
(->> env resolve-dependencies rm-clj (map (comp io/file :jar)))))

(defn resolve-nontransitive-dependencies
[env dep]
Expand Down Expand Up @@ -281,7 +285,7 @@

(defn add-dependencies
[env]
(doseq [jar (resolve-dependency-jars env)] (add-classpath jar)))
(doseq [jar (resolve-dependency-jars env true)] (add-classpath jar)))

(defn add-dependencies-in
[pod env]
Expand Down
2 changes: 1 addition & 1 deletion version.properties
@@ -1 +1 @@
version=2.4.0
version=2.4.1

0 comments on commit 61c948f

Please sign in to comment.