Fork me on GitHub
#tools-deps
<
2020-08-24
>
tolitius22:08:41

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?

seancorfield22:08:36

@tolitius Clojure core uses specs for language features (as macros), so those get dragged in because of that.

tolitius22:08:12

thank you. is there a way to exclude these?

tolitius22:08:28

when assembling a jar maybe

seancorfield22:08:36

You'd have to manually remove them after your compile step right now.

seancorfield23:08:26

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.

tolitius23:08:06

great, would that be a depstar repo?

seancorfield23:08:15

seancorfield/depstar

tolitius23:08:25

yep, will do. thank you Sean

seancorfield23:08:31

There's already quite a few changes on develop so if I incorporate that exclusion this week, I'll cut a 1.1 release.

tolitius23:08:09

oh.. nice. that’s fast

seancorfield23:08:00

I'm off work Thu/Fri so I expect I'll do a round of OSS updates and releases before next Monday 🙂

tolitius23:08:00

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

tolitius23:08:49

in case someone sees this before the next monday:

clj -e "(compile 'yang.java)"; clj -A:jar; zip -d yang.jar clojure/\*;
does it

seancorfield23:08:51

@tolitius If you don't mind depending on develop, you can test that right now.

seancorfield23:08:49

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/.*"