littlerobots / version-catalog-update-plugin

Gradle plugin for updating a project version catalog
Apache License 2.0
555 stars 22 forks source link

Running --interactive mode still modifies my libs.versions.toml file #146

Open Zordid opened 7 months ago

Zordid commented 7 months ago

Describe the issue As per documentation, running in interactive mode should not modify the libs.versions.toml file - but it does. It changes how my plugins are declared, from { id = "...", version = "..." } to plain string declaration, it removes blank lines, it removes seemingly unused versions and libraries, it changes how I arrange my bundles, etc.

Steps to reproduce Just run interactive mode and see that your file is changed. The expected interactive file is also created...

hvisser commented 7 months ago

Yes, currently it will still format the toml file. I think I did this to process unused libraries. The formatting is kind of inherent to the plugin and it would also be applied when adding the updates (basically every time the file is rewritten).

I'll take a look to see if the format pass can be removed when running interactive though. It might need waiting until the plugin has switched to the internal resolver for that. After switching there's no detection of unused dependencies so it's possible that the current behaviour isn't needed anymore.