forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
Module 'test-a':
public final class A {
@Inject A() {}
}
@Component
public interface ComponentA {
A a();
}Module 'test-b' which has implementation project(':test-a'):
public final class B {
@Inject B(A a) {}
}
@Component(dependencies = ComponentA.class)
public interface ComponentB {
B b();
}Module 'test-c' which has implementation project(':test-b'):
public final class C {
@Inject C(B b) {}
}
@Component(dependencies = ComponentB.class)
public interface ComponentC {
C c();
}fails with:
> Task :test-c:compileDebugJavaWithJavac FAILED
error: cannot access ComponentA
class file for test.a.ComponentA not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for test.a.ComponentA not found
1 error
which makes sense, because 'test-c' isn't meant to see 'test-a' as it's an implementation detail of 'test-b', but why is Dagger in 'test-c' trying to do anything with ComponentA? Once it reaches ComponentB and sees the required B type exposed shouldn't it stop?
Reactions are currently unavailable