New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Fix bug with no :file
for info
on namespaces w/o defs
#76
Changes from 3 commits
754ae06
8eadc1a
66b8f5c
ff80f85
fb60d19
1a65423
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ pom.xml | |
pom.xml.asc | ||
*.jar | ||
*.class | ||
.cljs_nashorn_repl/ | ||
nashorn_code_cache/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,11 +268,15 @@ | |
(meta ns) | ||
{:ns (ns-name ns) | ||
:name (ns-name ns) | ||
:file (-> (ns-publics ns) | ||
first | ||
second | ||
var-meta | ||
:file) | ||
:file (or | ||
(-> (ns-publics ns) | ||
first | ||
second | ||
var-meta | ||
:file) | ||
(-> | ||
(ns/canonical-source ns) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guessing when you try this manually it actually works (instead of returning nil), right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! This would have made me fail fix BetterThanTomorrow/calva#427 even when we find out why the cljs tests fail. 😄 |
||
.getPath)) | ||
:line 1}))) | ||
|
||
;;; ## Manipulation | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(ns ^{:doc "Namespace w/o any `def`s, issue #75"} | ||
orchard.test-no-defs) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,3 +110,14 @@ | |
(docs/clean-cache!) | ||
(testing "Including see-also is skipped" | ||
(is (not (contains? (m/var-meta (resolve 'clojure.set/union)) :see-also)))))) | ||
|
||
(deftest ns-meta-test | ||
(testing "Includes a non-nil :file" | ||
(is (some-> 'orchard.test-ns-dep | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the need for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the whole thread that should return something not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My bad. Too much multitasking. :D |
||
(find-ns) | ||
(m/ns-meta) | ||
:file)) | ||
(is (some-> 'orchard.test-no-defs ;; issue #75 | ||
(find-ns) | ||
(m/ns-meta) | ||
:file)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can extract this as a function -
ns-file
.