tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
tolitius 2020-08-24T22:55:41.062800Z

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?

seancorfield 2020-08-24T22:58:36.063500Z

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

tolitius 2020-08-24T22:59:12.063800Z

thank you. is there a way to exclude these?

tolitius 2020-08-24T22:59:28.064300Z

when assembling a jar maybe

seancorfield 2020-08-24T22:59:36.064500Z

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

seancorfield 2020-08-24T23:00:26.065400Z

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.

tolitius 2020-08-24T23:01:06.065800Z

great, would that be a depstar repo?

seancorfield 2020-08-24T23:01:15.066Z

seancorfield/depstar

tolitius 2020-08-24T23:01:25.066300Z

yep, will do. thank you Sean

seancorfield 2020-08-24T23:02:31.066900Z

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

tolitius 2020-08-24T23:03:09.067300Z

oh.. nice. that’s fast

seancorfield 2020-08-24T23:07:00.067900Z

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

tolitius 2020-08-24T23:08:00.068600Z

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

tolitius 2020-08-24T23:25:49.069Z

in case someone sees this before the next monday:

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

seancorfield 2020-08-24T23:53:51.069600Z

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

seancorfield 2020-08-24T23:59:49.070900Z

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