anyone have success fixing cinterop IntelliJ autoc...
# kotlin-native
b
anyone have success fixing cinterop IntelliJ autocomplete/index issues? I have cinterops setup and building fine, but none of the symbols show up in the index.
kotlinx.cinterop
imports are also red
n
Did you remember to do a Gradle refresh?
b
I invalidated caches and restarted. Is that enough?
Er… what do you mean by refresh specifically?
b
That suggestion didn't work 😕
k
For suggestions intellij uses gradle caches. Recreate simple project. And don't disable any intelliJ built-in plugins.
Gradle refresh mean refresh button on top left corner of gradle panel try that
👌 1
✔️ 1
b
Ah yeah tried that already
d
@basher Do you have a reproducer project? If you could send me a ZIP or a GitHb link with the project, than we could try to reproduce this and check what’s wrong.
b
Thanks! I'll try to make one. It's just our main project, which I can't really zip up. If I make a reproducer, what's the best way to get it to you?
Ticket somewhere?
d
@basher Ticket at https://youtrack.jetbrains.com/issues/KT would be OK. You may also send me a DM here on Slack.
🙏 1
b
@dmitriy.dolovov okay so I solved my issue with iosMain by setting:
Copy code
kotlin.mpp.enableGranularSourceSetsMetadata=true
However, this still doesn't fix nativeMain. This issue can be reproduced with https://github.com/autodesk/coroutineworker master. With that flag on or off, nativeMain can't resolve (red):
Copy code
import kotlin.native.concurrent.AtomicInt
import kotlin.native.concurrent.AtomicReference
import kotlin.native.concurrent.freeze
for example. It doesn't seem to resolve kotlinx.coroutines either. Possible that nativeMain still needs more work and is coming in 1.3.70? I see open tickets for for this feature generally, so I assume it's not yet complete
filed a bug with iosMain though: https://youtrack.jetbrains.com/issue/KT-36086