On Jan 7, 2009, at 2:04 PM, Shawn Hoover wrote:

Clojure developers, would it be a good idea for Compiler.java or clojure.core/compile to check if *compile-path* exists, else throw an exception specific to that problem?

I like the idea. There is a subtle problem I don't think it will catch though. The JRE appears to scan CLASSPATH only once at startup checking whether each item in it is actually a viable jar file or directory. If a path appears in CLASSPATH, but does not exist at JRE startup, but does exist at compile time, compilation will still fail and it will still be very hard to figure out why.

Perhaps this is a case for speculation in the error message:

        - Exception: Compilation target directory doesn't exist
- Exception: Compilation target directory exists, but load-after- compile failed, did it exist when the JVM was launched?

(assuming the latter is detectable)

--Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to