File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 89
89
(str " Use of undeclared Var " (:prefix info) " /" (:suffix info)))
90
90
91
91
(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))))
94
96
95
97
(defmethod error-message :dynamic
96
98
[warning-type info]
369
371
; ; macros may refer to namespaces never explicitly required
370
372
; ; confirm that the library at least exists
371
373
(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) })))
373
375
374
376
(defn core-name?
375
377
" Is sym visible from core in the current compilation namespace?"
1132
1134
(analyze-file src opts)
1133
1135
(throw
1134
1136
(error env
1135
- (error-message :undeclared-ns {:ns-sym dep}))))))))))
1137
+ (error-message :undeclared-ns {:ns-sym dep :path relpath }))))))))))
1136
1138
1137
1139
(defn check-uses [uses env]
1138
1140
(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."
477
477
478
478
(defn source-for-namespace
479
479
[ns compiler-env]
480
- (let [ns-str (str (comp/munge ns ))
480
+ (let [ns-str (str (comp/munge ns {} ))
481
481
path (string/replace ns-str \. \/)
482
482
relpath (str path " .cljs" )]
483
483
(if-let [cljs-res (io/resource relpath)]
You can’t perform that action at this time.
0 commit comments