This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-24
Channels
- # announcements (39)
- # aws (4)
- # babashka (18)
- # beginners (32)
- # biff (10)
- # calva (22)
- # clj-kondo (11)
- # clj-on-windows (2)
- # cljs-dev (20)
- # clojure (31)
- # clojure-europe (130)
- # clojure-norway (21)
- # clojure-spec (24)
- # clojure-uk (17)
- # clojured (2)
- # clojurescript (6)
- # conjure (1)
- # core-async (5)
- # cursive (11)
- # datalevin (1)
- # datomic (9)
- # emacs (24)
- # figwheel-main (42)
- # fulcro (6)
- # gratitude (6)
- # honeysql (8)
- # juxt (16)
- # kaocha (6)
- # lsp (235)
- # malli (2)
- # nbb (7)
- # off-topic (23)
- # other-languages (24)
- # pedestal (7)
- # reitit (6)
- # sci (1)
- # shadow-cljs (21)
- # tools-build (22)
- # tools-deps (57)
- # vim (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)@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).
@U02EA2T7FEH 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 😛