dependency-analysis-gradle-plugin
dependency-analysis-gradle-plugin copied to clipboard
import kotlinx.coroutines.rx3.await mistakenly marked as unused
Build scan link
Plugin version
1.19.0
Gradle version
7.6
(Optional) Android Gradle Plugin (AGP) version
7.4.1
reason output for bugs relating to incorrect advice
Describe the bug
The following snippet in our codebase is incorrectly resulting in the org.jetbrains.kotlinx:kotlinx-coroutines-rx3 dependency getting marked as unused
import kotlinx.coroutines.rx3.await
// ...
class Presenter {
fun example() {
jobs +=
viewModelScope.launch {
runCatching {
val usersMap = async { userRepository.get().getUsers(userIds).await() } // <-- used here
}
}
}
}
I do see it identified in exploded-source.json under the Presenter class's imports. I also see it in the decompiled resulting class file
To Reproduce Steps to reproduce the behavior:
- Use the above import in code structured like the example
Expected behavior
It should not advice removing this dependency
Additional context
I do not see it referenced in inline-usage.json, though I do see others 🤔
{
"coordinates": {
"type": "module",
"identifier": "org.jetbrains.kotlinx:kotlinx-coroutines-rx3",
"resolvedVersion": "1.6.4"
},
"inlineMembers": [
{
"packageName": "kotlinx.coroutines.rx3",
"inlineMembers": [
"collect"
]
},
{
"packageName": "kotlinx.coroutines.rx3",
"inlineMembers": [
"seenValue",
"subscription",
"value"
]
}
]
},
Is this still an issue with 1.27.0?
I'm going to close this for now. If it's still an issue, please re-open.