tools-build 2022-06-24

I'm a tools.build noob and trying to quickly build an uberjar. I followed the instructions here: https://clojure.org/guides/tools_build But when I try to build it I get this error:

clj -T:build uber
Error building classpath. Bad coordinate for library :ns-default, expected map: build
What am I doing wrong? My build.clj is here: https://github.com/jumarko/clojure-experiments/pull/5/files#diff-5e404fc7ef47dfb3139017bcd1ff83f7c1214c3f5d3f73fcde5f4ca466b59f16 (deps.edn below)

Your deps.edn had a misplaced }.

:ns-default shouldn't be part of :deps

Ah, great catch - thanks!

@seancorfield i’m using build-clj to build an uberjar with some git deps that i need to include. i’m using :transitive true to get the git deps into the uberjar proper. one of the git deps has a transitive dependency https://github.com/cognitect-labs/aws-api/issues/205#issuecomment-1164833972`data.xml`, so i’ve added an :exclusion. this works in the repl, etc. however that excluded dep shows up in the uberjar. i did some digging and it looks like lifted-basis doesn’t propagate exclusions from parent libs. is this intentional? (i’ve not used polylith so i’m not sure if there’s a reason hidden there somewhere)

Can you create a minimal, self-contained example as a GitHub repo, and create an issue against build-clj pointing to that with complete, step-by-step instructions?

yessir

I'm finding it hard to visualize what you're describing without seeing it all in code.

ya i feel that, i’ll ping when it’s up

I suspect https://github.com/seancorfield/build-clj/blob/main/src/org/corfield/build.clj#L128 should use (select-keys coords [:mvn.version :exclusions]) (and a bit of tidying up in that whole conditional -- it doesn't support :default-deps either right now, based on expecting :mvn.version to be non-`nil`.

ya, tinkering around and using :exclusions from (:parents coords) worked locally for me

OK, no need for a MSCE repo -- but please still create the issue so I don't forget (I'm deep in Java interop/rewriting ATM).

🙇‍♂️ 1
✅ 1

@douglassdarin Could you try build-clj with :git/sha "5b86a6e7c600993cbde06133bf9c7632f2cb3a1f" (and comment out the :git/tag for now) and see if that fixes the problem?

I just want to see if my supposition is correct.

sure, one sec

❯ jar tf target/*.jar | grep aalto
❯

looks good to me

Thank you! I'll try to get a proper updated release out "soon" but it may be next week...

no worries, i’ve a workaround in place at the moment

I may wait until there's a new tools.build version so I don't have to think about version numbers 🙂

lol i feel that 😛