On Thursday, November 21, 2013 10:12:55 AM UTC-5, David Nolen wrote: > ClojureScript, the Clojure compiler that emits JavaScript source code. > > > README and source code: https://github.com/clojure/clojurescript > > > > New release version: 0.0-2060 > > > Leiningen dependency information: > > > [org.clojure/clojurescript "0.0-2060"] > > > Source map accuracy is considerably improved in this release. Source > > maps now work great under incremental compilation regardless of the > level of optimization. PersistentVector performance is considerably > improved for conj and instantiation. > > > > Enhancements: > * CLJS-683: :source-map-path compiler option to simplify web server > integration > * enable-console-print! for console.log based printing > * *print-length* now supported > > > > Bug fixes: > * CLJS-691: IComparable for keywords and symbols > * CLJS-674: relativization of source map paths
I'm stuck with java 6 on an old MacAir. This patch does the same thing without using java 7 methods. All asserts in these files pass on Mac and Linux. diff --git a/src/clj/cljs/closure.clj b/src/clj/cljs/closure.clj index b13adf0..e67409c 100644 --- a/src/clj/cljs/closure.clj +++ b/src/clj/cljs/closure.clj @@ -987,8 +987,8 @@ (defn same-or-subdirectory-of? [dir path] "Checks that path names a file or directory that is the dir or a subdirectory there of." - (let [dir-path (.toAbsolutePath (.toPath (io/file dir))) - path-path (.toAbsolutePath (.toPath (io/file path)))] + (let [dir-path (.getCanonicalPath (io/file dir)) + path-path (.getCanonicalPath (io/file path))] (.startsWith path-path dir-path))) (defn check-output-to [{:keys [output-to] :as opts}] diff --git a/src/clj/cljs/source_map.clj b/src/clj/cljs/source_map.clj index 9363601..edc5739 100644 --- a/src/clj/cljs/source_map.clj +++ b/src/clj/cljs/source_map.clj @@ -165,14 +165,12 @@ :default (let [unrelativized-jpath (-> bare-munged-path io/file - .toPath - .toAbsolutePath) + .toURI) source-map-parent-jpath (-> source-map io/file - .toPath - .toAbsolutePath - .getParent)] - (str (.relativize source-map-parent-jpath unrelativized-jpath)))))) + .getParentFile + .toURI)] + (.getPath (.relativize source-map-parent-jpath unrelativized-jpath)))))) (defn encode "Take an internal source map representation represented as nested > * CLJS-687: error when deftype/record used as a function > > * CLJS-639: warnings when record initialized incorrectly > * CLJS-672: source maps + optimizations + :libs breaks building > * CLJS-676: source map stale under incremental compilation + closure > optimization > > * CLJS-684: throw on circular dependency > * CLJS-583: duplicate keys in sets > * CLJS-680: function name shadows JS globals > * CLJS-699: namespaced keyword regression > * CLJS-647: js-obj keys could not be expressions -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.