Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Using ant to build clojure-contrib.jar causes clojure.contrib.logging to be AOT-compiled.
This means that the classpath at contrib build time affects which logging implementation is used, not the classpath in use when the code using c.c.l is compiled.
Using a standard pre-built clojure-contrib.jar one can never use anything but java.util.logging! That's bad for anyone who uses released snapshots, or who uses different log implementations on different projects, but doesn't want to maintain different builds of clojure-contrib.jar.
Furthermore, someone building clojure-contrib.jar with, say, log4j in their classpath will produce a jar in which c.c.l will fail when log4j is unavailable:
user=> (use 'clojure.contrib.logging)
java.lang.NoClassDefFoundError: org/apache/log4j/Level (NO_SOURCE_FILE:0)
c.c.l should be adjusted so that the logging implementation is not discovered until runtime, or otherwise be removed from the AOT-compiled set.
Converted from http://www.assembla.com/spaces/clojure/tickets/44
Attachments:
0001-Delayed-detection-of-logging-implementation.-See-44.patch - https://www.assembla.com/spaces/clojure/documents/deght-7A8r3P1ZeJe5aVNr/download/deght-7A8r3P1ZeJe5aVNr
logging-aotc-compatible.patch - https://www.assembla.com/spaces/clojure/documents/asSL5Ea1qr34B3eJe5aVNr/download/asSL5Ea1qr34B3eJe5aVNr
actual-aotc-fix.patch - https://www.assembla.com/spaces/clojure/documents/b3wOBUbi0r37IeeJe5aVNr/download/b3wOBUbi0r37IeeJe5aVNr