Fork me on GitHub
#tools-deps
<
2021-11-24
>
cfleming08:11:40

clojure.tools.deps.alpha/make-classpath is marked as deprecated, but there’s no mention of why, or suggestions for an alternative. What should I be doing instead?

borkdude08:11:19

@cfleming I'm guessing create-basis which returns a map with contains the classpath

cfleming08:11:19

Sounds plausible, or even just the current implementation, which is a one-liner and doesn’t use anything deprecated.

cfleming08:11:41

It would be nice to understand the thinking a little more though.

borkdude08:11:07

create-basis is pretty much the primitive used all over in tools build

Alex Miller (Clojure team)13:11:05

make-classpath-map is the replacement, but certainly create-basis is often a better thing to use

Alex Miller (Clojure team)13:11:47

It depends what you're trying to do of course :)

cfleming19:11:51

In my case, get the individual elements of the classpath as strings. Previously I called make-classpath then used str/split.

cfleming20:11:40

In the end I just inlined the existing impl and removed the string join, so I don’t need to re-split it.