Hi folks! Is there a way to trace where some klib ...
# multiplatform
b
Hi folks! Is there a way to trace where some klib "comes from"? Kontext: in our KMP build, a dependency shows up out of nowhere and is causing trouble, but not even gradle
dependencies
lists it (yes, I tried a dozen configuration, still not showing up). yet, the klib is present in the .kotlin directory and the build for iOS fails. how do I debug this?
m
dependencies
should list all dependencies. There might be more than 12. Are you sure it's not there?
b
there are more than 12 configurations. is there a way to print all the configurations relevant to a a task?
m
Don't think so
If it's not there, maybe it's in a detached configuration
The error message should the task if the configuration is one of its input
m
I’ve seen that sometimes with incompatible dependencies (using a too old or too new version of Kotlin)
But that wouldn’t explain why it doesn’t show up in the dependencies...
o
The error is coming from KLib compiler which also resolves dependencies from manifest file inside klib I saw such issues with dependencies with cinterop, but never with ordinary dependencies May you can check youtrack by searching “KLIB resolver: Could not find” there
b
thanks! this may be a bit particular, because the library got renamed last year, so it has to be some kind of remnant from somewhere that is just now showing up. I'm pretty sure it is pulled in as a transitive dependency, but without any way to list the configurations relevant for the task that tirggers the issue, I am just lost, because I can't even print the dependency tree to help me move forward
i'm fairly confident i found the offenders: two test dependencies, which pull the library in (even though gradle says, there is no such dependency, I know for a fact there is, because I put it there myself. now my question is: why are exclusions simply ignored by gradle?
c
Can you share a build scan for the task in question? And the maven coordinates of the offending dependency
b
where's the buildscan located (i did
./gradlew build --scan
)?
io.matthewnelson.kotlin-components:encoding-core
is the ghost dependency that is causing trouble
c
In the very last line in the output, Gradle should print a URL, that's what I'm interested in
b
well that log is gone for good. I'll rebuild
👍 1
if the activation mail ever gets through our greylisting filter I'll share the scan
c
You don't need to activate it, if you send me the link I can activate it myself
b
just got it. i can tell you the dependency is not in the build scan
gradle is convinced the dependency is nonexistent but klib
c
can you send it to me?
[continuing in DM]