Skip to content
This repository has been archived by the owner on Jun 22, 2020. It is now read-only.

force-compilation? doesn't work. #29

Open
jjttjj opened this issue Aug 20, 2018 · 2 comments
Open

force-compilation? doesn't work. #29

jjttjj opened this issue Aug 20, 2018 · 2 comments

Comments

@jjttjj
Copy link

jjttjj commented Aug 20, 2018

Out of the box, in a fresh clojurescript repl, I get the following error:
(hipo/create [:div "a"] {:force-compilation? true})
Error: Failed to compile
Coming from this line of code: https://github.com/jeluard/hipo/blob/master/src/hipo/compiler.clj#L177

@jjttjj
Copy link
Author

jjttjj commented Aug 21, 2018

I think the problem is this line

el# ~(if (:force-interpretation? m) `(hipo.interpreter/create ~v ~m) `(hc/compile-create ~v ~m))]

Specifically, in (hc/compile-create ~v ~m)), the unquoted v is a symbol and compile-create cannot handle a symbol.

This seems to be causing hipo to always use the interpreter.

I'll try to wrap my head more completely around the issue (is the outer let binding in create needed at all?) and submit a PR.

@jeluard
Copy link
Owner

jeluard commented Aug 24, 2018 via email

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

No branches or pull requests

2 participants