This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-27
Channels
- # announcements (1)
- # beginners (54)
- # biff (7)
- # calva (6)
- # cider (7)
- # clojure (9)
- # clojure-art (3)
- # clojure-europe (27)
- # clojure-gamedev (16)
- # clojurescript (15)
- # editors (2)
- # emacs (1)
- # events (1)
- # fulcro (24)
- # gratitude (23)
- # humbleui (6)
- # lsp (9)
- # malli (3)
- # off-topic (52)
- # pathom (5)
- # portal (1)
- # rdf (9)
- # reveal (3)
- # shadow-cljs (52)
- # specter (2)
- # tools-build (9)
- # tools-deps (11)
- # tree-sitter (1)
- # xtdb (21)
Hello all, I don't know why but starting from 2.20.11
of shadow-cljs
, I'm having problems to use build.clj
and uber
.
why is shadow-cljs a part of that at all? none of shadow-cljs should end up in the uberjar?
I'm getting this error
Execution error (IllegalArgumentException) at clojure.tools.build.tasks.uber/explode (uber.clj:152).
/ is not a relative path
(b/uber {:class-dir class-dir
:uber-file uber-file
:basis basis
:exclude ["LICENSE"]
:main 'backend.application
:manifest {"Git-Revision" (str/trim-newline (:out (shell/sh "git" "rev-parse" "HEAD")))
"Git-Tags" (->> (:out (shell/sh "git" "tag" "--points-at" "HEAD"))
(str/split-lines)
(str/join " "))
"Build-Time" (.format (java.time.ZonedDateTime/now) (java.time.format.DateTimeFormatter/ISO_DATE_TIME))}})
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def uber-file "target/app.jar")
I don't see anything related to shadow-cljs
, but when I use 2.20.11
it gives that error
but I ask again. why is shadow-cljs involved in a uberjar creation? it absolutely under no circumstance should be in any uberjar ever
Sorry @thheller if I was not clear. As I referenced before, it does not have any reference to the uberjar
process, I'm only referencing that in version 2.20.11
the problem shows up and I'm posting here the problem. When I use version 2.20.10
the problem is not happening.
what I mean is: you seem to have shadow-cljs in deps.edn either directly or in an alias ACTIVE while building the uberjar
that SHOULD NOT be done. put it into a cljs alias or whatever that is not active when building the uberjar
https://clojurians.slack.com/archives/C6N245JGG/p1668750585171269 I had similar issue with .12 and .10 works. not necessarily an issue with shadow but one of those situation that java libs have conflict. the workaround for me is to use .10
I would just stick to .10 and feel that this is not worth looking into for now. It'll go away I believe.
I doubt that. I mean your issue was a guava version conflict. that is not going to solve itself
https://github.com/thheller/shadow-cljs/commit/2b143d0ce5046fb1af81bb9ea368cb4eb4ece5a6 this? remove guava dep
only added since the closure-compiler didn't properly declare
it itself. this is now fixed, so this is no longer needed.
the closure-compiler has always depended on guava. but for a while it didn't declare it properly and just included it in its own jar
shadow-cljs only declared it temporarily, so it at least showed up in the dependency tree as a potential cause
you may just add [com.google.guava/guava "31.0.1-jre"]
to your own deps if that fixes anything
you nailed it. adding com.google.guava/guava {:mvn/version "31.1-jre"} to deps.edn and how 2.20.12 works.
@fabrao IMHO the only thing you should be looking for is REMOVING shadow-cljs from the dependencies that run when you build an uberjar
so remove that. literally nothing else is relevant. if I could make it blow up every uberjar build that includes it I would. it just should not make it into any uberjar.
(you may also move all other CLJS dependencies, since none of them are relevant in an uberjar either)
i use shadow api to do compile/release so it's part of my deps.edn shadow itself will not be in the final uber so it's ok