need to build a thin jar with one namespace aot compiled. the namespace has no dependencies:
{:paths ["src" "classes"]
:deps {}
:aliases {:jar {:extra-deps {seancorfield/depstar {:mvn/version "1.0.97"}}
:main-opts ["-m" "hf.depstar.jar" "yang.jar"]}}}
$ clj -e "(compile 'yang.java)"; clj -A:jar
it does work, but it also brings these along:
0 Mon Aug 24 18:45:40 EDT 2020 clojure/core/
0 Mon Aug 24 18:45:40 EDT 2020 clojure/core/specs/
932 Mon Aug 24 18:45:39 EDT 2020 clojure/core/specs/alpha$fn__40.class
1178 Mon Aug 24 18:45:39 EDT 2020 clojure/core/specs/alpha$fn__65$fn__71.class
798 Mon Aug 24 18:45:39 EDT 2020 clojure/core/specs/alpha$fn__46.class
929 Mon Aug 24 18:45:39 EDT 2020 clojure/core/specs/alpha$fn__27.class
936 Mon Aug 24 18:45:39 EDT 2020 clojure/core/specs/alpha$fn__101.class
929 Mon Aug 24 18:45:39 EDT 2020 clojure/core/specs/alpha$fn__25.class
...
I might be missing some args in depstar
?@tolitius Clojure core uses specs for language features (as macros), so those get dragged in because of that.
thank you. is there a way to exclude these?
when assembling a jar maybe
You'd have to manually remove them after your compile
step right now.
Feel free to open an issue on GH with those repro steps and I'll see about adding an option to exclude stuff via regex.
great, would that be a depstar repo?
seancorfield/depstar
yep, will do. thank you Sean
There's already quite a few changes on develop so if I incorporate that exclusion this week, I'll cut a 1.1 release.
oh.. nice. that’s fast
I'm off work Thu/Fri so I expect I'll do a round of OSS updates and releases before next Monday 🙂
https://github.com/seancorfield/depstar/issues/37 wut it’s going to take a week?? ) yea, of course this is not urgent. I can remove these manually for now. thanks again
in case someone sees this before the next monday:
clj -e "(compile 'yang.java)"; clj -A:jar; zip -d yang.jar clojure/\*;
does it@tolitius If you don't mind depending on develop, you can test that right now.
Note that it excludes files not directories, so you'd still get the (empty) clojure/core/
and clojure/core/specs/
folders if you --exclude "clojure/.*"