Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Completed
-
Affects Version/s: Release 1.9
-
Fix Version/s: Release 1.9
-
Component/s: None
-
Labels:
-
Approval:Vetted
Description
Reported by Tom F for the autodoc process. The following (essentially) is what autodoc is doing that currently blows up:
tom@renoir:~/src/clj/autodoc-work-area/clojure/src$ java -cp clojure.jar clojure.main Clojure 1.9.0-master-SNAPSHOT user=> (load-file "src/clj/clojure/spec.clj") CompilerException java.lang.IllegalArgumentException: No implementation of method: :conform* \ of protocol: #'clojure.spec/Spec found for class: clojure.spec$regex_spec_impl$reify__14279, \ compiling:(/home/tom/src/clj/autodoc-work-area/clojure/src/src/clj/clojure/spec.clj:684:1)
Cause: There is code in Compiler.macroexpand() with the intention to suspend spec checking inside clojure.spec. However, it is currently doing an exact path match on SOURCE_PATH. In the load-file call above, this ends up being an absolute path.
Approach: Use the system property -Dclojure.spec.skip-macros=true to avoid encountering this issue
Lot of stuff has changed since this was filed. The repro for this is now something you can do in the spec.alpha project (this was filed before spec split):
Since 1.9.0-beta3, you can now avoid this problem by using the System property to turn off spec macro checking while compiling spec itself:
This should be the approach used here.