Arrow_left   Arrow_right
 
  #23

Clojure AOT compilation will compile unwanted classes

    • Status: Invalid
    • Priority: Normal (3)
    • Component: -
    • Permission type: None
    My build file specifies the namespaces to AOT compile but if I include another namespace (even from a JAR dependency) that is not AOT compiled, the other namespace will be compiled as well.

    In my case, I was using clojure-contrib's clojure.contrib.str-utils2 namespace, and I got a bunch of clojure/contrib/str_utils2 classes in my output directory.

    I think that the AOT compiler should NOT precompile any namespaces that are transitively reached, only namespaces in the set specified by the command line are appropriate.

    As currently coded, you will frequently find unwanted third-party dependencies in your output JARs; further, if multiple parties depend on the same JARs, this could cause bloating and duplication in the eventual runtime classpath.

    Note: I'm tracking against master for both clojure and clojure-contrib.
  • Followers
     
    Ico-users Howard Lewis Ship 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
     
    User picture

          on Jan 30, 2010 @ 09:33PM UTC * By stuartsierra

    Milestone set to Backlog
    Updating tickets (#1, #2, #3, #4, #6, #20, #23, #25, #30, #31, #33, #34, #35, #37, #38, #52, #55, #58, #59, #60, #61, #62, #63, #64)
    User picture

          on Feb 03, 2010 @ 11:08AM UTC * By stuartsierra

    I don't quite understand this ticket, but clojure-contrib is no longer AOT-compiled by default except for those namespaces that need it.

    Note that Clojure generates one class per fn, so one AOT-compiled namespace produces many classes.
    User picture

          on Apr 12, 2010 @ 06:03PM UTC * By technomancy

    Status changed from New to Invalid
    This is a Clojure issue, not a Contrib issue.
    Time Expenditure
    Loading