File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8989 (str " Use of undeclared Var " (:prefix info) " /" (:suffix info)))
9090
9191(defmethod error-message :undeclared-ns
92- [warning-type info]
93- (str " No such namespace: " (:ns-sym info)))
92+ [warning-type {:keys [ns-sym path] :as info}]
93+ (str " No such namespace: " ns-sym
94+ (when path
95+ (str " , could not locate " path))))
9496
9597(defmethod error-message :dynamic
9698 [warning-type info]
369371 ; ; macros may refer to namespaces never explicitly required
370372 ; ; confirm that the library at least exists
371373 (nil? (io/resource (util/ns->relpath ns-sym))))
372- (warning :undeclared-ns env {:ns-sym ns-sym})))
374+ (warning :undeclared-ns env {:ns-sym ns-sym :path ( util/ns->relpath ns-sym) })))
373375
374376(defn core-name?
375377 " Is sym visible from core in the current compilation namespace?"
11321134 (analyze-file src opts)
11331135 (throw
11341136 (error env
1135- (error-message :undeclared-ns {:ns-sym dep}))))))))))
1137+ (error-message :undeclared-ns {:ns-sym dep :path relpath }))))))))))
11361138
11371139(defn check-uses [uses env]
11381140 (doseq [[sym lib] uses]
Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ should contain the source for the given namespace name."
477477
478478(defn source-for-namespace
479479 [ns compiler-env]
480- (let [ns-str (str (comp/munge ns ))
480+ (let [ns-str (str (comp/munge ns {} ))
481481 path (string/replace ns-str \. \/)
482482 relpath (str path " .cljs" )]
483483 (if-let [cljs-res (io/resource relpath)]
You can’t perform that action at this time.
0 commit comments