Fork me on GitHub
#depstar
<
2021-04-04
>
Joshua Suskalo17:04:44

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.

Joshua Suskalo17:04:57

Is there something I can do to fix that?

Joshua Suskalo17:04:07

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

seancorfield17:04:07

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

seancorfield17:04:18

Only uberjars should be AOT’d.

Joshua Suskalo17:04:37

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

Joshua Suskalo17:04:46

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

seancorfield18:04:49

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

seancorfield18:04:37

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

Joshua Suskalo18:04:45

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

seancorfield18:04:07

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

Joshua Suskalo18:04:41

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