Fork me on GitHub
#tools-deps
<
2021-08-23
>
Ben Sless09:08:20

Is there a way to work nicely with a tool which does not take a map as its argument?

delaguardo09:08:07

you can create a proxy function which will accept a map as an argument an call the tool you want to use

Ben Sless09:08:24

So if I'm getting it from github I have to either provide a compatibility layer on my own or MR the author?

delaguardo09:08:34

if this “tool” is hosted on github I think it wasn’t designed to work as a tool for clojure cli, am I right?

delaguardo10:08:10

then I think the best option is to file an issue about additional clojure cli support and in the mean time add a wrapper into your project

👍 2
2
seancorfield17:08:01

@UK0810AQ2 The -X/`-T` stuff is still pretty new so a lot of library/tool maintainers haven't caught up with it yet. For -T, a project needs :tools/usage in its deps.edn file, as well as a compatible entry point. Most project maintainers seem amenable to adding this I think.

seancorfield17:08:45

Polylith just accepted a PR to make it installable via -Ttools install and Cognitect's test-runner added a -X-compatible API namespace a while back after I raised that issue.

seancorfield17:08:38

In both cases, I started out by writing my own exec fn wrapper that called into the project's code -- until the issue was resolved directly in the project.