I've followed this guide: <https://kotlinlang.org/...
# kotlin-native
g
I've followed this guide: https://kotlinlang.org/docs/reference/mpp-share-on-platforms.html However, IntelliJ can't resolve platform specific packages in my shared module.
a
Unfortunately, some functions with different signatures cannot be commonized correctly. Please file a report on kotl.in/issue to let the team investigate further.
g
The program still compiles, so I think it's just IntelliJ problem. However, I believe this is pretty standard usage of multiplatform, so I find it weird
a
This is not about the IntelliJ IDEA itself, for sure. The problem is, when you create a shared native source set like that, the commonizer is being called. This utility constructs a multiplatform library with expect/actual declarations for all platform libs’ contents, as much as possible. And this tool was unable to commonize this particular
PathFindFileName
function, and IMHO this worth a minimal investigation. I ask you to report mainly because you see the problem in front of your eyes, so this would be easier to extend the issue with code snippets and screenshot. And this would help Kotlin team.
g
The problem is not with just this particular function, actually my windows source set can't use any of build-in interop libs (at least IDE says so, because the project still compiles).
🤔 1
a
AFAIK, this should not work like that with Kotlin 1.4.0 or later.
g
You mean this feature has been removed/changed in 1.4 or it's supposed to work, but for some reasons don't?
a
I meant that those platform libraries should be available with Kotlin 1.4.0 or later. And the fact they are not available looks bad.
g
Ok, I'll create an issue then
I just found out, there is a
runCommonizer
Gradle task and running it manually, fixes my issue
🎉 1