Skip to content

Commit

Permalink
CLJS-1948: Possible race condition in compiler w/ parallel-build true
Browse files Browse the repository at this point in the history
the issue was that duplicate compiler inputs could appear. We were using distinct before but for various reasons this is not good enough. We now use :provides as the uniquely identifying bit about a compiler input.
  • Loading branch information
dnolen committed Feb 24, 2017
1 parent 46dcd22 commit 04541fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/clojure/cljs/js_deps.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
;; You must not remove this notice, or any other, from this software.

(ns cljs.js-deps
(:require [clojure.java.io :as io]
(:require [cljs.util :refer [distinct-by]]
[clojure.java.io :as io]
[clojure.string :as string])
(:import [java.io File]
[java.net URL URLClassLoader]
Expand Down Expand Up @@ -194,7 +195,7 @@ case."
[coll]
(let [state (build-index (map pack-string coll))]
(map unpack-string
(distinct
(distinct-by :provides
(:order (reduce dependency-order-visit (assoc state :order []) (keys state)))))))


Expand Down

0 comments on commit 04541fb

Please sign in to comment.