simuons / rules_clojure

Clojure rules for Bazel
Apache License 2.0
34 stars 8 forks source link

Add clojure_java_library rule #43

Closed simuons closed 3 years ago

simuons commented 3 years ago

Having aots in clojure_library might be not the best idea.

For regular clojure flow you shouldn't need to compile to java anything. If you decide that you need shift from clojure to java it should be stated explicitly. (Usually it's for deployment and interop) Problem with aots in clojure_library is that compile is eager. There is a mismatch were clojure_library should bundle only direct sources but with aot option library suddenly contains all transitive namespaces compiled. Separate rule would give an ability to tune compile options per target (not implemented)