Skip to content

Upgrade Kotlin and Gradle #535

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

LarsSven
Copy link
Contributor

This is a followup of #534 (review)

It upgrades Kotlin and Gradle to a newer version.

These are some pretty major upgrades so I do recommend also locally testing it before approving/merging.

@LarsSven
Copy link
Contributor Author

The current CI failure seems to be a random failure that probably needs to be rerun?

@TimvdLippe
Copy link
Contributor

I have rerun it on CI a couple of times and it appears to consistently fail. Please investigate the failure and let us know why it is failing.

@LarsSven
Copy link
Contributor Author

LarsSven commented Apr 15, 2025

The doReturn_withGenericIntReturnType_on test specifically fails on the upgrade from Kotlin 1.9 to 2.0 (2.0.0 is the first version that starts failing). It is not fully clear to me why it starts failing, especially because while on does not work, onGeneric does work fine, and the generated error message by mockito-kotlin also suggests that you may need to use onGeneric in this case.

I am not deep enough in this codebase to understand what on and onGeneric do specifically and why one would fail with an NPE and the other wouldn't. Maybe 2.0 changes something in how they enforce nullability in Kotlin?

@LarsSven
Copy link
Contributor Author

I had another look at it but it almost feel like maybe the test is not correct. Why did on work on generic methods to begin with, aren't you supposed to always use onGeneric for generic methods?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants