-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally add new versions as comments #63
Comments
I agree that updating everything in bulk is not a great idea (even though this plugin might imply that 😄), and it would be great to have a mechanism to control the updates a bit more like you mention. I see a couple of options:
There are some details to be figured out, but in general I think the 3rd option could work, wdyt? |
Thanks for your feedback. I don't think I fully understand your 3rd option idea. Assume I have a catalog file, and 2 libraries have newer versions available. If I run the current "update", I would get 2 lines changed in the |
OK so that new file is just a temporary file that isn't checked in to version control, maybe I should have made that more clear. Basically the steps would be:
What I meant by "only
I think it would make more sense to not comment anything out in that temporary file, by default it would basically list all the changes that can be made, you'd just remove lines or comment them out if you don't want to apply those changes. |
Ok, now I understand. And yes, that would be nice! One minor concern: if I have many libraries sharing the same version (e.g. jackson dataformat, databind, xml, yaml, ...), then your approach would add a line for each of them to |
That's no different than updating / changing a dependency in the toml file; it would try to keep stuff in the version group where it can and create a new version group (if applicable) for other dependencies. I'd think that just having an update for the version (in a Initially I'm thinking it would complicate things a bit because you can reuse a version between multiple library (groups) even if they aren't really related. If you would apply half of it though by mistake, you should be able to run the same thing again and add the missing updates to fix it. I think it would be worth exploring to see if this works anyway :) |
Hi, what I preffer in that case is not to update autmatically, but add comment behind current version like this to
etc. If I want to keep current version I still can, but when new version will be released I know about it (and know about just new update when I again call Origin state:
call
I update just appcompat (because activity causes for me some issue now) and commit it to git (with commented version):
after a week I just call
from Git diff / changes I now see, that version of not updated lib has new version and I can try to update to latest one. Of course in comment can be mentioned alpha/beta versions too like |
This was my original proposal, and also what the refreshVersions Gradle Plugin did earlier (now they add all newer versions, not just the latest one). |
Comments are super hard to manage (technically) and I don't really like how those comments would accumulate in the TOML file, updating the file with no real changes. Therefore a think a staging file like what is implemented now is the better option: the TOML file isn't touched(*) until you tell the plugin to apply the changes, so it's easy to discard any update too. So I hope what is implemented now will fit the use case, testing it on a few projects seems promising to me :) (*) that's not completely true, it is still being updated removing unused dependencies and formatting bundles, but typically that shouldn't result in a huge diff. |
Hi,
we are currently using "refreshVersions" in a rather large project (200+ dependencies). I started using this plugin as an alternative in some smaller projects, and it's working fine. However, we cannot afford to always handle upgrades to all 200+ dependencies in a single commit for the large project. The only options I see right now would thus be to use "git incremental add" (assuming
libs.versions.timl
is under Git control), or agit restore
followed by a manual version upgrade. A better approach for us thus could be to run./gradlew versionCatalogUpdate --propose
(or perhaps./gradlew versionCatalogPropose
), which would add available upgrades as comments behind the outdated versions. We could then manually modify the file, shifting the comments to versions where we want to upgrade. Running the same command some time later would then upgrade the version numbers in the comments, or add new comments.This would allow running the command regularly to stay informed about possible upgrades, without being forced to accept all upgrades.
The text was updated successfully, but these errors were encountered: