jlesquembre / clj-nix

Nix helpers for Clojure projects
https://jlesquembre.github.io/clj-nix/
Eclipse Public License 2.0
139 stars 20 forks source link

Feature request: pre-compilation support for deps-cache #38

Open thenonameguy opened 1 year ago

thenonameguy commented 1 year ago

To speed up larger projects' eventual uberjar compilation, it would be great if clj-nix supplied a new lib function for compiling Clojure code for the dependencies returned by mk-deps-cache.

It should produce a derivation that can be symlinked into target/ folder, such that the development env (NREPL/socket repl) can automatically pick up the compiled versions of the libraries.

Uberjar compilation could accept a new argument that takes the pre-compiled classes, so they can be reused from CI. This way projects would only compile their own source code, cutting down on overall execution time quite significantly.

jlesquembre commented 1 year ago

Thanks for the suggestion, it makes sense, and I like improvements to speed up the compilation. But to be honest, in the projects I'm working on, compilation speed is ok, they aren't that big. I'd like to implement such improvement, but for me, it has low priority.