-
-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Labels
blocked:waiting-for-upstreamThis issue or PR is dependent on upstream Kotlin compiler changes/fixesThis issue or PR is dependent on upstream Kotlin compiler changes/fixes
Milestone
Description
Description
I have a case where contributed bindings are not being found when compiling my iOS graph in a separate module. Take the example
// feature/commonMain/…/FeatureDependency.kt
interface FeatureDependency
@ContributesBinding(AppScope::class)
@Inject
class FeatureDependencyImpl : FeatureDependency
// shared/iosMain/…/IosAppGraph.kt
@DependencyGraph(AppScope::class)
interface IosAppGraph : AppGraph {
val featureDep: FeatureDependency
}When running gw :shared:compileKotlinIosSimulatorArm64 it will fail with
e: file:///…/IosAppGraph.kt:13:3 [Metro/MissingBinding] Cannot find an @Inject constructor or @Provides-annotated function/property for: com.example.feature.FeatureDependency
com.example.feature.FeatureDependency is requested at
[com.example.metrobugreproduction.IosAppGraph] com.example.metrobugreproduction.IosAppGraph#featureDep
Self-contained Reproducer
See https://github.com/r0adkll/MetroBugs/tree/dh/ios-compilation
Steps to reproduce:
- Run
./gradlew :shared:compileKotlinIosSimulatorArm64 - See
MissingBindingerror
Metro version
0.3.2
Context
I ran into this in my migration where I have iOS specific app graph stuff for exposing/creating the compose UIViewController for the swift code and when migrating hit a bunch of these missing binding exceptions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
blocked:waiting-for-upstreamThis issue or PR is dependent on upstream Kotlin compiler changes/fixesThis issue or PR is dependent on upstream Kotlin compiler changes/fixes