typelead / etlas

Etlas, the build tool and package manager for the Eta programming language
63 stars 10 forks source link

suggestion: use clojure aot mechanism to reduce jar size. #101

Closed clojurians-org closed 5 years ago

clojurians-org commented 5 years ago

haskell compile too much class file, it led to its big jar size.

clojure has a simple solution for this situation for reference.

it has pomegranate library(just like haskell hint library), it can be used to load clojure file in runtime to generate class dynamically. it also publish clj file as maven repository directrly.

in case we need the same physical class sometimes, it offer the aot mechanism to compile only little needed class file before script interpretion procecure. the situation is: 1) export physical jar class implement used by java project 2) some library use refletion mechanism to load class, so the physical class file must exist.

the reference doc is: https://clojure.org/reference/compilation