Skip to content
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

Support AOT ClojureScript? #150

Open
aengelberg opened this issue Dec 25, 2016 · 2 comments
Open

Support AOT ClojureScript? #150

aengelberg opened this issue Dec 25, 2016 · 2 comments

Comments

@aengelberg
Copy link
Collaborator

Replacing the cljs dependency in this project with [org.clojure/clojurescript "1.8.40" :classifier "aot"] and running lein test-cljs results in many weird warnings:

WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 3 /Users/alex/git/instaparse/src/instaparse/util.cljc
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 9 /Users/alex/git/instaparse/src/instaparse/util.cljc
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 34 /Users/alex/git/instaparse/src/instaparse/combinators_source.cljc
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 44 /Users/alex/git/instaparse/src/instaparse/combinators_source.cljc
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 54 /Users/alex/git/instaparse/src/instaparse/combinators_source.cljc
WARNING: Use of undeclared Var instaparse.gll/RecordIter at line 176 /Users/alex/git/instaparse/src/instaparse/gll.cljc
WARNING: Use of undeclared Var instaparse.gll/RecordIter at line 176 /Users/alex/git/instaparse/src/instaparse/gll.cljc
WARNING: Use of undeclared Var instaparse.gll/RecordIter at line 226 /Users/alex/git/instaparse/src/instaparse/gll.cljc
WARNING: Use of undeclared Var instaparse.gll/RecordIter at line 226 /Users/alex/git/instaparse/src/instaparse/gll.cljc
WARNING: Use of undeclared Var instaparse.gll/RecordIter at line 250 /Users/alex/git/instaparse/src/instaparse/gll.cljc
WARNING: Use of undeclared Var instaparse.gll/RecordIter at line 250 /Users/alex/git/instaparse/src/instaparse/gll.cljc
WARNING: Use of undeclared Var instaparse.line-col/RecordIter at line 7 /Users/alex/git/instaparse/src/instaparse/line_col.cljc
WARNING: Use of undeclared Var instaparse.line-col/RecordIter at line 7 /Users/alex/git/instaparse/src/instaparse/line_col.cljc
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 69 /Users/alex/git/instaparse/target/cljsbuild-compiler-0/cljs/reader.cljs
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 100 src/instaparse/abnf.cljc
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 46 src/instaparse/core.cljc
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 97 src/instaparse/core.cljc
WARNING: Use of undeclared Var instaparse.core/RecordIter at line 137 src/instaparse/core.cljc
WARNING: Use of undeclared Var instaparse.core/RecordIter at line 137 src/instaparse/core.cljc
WARNING: Wrong number of args (3) passed to cljs.core/IndexedSeq at line 170 src/instaparse/core.cljc
Successfully compiled "target/js/none.js" in 2.657 seconds.

That's just for the :none compile, but there are even more warnings for the advanced compile right after.

And some test errors:

Ran 18 tests containing 9483 assertions.
1 failures, 5 errors.

This is likely the cause of lbradstreet#20.

@aengelberg
Copy link
Collaborator Author

I don't really understand what's significantly different about the AOT'd version. There's something big I must be missing with regards to the assumptions made in the Instaparse code and how those break down in AOT'd ClojureScript.

@danielcompton
Copy link

My (obviously incorrect) assumption was that AOT ClojureScript was just a transparent performance boost. Although now I think about it, is it possible that it's the macro layer running on JVM that's the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants