-
Notifications
You must be signed in to change notification settings - Fork 159
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
Upgrade to Kotlin 1.9.20 & gradle 8 #375
Upgrade to Kotlin 1.9.20 & gradle 8 #375
Conversation
Once this is merged, I can make a few more PRs from our Splendo fork, including fixes to Polymorphic serialization (it fails for nesting, doesnt support non-sealed polymorphism etc), several iOS methods, and tracking the new firestore persistence settings |
Another huge PR 🙄 What are the podspecs for? |
To get them to build. Im guessing the latest plugin requires them (which is a bit weird since we set noPodspec which implies you shouldnt need them). But this is on the native plugin side. And yeah, its kind of big because the new Android filestructure requires renames from androidAndroidTest to androidInstrumentedTest etc. But the old way will get deprecated so you'll have to do the renames eventually. |
This PR includes upgrading kotlin.mpp.androidSourceSetLayoutVersion to 2? That's great as it was on our todo list but it would be super helpful if that was in the PR title of description somewhere. In fact this task alone would make a sizable PR and should really be submitted separately, that would really help us improve our TTM (time to merge) on this project 🙏 |
@nbransby I dont think it would reduce the size that much. Upgrading to Gradle 8 means that Android now needs the namespace set. As a result, the cleanup requires most Manifest files to be deleted. With 10 modules, that just adds up. Most of the files changed dont contain that much, except for the Build.gradle files which will always come in bulk. I did try and split it up for you, but it wont reduce the PR size by much and is a lot of work on my side. I have updated the initial PR comment to better reflect what changed btw |
Alternatively you could merge #386 first, and Ill make sure I track the changes |
|
@nbransby there was a merge issue with test-utils. I fixed them, so I expect CI to work now (tests run locally at least) |
does |
It does now. There's a bit of a bug/missing feature with Kotlin 1.8 where AndroidUnitTest automatically has a dependency on commonTest. This is problematic because the tests in this library are instrumented tests. Kotlin 1.9 allows the disabling of the dependency, but for now, I solved it by making an Annotation |
do you have a link to the docs on Kotlin 1.9 allows the disabling of the dependency? |
Link to actual Slack message (includes the images) https://kotlinlang.slack.com/archives/C3PQML5NU/p1682443478051419?thread_ts=1675016886.869689&cid=C3PQML5NU |
I noticed
Any ideas on that? |
@nbransby sorry I completely forgot to respond at the time. I had to upgrade our tooling to Kotlin 1.9.10 due to build issues with XCode 15 on older kotlin versions, so Ive amended the PR with the latest changes from master. Re the connected devices, looks like the expected emulator was not there, Ill try and have a look. I can run connectedCheck just fine on my local machine, so its probably some CI configuration. |
This hopefully makes tests more stable (and more accurate
@Daeda88, would any of the fixes you mention include a fix for #420? |
@nbransby, is this todo list that you mention publicly available somewhere? If not, I think it could make it easier for people who wants to contribute to know where they should start. 😇 |
JS tests actually. They fail randomly and I don't know why. Rerunning ci a bunch of times will eventually pass it. |
@Qw4z1 yes plenty of places to start here https://github.com/GitLiveApp/firebase-kotlin-sdk/issues |
The error is
but if you look at the js test report html it says all the tests passed 😑 |
I'm currently upgrading our internal fork to 1.9.20 and there JS seems to pass fine. Now it's the Android tests XD. Once its stable I'll update this pr again. |
Support Kotlin 1.9.20
@nbransby upgraded to Kotlin 1.9.20. On our fork this now builds reliable. HOWEVER the Android tests fail on MacOS latest: the auth api is giving some timeouts for the Android emulator. We've resolved it by running on a 4 core ubuntu machine, but that is not free (0,016 USD per minute, at a build time of approximately 7 min). If you know of a way to optimize id be happy to do it, but so far no luck. |
Have you got a link to the failed runs? Are you still running the iOS tests on Mac? |
Here's an example: https://github.com/splendo/firebase-kotlin-sdk/actions/runs/6903223212/job/18781490591 |
I've tried running the Android tests on the standard ubuntu-latest runner and it seems to work fine: https://github.com/MattSkala/firebase-kotlin-sdk/actions/runs/6989496153/job/19018094669?pr=2 |
@Daeda88 are we able to do this over free machines with the android tests running on standard ubuntu-latest runner which according to @MattSkala seems to work |
@nbransby @MattSkala Set it to Ubuntu latest and also upgraded to 1.9.21 |
@Daeda88 I see the workflow failed, it would probably be better to get macOS working after all, can you give it one more shot? After looking at the workflows, I think there might be a race condition as there is no wait until Firebase Emulator is started. It might happen that tests are started before the emulators are ready. We could wait for the emulator to start in the setup test action e.g. using wait-on: MattSkala@49dc48b |
@MattSkala pushed MacOS 13 again. Doubt it works and I dont really see a good way to counter the race condition. Any suggestions? |
@nbransby well waddayouknow, apparently it works fine on MacOS 13 for Kotlin 1.9.21. Merging is obviously blocked due to review & an expected build on api 29 instead of 34 which is latest, but that's nothing I can control :) |
This updates the gradle build tools to Gradle 8, moves to Kotlin 1.8.21, coroutines 1.7.1 and cleans up the build stack