Fork me on GitHub
Ben Sless09:08:20

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


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?


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


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

@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.


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.


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.