-
Notifications
You must be signed in to change notification settings - Fork 149
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
'lein check' fails with odd error message #85
Comments
Apologies for my naivete, but what does "lein check" do? |
It simply compiles the files in your :source-paths (which is ["src"] by default in Leiningen if you don't override it) and their subdirectories, with reflection warnings enabled. It isn't necessarily a bug that this gives an error, but it is odd, and maybe worth investigating the cause, if it isn't difficult to determine. |
This is, actually, a clojure related bug. See http://dev.clojure.org/jira/browse/CLJ-979 |
Glad to hear this is being fixed. I'll close out this issue, then. |
I still see the same error with the same command for Leiningen version 2.5.0, Java 1.7.0_45, on Mac OS X 10.9.5 and Clojure 1.7.0-alpha5. |
This patch updates clojure-instaparse to 1.4.12. Due to the following AOT related error I disabled AOT compilation for this package. ``` starting phase `build' Execution error (IllegalArgumentException) at instaparse.auto-flatten-seq/fn$G (auto_flatten_seq.cljc:7). No implementation of method: :conj-flat of protocol: #'instaparse.auto-flatten-seq/ConjFlat found for class: instaparse.auto_flatten_seq.AutoFlattenSeq ``` This seems to be a known issue with AOT compilation. The issue has been discussed [1] and seems to be still an open issue. [1] Engelberg/instaparse#85 * gnu/packages/clojure.scm (clojure-instaparse): Update to 1.4.12. [arguments]: Add 'fix-import' phase. Signed-off-by: Ludovic Courtès <[email protected]>
I tried with Leiningen 2.5.0, and get the same behavior for Clojure 1.5.1, 1.6.0, and 1.7.0-alpha3. I haven't tracked down the cause of this yet, but wanted to create an issue for it in case someone figures it out. Perhaps the type hints for AutoFlattenSeq should have fully qualified names?
% lein with-profile +1.7 do clean, check
Compiling namespace instaparse.abnf
Compiling namespace instaparse.auto-flatten-seq
Compiling namespace instaparse.cfg
Compiling namespace instaparse.clone
Compiling namespace instaparse.combinators
Compiling namespace instaparse.combinators-source
Compiling namespace instaparse.core
Reflection warning, rhizome/viz.clj:72:6 - call to static method write on javax.imageio.ImageIO can't be resolved (argument types: unknown, unknown, java.io.File).
Exception in thread "main" java.lang.ClassCastException: instaparse.auto_flatten_seq.AutoFlattenSeq cannot be cast to instaparse.auto_flatten_seq.AutoFlattenSeq, compiling:(core.clj:248:14)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3602)
[... many stack trace lines elided here ... ]
Caused by: java.lang.ClassCastException: instaparse.auto_flatten_seq.AutoFlattenSeq cannot be cast to instaparse.auto_flatten_seq.AutoFlattenSeq
at instaparse.auto_flatten_seq$hash_cat.invokePrim(auto_flatten_seq.clj:149)
at instaparse.auto_flatten_seq$hash_cat.invoke(auto_flatten_seq.clj)
at instaparse.auto_flatten_seq.AutoFlattenSeq.conj_flat(auto_flatten_seq.clj:111)
The text was updated successfully, but these errors were encountered: