Skip to content

Report all missing bindings at once #759

@kevinguitar

Description

@kevinguitar

Description

I found that metro only reports 1 missing binding at once, and it slows down the development iteration on building new features for us. For example, if a new feature has 10 missing bindings, it requires 10 compilation to catch them all.

Self-contained Reproducer

@DependencyGraph
interface TestGraph {
    val dependency: Dependency
}

@Inject
class Dependency(
    val int: Int,
    val string: String,
    val long: Long,
    val boolean: Boolean,
)

This code fails with

[Metro/MissingBinding] Cannot find an @Inject constructor or @Provides-annotated function/property for: kotlin.Int

But I expect metro will report all 4 missing bindings, does that make sense?

Metro version

0.5.1

Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions