Open raymondctc opened 2 years ago
Closed by accident...
Honestly, no idea right now. It would be helpful to get way more info about your config. How are you adding dependencies, what's your sourceset config (from gradle.properties
)
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.commonizerLogLevel=info
It'll be difficult to research without some kind of repro, so if this is public, that would help, but I assume not.
I am seeing that warning as something that periodically comes up in the Kotlin slack. I don't think there's anything specific to Stately, although I won't rule anything out arbitrarily.
It also might be interesting to know what your framework config is. Static? Dynamic? How are you integrating it?
For me, this started to happen the moment I made the shared module static. And it doesn't just happen for stately, but for nearly all libraries. In fact, there are about 36k warnings for our little project - too many for Xcode to handle sending it into periods of a spinning wheel of death.
It doesn't seem to matter whether the libraries are direct or transitive dependencies.
Relevant gradle.properties
settings:
kotlin.mpp.enableCInteropCommonization=true
Closing as this is most probably stale now. Also most likely resolved with newer Kotlin version like how https://github.com/touchlab/Stately/issues/90 got resolved
@findjigar this isn't stale at all unfortunately. And it's not fixed by upgrading to Kotlin 1.8. In fact, what fixed the issue in #90 was most likely the switch from static to dynamic. Switching back to dynamic also fixes things here, but isn't an option in many cases.
For me, what "fixed" this was adding the following to the shared module (and just removing the line while debugging the shared module as it makes it impossible to read variable and field values):
kotlin {
...
cocoapods {
...
xcodeConfigurationToNativeBuildType["Debug"] =
org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType.RELEASE
}
}
This works, but also isn't optimal for obvious reasons.
@ubuntudroid ok thanks. I wasn't aware that there is an issue pending here. I'm re-opening this issue
@ubuntudroid Would you be able to provide a minimal sample app that produces this issue, so we have a good repro for it?
Sorry for the late reply, this somehow slipped through the cracks. Unfortunately I wasn't able to create a minimal sample app. It seems to be something very specific in how the project was setup. I'm not working on that project anymore and don't have access to the source, so I cannot look it up unfortunately.
I'll report back when I stumble on that issue again in another project.
Hi devs, we saw many of these warnings for this library when building to iOS simulators. We saw similar warnings on other libraries too (e.g. AAkira/Napier when we are on older version 2.4.0) but most of them are gone after upgrading to latest version, would you please advise what we can do about it? Thanks!
Kotlin version: 1.6.20 Stately verison: 1.2.2