You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation: I am trying to get Guava to start relying on the GWT compiler's new automatic stripping, rather than doing its own @GwtIncompatible stripping. This means that the Java compilation that we do for GWT is now seeing @GwtIncompatible classes. The GWT compiler proper then ignores then. But because javac saw them, Dagger generated Factory classes for those with @Inject constructors. Those Factory classes refer back to the @GwtIncompatible original, which the GWT compiler can't see. We get a compilation error:
[ERROR] Errors in 'blahblah.jar/com/google/common/time/DefaultSleeper$$Factory.java'
[ERROR] Line 12: The constructor DefaultSleeper() is not visible
A solution (I think) is for Dagger to annotate the Factory class as @GwtIncompatible if the original class (or any enclosing class) is so annotated. Does this sound reasonable?
The text was updated successfully, but these errors were encountered:
I'm going to mark this as a 2.1 milestone though, but we can chat about it if we need it for our 2.0 release shortly. I think the solution here is sort of subtle - we could special case gwt, but i'm hesitant to do that, since we have the same problem with j2objc, etc. But a comprehensive solution seems like it requires some semantic clarity I not fully certain we can get in time to fix it for 2.0.
(This is the Dagger equivalent to google/auto#187)
Motivation: I am trying to get Guava to start relying on the GWT compiler's new automatic stripping, rather than doing its own
@GwtIncompatible
stripping. This means that the Java compilation that we do for GWT is now seeing@GwtIncompatible
classes. The GWT compiler proper then ignores then. But because javac saw them, Dagger generatedFactory
classes for those with@Inject
constructors. ThoseFactory
classes refer back to the@GwtIncompatible
original, which the GWT compiler can't see. We get a compilation error:(Google developers can check out the full results.)
A solution (I think) is for Dagger to annotate the
Factory
class as@GwtIncompatible
if the original class (or any enclosing class) is so annotated. Does this sound reasonable?The text was updated successfully, but these errors were encountered: