Closed t-matsudate closed 2 years ago
Hiccup pre-compiles the data structure into code in order to speed up execution. It looks like you're hitting the inbuild JVM limits of how much code can be in a single method.
It probably doesn't show in earlier versions because Hiccup 2.0 supports more functionality, and therefore happens to produce more code in your particular case. Hiccup 1.0 would run into the same problem, just at a later point.
If performance isn't an issue, you can wrap your code in a function:
(defn html5* [& data]
(hiccup/html5 data))
This ensures pre-compilation isn't used. Otherwise, split your Hiccup data into smaller functions. It's generally more idiomatic to write smaller Clojure functions than larger ones.
In future we could potentially solve this by dividing code into functions automatically, but that will need a PR and some significant work.
Thank you for telling how to solve this issue! I'll try to split the code making the html vectors more smaller, and will retry to use hiccup 2.0.0-alpha.
I tried to use hiccup 2.0.0-alpha2 with following code:
Then, somehow following syntax error has occured:
Preconditions:
What is occuring in hiccup 2.0.0-alpha?