File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,11 @@ case."
135
135
(some (fn [provide] (get-in index [provide :file ]))
136
136
(:provides lib-spec))))
137
137
138
+ (defn lib-spec-merge [a b]
139
+ (merge a
140
+ (cond-> b
141
+ (contains? a :provides ) (dissoc :provides ))))
142
+
138
143
(defn build-index
139
144
" Index a list of dependencies by namespace and file name. There can
140
145
be zero or more namespaces provided per file. Upstream foreign libraies
@@ -148,7 +153,7 @@ case."
148
153
(reduce
149
154
(fn [index' provide]
150
155
(if (:foreign dep)
151
- (update-in index' [provide] merge dep)
156
+ (update-in index' [provide] lib-spec- merge dep)
152
157
; ; when building the dependency index, we need to
153
158
; ; avoid overwriting a CLJS dep with a CLJC dep of
154
159
; ; the same namespace - António Monteiro
@@ -165,7 +170,7 @@ case."
165
170
index)]
166
171
(if (:foreign dep)
167
172
(if-let [file (get-file dep index')]
168
- (update-in index' [file] merge dep)
173
+ (update-in index' [file] lib-spec- merge dep)
169
174
(throw
170
175
(Exception.
171
176
(str " No :file provided for :foreign-libs spec " (pr-str dep)))))
You can’t perform that action at this time.
0 commit comments