API usage: given a deps.edn file, what is the proper way to merge aliases and come up with the list of :paths
that will be used in the classpath?
Call calc-basis
Do you mean just local paths?
Yes, local paths. With a deps.edn that looks like: {:aliases {:test {:extra-paths ["test"]}}
, I’d like to get the resolved and merged :paths
I tried (deps/calc-basis (merge read-deps (deps/combine-aliases read-deps [:dev :test])))
, but I still see :extra-paths ["test"]
Yeah, the key method is private right now - you’re asking for just part of the job
flatten-paths is the method that does the work you’re asking about
You pass it the deps edn map and the classpath arg map
ok. I’m fine with hacking it for now
So you wouldn’t call calc-basis
I wasn’t sure if that was exposed or I wasn’t understanding something
It’s not exactly right now (other than as a prefix of the classpath)
I’m not at a computer but I can be more precise when I am if that’s not enough to go on
It’s fine, I can hack around it
(calc-basis deps :resolve-args (combine-aliases deps [:dev :test]) :classpath-args (combine-aliases deps [:dev :test]))
appears to do what I need