Closed tengstrand closed 1 year ago
@tengstrand Sorry for late reaction.
is it possible to use antq as a library
Unfortunately no for now. But it should be, so I'd like to add some APIs :)
@tengstrand I'm (ab)using antq
as a library here. It seems to work ok, despite being a little kludgy due to the entry points and args not being as well-defined as one might expect in a "real" library.
antq.core/antq
is available, but it has not been organized as an API as you know.
So, I'm considering a new interface based on this function.
@liquidz I suspect it won't take much, given how close the functionality already is! 🤞
@tengstrand @pmonks Now I'm considering the API as follows. https://github.com/liquidz/antq/blob/9c7cc46e30929079d72c630b80c232fd7854bf12/src/antq/api.clj#L31-L32
The first argument deps-map
is a map of the same form as :deps
in deps.edn, so it seems easy to specify when used as a library in my opinion.
How about this interface?
@liquidz from my perspective that looks like a good start, though I think some of the other CLI options may also be handy to have available via the opts
map second argument? For example all of the following seem useful:
ignore-locals
check-clojure-tools
transitive
- if/when enhancement #204 is implementedI think there also needs to be a separate API that's equivalent to the upgrade
CLI option (imvho it makes more sense to implement this as a separate fn in the API, rather than as an opt
to outdated-deps
- obvs that's not possible via a CLI, but an API can be more expressive).
@pmonks Thanks for your advice :)
I think some of the other CLI options may also be handy to have available via the opts map second argument
Supported. https://github.com/liquidz/antq/blob/3414e7e0a3ca626dfea1f6b483abfd142d0b4164/src/antq/api.clj#L16
I think there also needs to be a separate API that's equivalent to the upgrade CLI option
Added. https://github.com/liquidz/antq/blob/3414e7e0a3ca626dfea1f6b483abfd142d0b4164/src/antq/api.clj#L33
Could you try dev
branch?
The new api works really well! Thanks @liquidz
@tengstrand Thanks for your confirmation! I just released v2.3.1043 :)
Switched to that version. Thanks @liquidz!
Hi!
I'm considering using antq within the poly tool.
If we let the poly tool execute the libs command, it returns all the used libraries in the workspace, e.g.:
My idea is to allow the user to also show the column
outdated
that will be populated if the library is out of date, by using antq internally.I haven't digged into the code so much yet, but is it possible to use antq as a library, and let it return a data structure with all the outdated libraries, when called?