scabbard icon indicating copy to clipboard operation
scabbard copied to clipboard

Display objects from component dependency differently

Open tir38 opened this issue 5 years ago • 3 comments

Part of our overall object graph looks like this:

io orionlabs android feature media di MediaComponent

Some of these objects in the graph are coming from a component dependency:

@Component(
        modules = {
                MediaModule.class
        },
        dependencies = {
                SomeOtherComponent.class
        }
)
public interface MediaComponent {...}

You can probably infer which ones are coming from SomeOtherComponent based on package name. It would be nice if these were either color coded differently than those supplied by MediaModule, or maybe even put them in another box inside "object graph".

tir38 avatar Jan 02 '20 18:01 tir38

Agreed, although package name might not be a universal solution for all projects. I'll check if there is something in the Dagger SPI to differentiate dependencies.

arunkumar9t2 avatar Jan 03 '20 05:01 arunkumar9t2

I just meant in my case the package name would show you what I'm talking about. I don't think relying on package name to infer component is the right programmatic solution. =)

tir38 avatar Jan 06 '20 17:01 tir38

This was blocked by https://github.com/google/dagger/issues/3483. Now that is implemented in Dagger, I will try to display component dependencies differently.

arunkumar9t2 avatar Jul 27 '22 02:07 arunkumar9t2