depstar

Discussion around https://github.com/seancorfield/depstar
2021-04-04T17:41:44.070500Z

I'm trying out depstar to make a build with aot, and I'm having issues where classes from clojure.specs.alpha are being included in the thin jar.

2021-04-04T17:41:57.070700Z

Is there something I can do to fix that?

2021-04-04T17:42:07.071Z

I've tried the :exclude key and it doesn't seem to be working.

seancorfield 2021-04-04T17:47:07.071500Z

@suskeyhose As it says in the README: it is not recommended to AOT code for a thin (library) JAR.

seancorfield 2021-04-04T17:47:18.071700Z

Only uberjars should be AOT’d.

2021-04-04T17:52:37.072200Z

Unfortunately it's a requirement for my library because I have to gen-class something that extends Throwable.

2021-04-04T17:54:46.073400Z

Or is there something else I can do to allow users to use the library without pre-compiling?

2021-04-04T17:56:03.073600Z

@seancorfield

seancorfield 2021-04-04T18:22:49.074500Z

@suskeyhose AOT is transitive, so you get class files for everything that namespace depends on.

seancorfield 2021-04-04T18:23:37.075400Z

You could compile manually and then put only the .class files you need into the classpath.

2021-04-04T18:23:45.075700Z

Thanks. It looks like I missed the fact that the regex from the :exclude needs to match the whole filename.

seancorfield 2021-04-04T18:24:07.076200Z

Ah, OK. So, yeah, you can add lots of :exclude regexes 🙂

2021-04-04T18:24:41.076900Z

Yeah, I was able to just add one regex to match all the clojure/core/specs/alpha class files