Fork me on GitHub
#clojurescript
<
2023-03-15
>
Dustin Getz14:03:33

Is there a way to optionally depend on core.async from cljs, and check in a fn at runtime? (or not even check, we accept runtime failure in this case, this is for a library trying to provide adapters if core async is present)

thheller14:03:26

my recommendation is to move core.async stuff into a dedicated namespace that the user has to require. it can then extend protocols, multi-methods and so on

👍 2
thheller14:03:48

otherwise no, there is no conditional require

pesterhazy18:03:29

Or maybe even create two packages. As a library consumer I get nervous when a library requires core.async

👍 6
Dustin Getz18:03:02

Yeah, the point of the exercise is to remove core.async from our library deps.edn, but also provide adapters