refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

Breaking changes in AndroidX and Kotest?

Open jmfayard opened this issue 3 years ago • 9 comments

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

jmfayard avatar Sep 12 '22 11:09 jmfayard

It got replaced because the underlying maven coordinates are the same, so there's no issue here.

LouisCAD avatar Sep 13 '22 02:09 LouisCAD

I wonder if the issue is not that the version key changed from version.kotest to version.kotest.extension.wiremock

CleanShot 2022-09-13 at 22 50 21@2x

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?

jmfayard avatar Sep 13 '22 20:09 jmfayard

I don't know, we need Dave to comment here, not on Slack which is more informal.

LouisCAD avatar Sep 14 '22 00:09 LouisCAD

Pinged him in slack https://kotlinlang.slack.com/archives/CP5659EL9/p1662980958842149

jmfayard avatar Sep 14 '22 06:09 jmfayard

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.

dave08 avatar Sep 14 '22 09:09 dave08

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

jmfayard avatar Sep 14 '22 10:09 jmfayard

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.

dave08 avatar Sep 14 '22 11:09 dave08

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.

jmfayard avatar Sep 14 '22 11:09 jmfayard

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

LouisCAD avatar Sep 16 '22 02:09 LouisCAD