Fork me on GitHub
#shadow-cljs
<
2023-05-26
>
hifumi12300:05:31

sounds more like a deps.edn question than shadow-cljs question

hifumi12300:05:58

when you set :lein true or :deps true in shadow cljs config, basically everything about dependency management is handed off to lein or deps.edn. so overriding dependencies depends on (1) the library youre pulling in, and (2) how you would override that with your tool

bendlas00:05:19

with deps.edn, I can pass multiple files, so that's how I'd solve that. I don't think shadow offers that option, hence the question

hifumi12300:05:42

do you have a minimum example project and does it work with other tools that can use deps.edn?

hifumi12300:05:43

i dont really know how to use deps.edn, but with leiningen you can use either :exclusions or :managed-dependencies to replace dependencies with exact versions specified in your project. I’m assuming deps.edn offers a similar key for these things, so I’m not sure why multiple files are needed to achieve what you want

hifumi12300:05:59

According to https://clojure.org/reference/deps_and_cli, it looks like :override-deps should work for what you want?

bendlas00:05:44

I'd like to generate overrides without having to update the base deps.edn. With plain deps, I can do it with clj -Sdeps '{ ... }'

hifumi12301:05:02

have you tried doing that and invoke shadow-cljs manually

hifumi12301:05:19

the user guide has an example of running shadow cljs manually with clj

hifumi12301:05:28

in your case it looks like clj -Sdeps ... -m shadow.cljs.devtools.cli watch build would work

bendlas11:05:15

I'll use that as a last resort, if shadow doesn't have another solution, thanks!

👍 2
hifumi12317:05:19

One more thing: it looks like you can make a user-wide alias so that you can simplify the command to clj -Sdeps ... -A:shadow watch build. Example alises are given in the user guide