Closed dharrigan closed 2 years ago
@dharrigan Thanks for your suggestion!
I see what you want to do. In conclusion, I'm willing to implement this feature.
My biggest concern was whether this feature would be a role for antq
.
The feature downloading deps to .m2
is seemingly not a role for antq
, but for example, upgrading deps.edn is a feature for EASY and this is out of the nature of antq
.
So, I thought downloading deps to .m2
is also a feture to make it easier to apply new versions, could be considered the same as the feature upgrading deps.edn.
Hi!
Thank you for your consideration, what I mean here, is that antq
could simply delegate to the clojure tooling (deps) (which antq
already uses) to perform the download, rather than implement the same logic itself :-)
Yes, I'm planning to use tools.deps for downloading deps :)
@dharrigan Sorry for late action.
I've added --download
option to feature/download-deps branch.
Could you try?
Sure, will give it a whirl this morning and let you know :-)
Hi, works great. I've done a PR just to add a couple of things in.
One thing to note (perhaps has to be documented?) is that if antq is run as normal (and dependencies are updated) then if it's then run again with --download
set, then no download is done (as there are no updates anymore :-) ). It's probably beyond the scope (and too much hassle) to walk through each dependency, checking if it exists on the file system and if not, to download it.
-=david=-
@dharrigan Thanks for your confirmation!
It's probably beyond the scope (and too much hassle) to walk through each dependency, checking if it exists on the file system and if not, to download it.
I think so too. It is not a role for antq.
One thing to note (perhaps has to be documented?) is that if antq is run as normal (and dependencies are updated) then if it's then run again with --download set, then no download is done (as there are no updates anymore :-) ).
I'll add notes for this behavior :)
@dharrigan Just released v1.4.0 #142
Presently, if there are updates to any dependencies,
antq
will notice the update and modify thedeps.edn
to show a newer version is available. However, it's not untilclj
orclojure
is launched will the actual resolving and downloading of the updated dependencies occurs (to.m2/....
).Would you consider an option to have
antq
not only update thedeps.edn
but also to download to.m2/...
the newer dependency (thus saving a step that needs to happen later). It would be an opt-in option, maybe something called:download?
which defaults to false. It can be set to to true if the user wishes to update and download the dependencies at the same time (similar to how:force
is handled).My use case of this is that we have a few dependencies that are behind a protected s3 bucket that requires the use of
aws-vault exec foo -- clj -X:antq
forantq
to have access to the appropriate AWS session keys and so on to see if there library updates on the appropriate s3 bucket.Often 'tho, later on - people forget to do
aws-vault exec foo -- clj
(and just doclj
) and get lots of failures sinceclj
can't download the artifacts (as no AWS session information is then available a they forgot to wrap the command).It would be nice to have the option to combine the updating of the
deps.edn
with the downloading of the respective dependency with an opt-in option when usingantq
, so by doingaws-vault exec foo -- clj -X:antq
the update and download happens in one go.Thank you for your consideration.
-=david=-