I'm getting
; Syntax error (IndexOutOfBoundsException) compiling fn* at (src/yamlscript/runtime.clj:106:1).
; Method code too large!
when I added clojure.core.async to https://github.com/yaml/yamlscript/blob/main/core/src/yamlscript/runtime.clj#L114-L129
but then if I comment out a few of the other namespace args, it is fine.
I guess there's a limit here?Revisiting. My search on the message was too specific as it involved SCI. https://stackoverflow.com/a/34278743/721703 is helpful.
I'm pretty sure this error isn't sci related. It tends to happen when you use macros to generate a ton of code in a single form like you're doing here.
The fix is to split the building of the map you're passing to sci/init into separate top level forms. I think you can also split things up by wrapping things in a fn so that the clojure compiler doesn't have to generate too much code within a single method, but I don't quite remember the details.
Maybe something like:
;; extra parens to call the inlined function.
(
(fn []
...code here...)
)Agreed and thanks. Afk for a few hours but will try after that
searching for "Method code too large!" and clojure will probably get your more info.
Yeah I actually did all the searching before I asked. Didn't really get anything interesting. But then when I commented out other parameters and it worked fine and I realized something was getting too much