Find where a Clojure namespace was loaded from
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; This fails in the repl of a project that is AOT-compiled. Not sure why. | |
;;; You can check for both the source and the compiled version of a namespace. | |
;;; Remember to munge the namespace -- foo.b-ar becomes foo/b_ar. | |
(.getResource (class #()) "clojure/core.clj") | |
;; #<URL jar:file:/home/timmc/.m2/repository/org/clojure/clojure/1.6.0/clojure-1.6.0.jar!/clojure/core.clj> | |
(.getResource (class #()) "clojure/core__init.class") | |
;; #<URL jar:file:/home/timmc/.m2/repository/org/clojure/clojure/1.6.0/clojure-1.6.0.jar!/clojure/core__init.class> | |
;;; If both are present, the class file will take precedence. If they're coming | |
;;; from different places in your filesystem, you're gonna have a bad time. (AOT conflict.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment