Clojure-Contrib

Clojure AOT compilation will compile unwanted classes

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

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.

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/23
Hide
Assembla Importer added a comment -

stuart.sierra said: 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)

Show
Assembla Importer added a comment - stuart.sierra said: 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)
Hide
Assembla Importer added a comment -

stuart.sierra said: 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.

Show
Assembla Importer added a comment - stuart.sierra said: 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.
Hide
Assembla Importer added a comment -

technomancy said: This is a Clojure issue, not a Contrib issue.

Show
Assembla Importer added a comment - technomancy said: This is a Clojure issue, not a Contrib issue.

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: