anyone have issues with the latest IntelliJ (2019....
# kotlin-native
b
anyone have issues with the latest IntelliJ (2019.3) not indexing kotlin native symbols (i.e. kotlin.native.x in stdlib)? all imports from there / symbols are red. i've tried invalidate caches and restart, clean, restart, etc. Anything else I should try? gradle build works fine
b
Hm not sure I see anything in there about kotlin.native.* imports
j
maybe you can help them cross reference these occurrences by submitting something repeatable. for me it was simply starting an mpp project resulted in what you describe.
d
That only happens to me when I share a source set between multiple compilations.... Is it pretty much treating your native code as common code?
b
ah yeah it is a shared source set…
d
What I usually do is enable a single compilation while the IDE is open and enable the rest for CI and stuff...
d
I had similar issue when I tried using the new gradle dsl ios shortcuts. Ended up reverting that change to get things working again.
d
Or you can try
kotlin.mpp.enableGranularSourceSetsMetadata=true
in your
gradle.properties
file.
d
Yeah.... didn't work for me.....well actually it worked once, then the next day all native imports were red again
d
Yeah same, it's a bit experimental so it doesn't always work. Best to use one compilation for editing in IDE.
d
^agree
k
this blog comments on this issue specifically, because I experienced the same with multiple iOS targets: https://medium.com/vmware-end-user-computing/building-an-ios-fat-framework-for-a-kotlin-multiplatform-project-4f2e0b5de2aa
tl;dr - in my case i named one of my iOS targets 'ios' and everything started working
b
👍 for me it's the
nativeMain
source set