title: Dagger 2 Singleton Component Depend On Singleton
body: <p>I've got a strange problem here, and I'm not quite sure why what I'm doing isn't allowed. I've got the following modules:</p>
  
  <pre><code>@Module
  public final class AppModule {
    private Context mContext;
  
    @Provides
    @Singleton
    @AppContext
    public Context provideContext() { return mContext; }
  }
  
  @Module
  public final class NetModule {
    @Provides
    @Singleton
    public OkHttpClient provideOkHttp() {
      return new OkHttpClient.Builder().build();
    }
  }
  </code></pre>
  
  <p>For various reasons, I don't want to have these two modules in the same component (basically due to my project structure). So I tried to create the following components:</p>
  
  <pre><code>@Singleton
  @Component(modules = AppModule.class)
  public interface AppComponent {
    @AppContext Context appContext();
  }
  
  @Singleton
  @Component(dependencies = AppComponent.class, modules = NetModule.class)
  public interface NetComponent {
    Retrofit retrofit();
  }
  </code></pre>
  
  <p>But when I try to compile this, I get the following error message:</p>
  
  <p><code>Error:(12, 1) error: This @Singleton component cannot depend on scoped components:
  @Singleton com.myapp.service.dagger.AppComponent</code></p>
  
  <p>I understand why depending on <em>different</em> scopes would be bad and disallowed. But why is Singleton depends-on Singleton not allowed? This feels like it should work, since all I'm doing is declaring sibling components. What am I missing?</p>