With AOT, you generally shouldn't ever exclude part of the AOT'ed code. Most problems with AOT'ed code stem from having AOT'ed code call into non-AOT'ed code, so anything "downstream" should also be AOT'ed.
On Fri, Jun 21, 2019 at 10:01 AM eglue <atdi...@gmail.com> wrote: > 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 a topic in the > Google Groups "Clojure" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure/aejqMwraPk8/unsubscribe. > To unsubscribe from this group and all its topics, 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 > <https://groups.google.com/d/msgid/clojure/02a72bb0-9a6f-4574-9134-2d8983db8b81%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAOdgdgz-dbt67Ec90J7q2Ff3OEu-Qz38RQ9VA5VuQMfq9qQAhQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.