Unsure where to ask about compiler problems but I'...
# multiplatform
c
Unsure where to ask about compiler problems but I've been banging my head against this for hours now. Repository with shared multiplatform code across multiple Gradle modules. When on Kotlin 2.0.21, everyone in the team could build it but one. Upgraded to 2.1.10 and now everyone can build it but me 🤯 It seems to fail to resolve
stdlib
functions. It builds in CI and on Linux, but not for me on macOS. Has anyone stumbled across something like this and found a reason and solution?
so build fails because it can't find things like
Copy code
Unresolved reference 'listOf'.
Unresolved reference 'Pair'.
t
are you able to build it from command line?
c
no I wasn't. But I found a fix. I deleted the
.kotlin
directory and now it works. I only figured that out by importing it in Fleet and then trying to find out which stdlib the unreferenced methods resolved to, which was some cache inside
.kotlin
. There was nothing hinting that this was the problem 😩
🤔 1
m
I have observed similar problems already several times but I could never find a clear reason or create a reproducer for a bug report. In the end I just did what you did.
🙏 1
c
I'm glad I found a solution but I'm frustrated I spent 6 hours on trying to find out why 😩
well I didn't find out why, I just worked around it
t
Could you still open an issue and describe which steps may lead to this problem?
.kotlin/
contains metadata files that IDEA is using for code analysis and not cleaned by Gradle
clean
task.
c
The biggest problem is I have no idea what steps leads to it or how to reproduce it. But I couldn't build in terminal either
t
Did you see the error right after Kotlin version update in the repo?
c
Yes. But a colleague faced the same issue with the earlier Kotlin version in the repo, which was building fine for me. Also when he downgraded the current (for him) working version, it broke again 🤷