This is a good clarification. I found that when I tried to exclude some AOT stuff from the jar you can get into a situation where Clojure will dynamically produce a class that is already statically-produced at the root classloader and then you'll hit ClassPathExceptions when you try to pass these things around.
For example I had dynamic (non-AOT'd) code paths using a defrecord, for which a .class file was generated dynamically. So if I kept the AOT'd defrecord, as well, I'd have two classes one in the root classloader and one from dynamic clojure (DynamicClassLoader). So if what you're saying is possible, I think you will have to show quite a bit of careful surgery to avoid these kinds of problems? On Thursday, June 20, 2019 at 11:13:41 PM UTC-5, Didier wrote: > > Option #1 and #3 are very much the same, just that Option #3 creates a > Java layer on top, instead of having everything coupled to the Clojure Java > APIs directly. > > When you go with Option #2, you do not have to AOT everything, but AOT is > transitive. So as you AOT the gen class, all code it requires and all code > they in turn require will also be AOT. You can post-process the AOT when > jaring, and only include the gen-class .class files in the Jar and not the > dependencies, but that's more work. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/02a72bb0-9a6f-4574-9134-2d8983db8b81%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.