File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
## master (unreleased)
4
+ * [ #158 ] ( https://github.com/clojure-emacs/orchard/issues/158 ) : Make classpath-namespaces resilient to faulty ns declarations.
4
5
5
6
## 0.9.2 (2022-02-22)
6
7
Original file line number Diff line number Diff line change 31
31
(cond
32
32
(#{::eof ::fail } found) nil
33
33
(and (list? found)
34
- (-> found first #{`ns 'ns}))
34
+ (-> found first #{`ns 'ns})
35
+ (symbol? (second found)))
35
36
(second found)
36
37
:else (recur ))))))
37
38
Original file line number Diff line number Diff line change 62
62
(testing " when multiple ns forms are present"
63
63
(spit url " (ns ns1) (ns ns2) (ns ns3)" )
64
64
(is (= 'ns1 (sut/read-namespace uri))))
65
+ (testing " when ns form is invalid"
66
+ (spit url " (ns (:require [clojure.string]))" )
67
+ (is (nil? (sut/read-namespace uri))))
65
68
(testing " of top-level forms only"
66
69
(spit url " (comment (ns ns1)) (ns ns2) (ns ns3)" )
67
70
(is (= 'ns2 (sut/read-namespace uri))))
You can’t perform that action at this time.
0 commit comments