Source code location tracking for snap! calls.
Captures file path, line, and column information from the call site to enable automatic source editing.
Source code location tracking for snap! calls. Captures file path, line, and column information from the call site to enable automatic source editing.
(file-from-ns ns-sym)Convert a namespace to a source file path.
Examples: (file-from-ns 'still.core) => "src/still/core.clj" or "src/still/core.cljc" (file-from-ns 'my.test) => "test/my/test.clj"
Convert a namespace to a source file path. Examples: (file-from-ns 'still.core) => "src/still/core.clj" or "src/still/core.cljc" (file-from-ns 'my.test) => "test/my/test.clj"
(location-string {:keys [file line column]})Format a location map as a human-readable string.
Examples: (location-string {:file "test.clj" :line 42}) ;; => "test.clj:42"
(location-string {:file "test.clj" :line 42 :column 10}) ;; => "test.clj:42:10"
Format a location map as a human-readable string.
Examples:
(location-string {:file "test.clj" :line 42})
;; => "test.clj:42"
(location-string {:file "test.clj" :line 42 :column 10})
;; => "test.clj:42:10"(resolve-file-path filename)Resolve a source file name to an absolute path.
Searches in:
Returns nil if file cannot be found.
Resolve a source file name to an absolute path. Searches in: 1. src/ directory 2. test/ directory 3. dev/ directory 4. Current working directory Returns nil if file cannot be found.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |