just found that a Clojure project I maintain has a transient dependency to shadow-cljs due to a badly written :deps map in a cljc local/root lib dependency. But I am wondering — is there actually an idiomatic way to have a cljc lib have different dependencies for clojurescript vs clojure?
I don’t think so. I routinely have to do manual :exclusions. Sometimes the lib will use :provided and make you manually require.
are there any docs on that?
docs on what?
I don't know what :provided means exactly, and my googling isn't helping
oh. This is something the lib would do.
:provided is a maven-ism that means this thing is required by the lib at runtime, but won’t be included via transient deps retrievial
well i have commit access to the lib too so this is totally doable for me. If I were doing a normal project I might split these out into different aliases, but then I believe I would break the cljs project that does want it to depend on some cljs libs. But if it's a maven-ism does that mean that it'll be ignored for a local/root require?
yeah it would be
the equivalent would be hiding it in an alias
but then for the project that does need those dependencies you won't be able to specify the alias in the :deps map, right?
right, you would need to know (e.g. reading the lib docs) what it needs and provide it yourself
alright, a list of 10 :exclusions it is then 😅