refreshVersions
refreshVersions copied to clipboard
Breaking changes in AndroidX and Kotest?
In #refreshVersions Dave A. reported breaking changes while updating to 0.50.0
Bad news
The newest update seems to have changed some dependency names... so Android Studio didn't load up the new definitions for some reasons, and code complete was still using the old version even after cleaning the build and .gradle folders a few times... so I had to guess what they were changed to :see_no_evil:...
Good news
it's a good thing there was the new list on the site... https://jmfayard.github.io/refreshVersions/dependencies-notations/
The breaking changes in question
-implementation(AndroidX.lifecycle.runtimeKtx)
+implementation(AndroidX.lifecycle.runtime.ktx)
// note he doesn't want to update yet
-testImplementation(Testing.kotestExtensions.wiremock)
+testImplementation(Testing.kotest.extensions.wiremock)
Work around: inline the mutation with a string instead of using the dependency notation
TODO @jmfayard: check what the migration mechanism was supposed to to avoida breaking change, and whether it works
It got replaced because the underlying maven coordinates are the same, so there's no issue here.
I wonder if the issue is not that the version key changed from version.kotest to version.kotest.extension.wiremock

Later does not exist yet, so refreshVersions fetches the latest version, which is not the same version, and the build make fail if you aren't lucky.
Am I right?
I don't know, we need Dave to comment here, not on Slack which is more informal.
Pinged him in slack https://kotlinlang.slack.com/archives/CP5659EL9/p1662980958842149
It seems like certain deps got upgraded to 5.x whereas others stayed at 4.6.4 (which was the version I was at...), in the end, I just upgraded kotest, but in other projects I use more kotest features and there ARE breaking changes between 4.x and 5.x.
My guess is that the real issue is that the version keys were changed because those versions are not aligned anymore.
Thus I would try to downgrade the version like this in versions.properties
version.kotest.extension.xx=4.6.4
I had this before: version.kotest.extensions.robolectric=0.3.0.7-SNAPSHOT... Does it ignore this in certain circumstances? Right now I'm in the middle of trying to close up a release -- so I can't really start testing things out right now.
No worry you can test later.
If a key is not used, there should be a comment ## unused above.
You can also use ./gradlew dependencies --scan and open the build scan to see what version is actually used.
If there's actually a problem in refreshVersions, we'd need a reproducer that is using refreshVersions 0.40.2, where the bug triggers if we update to 0.50.1