{"action":"created","issue":{"url":"https://api.github.com/repos/google/dagger/issues/493","repository_url":"https://api.github.com/repos/google/dagger","labels_url":"https://api.github.com/repos/google/dagger/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/google/dagger/issues/493/comments","events_url":"https://api.github.com/repos/google/dagger/issues/493/events","html_url":"https://github.com/google/dagger/issues/493","id":187419084,"number":493,"title":"Failed to annotate proper qualifier on Subcomponent provision method might cause StackOverflowError at runtime","user":{"login":"stevecstian","id":4402521,"avatar_url":"https://avatars.githubusercontent.com/u/4402521?v=3","gravatar_id":"","url":"https://api.github.com/users/stevecstian","html_url":"https://github.com/stevecstian","followers_url":"https://api.github.com/users/stevecstian/followers","following_url":"https://api.github.com/users/stevecstian/following{/other_user}","gists_url":"https://api.github.com/users/stevecstian/gists{/gist_id}","starred_url":"https://api.github.com/users/stevecstian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevecstian/subscriptions","organizations_url":"https://api.github.com/users/stevecstian/orgs","repos_url":"https://api.github.com/users/stevecstian/repos","events_url":"https://api.github.com/users/stevecstian/events{/privacy}","received_events_url":"https://api.github.com/users/stevecstian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-04T19:28:49Z","updated_at":"2016-11-09T16:27:52Z","closed_at":null,"body":"Dagger version: `2.7`\r\n\r\n```java\r\nfinal class SubcomponentsForEncapsulation {\r\n\r\n    static final class Database {}\r\n\r\n    @Qualifier @interface Private {}\r\n\r\n    @Module\r\n    static final class DatabaseImplModule {\r\n        @Provides @Private Database provideDatabase() { return new Database(); }\r\n    }\r\n\r\n    @Subcomponent(\r\n            modules = {\r\n                    DatabaseImplModule.class,\r\n            }\r\n    )\r\n    interface DatabaseComponent {\r\n        /* @Private */ Database database(); // Oops!\r\n\r\n        @Subcomponent.Builder\r\n        interface Builder {\r\n            DatabaseComponent build();\r\n        }\r\n    }\r\n\r\n    @Module(\r\n            subcomponents = {\r\n                    DatabaseComponent.class,\r\n            }\r\n    )\r\n    static final class DatabaseModule {\r\n        @Provides @Singleton Database provideDatabase(DatabaseComponent.Builder databaseComponentBuilder) {\r\n            return databaseComponentBuilder.build().database();\r\n        }\r\n    }\r\n\r\n    @Singleton\r\n    @Component(\r\n            modules = {\r\n                    DatabaseModule.class,\r\n            }\r\n    )\r\n    interface ApplicationComponent {\r\n        Database database();\r\n    }\r\n\r\n}\r\n```\r\nRuntime `java.lang.StackOverflowError` will be thrown while calling `DaggerSubcomponentsForEncapsulation_ApplicationComponent.create().database()`.\r\n\r\nIs it feasible to have an ERROR or WARNING at compile time for this?\r\n"},"comment":{"url":"https://api.github.com/repos/google/dagger/issues/comments/259457415","html_url":"https://github.com/google/dagger/issues/493#issuecomment-259457415","issue_url":"https://api.github.com/repos/google/dagger/issues/493","id":259457415,"user":{"login":"ronshapiro","id":792797,"avatar_url":"https://avatars.githubusercontent.com/u/792797?v=3","gravatar_id":"","url":"https://api.github.com/users/ronshapiro","html_url":"https://github.com/ronshapiro","followers_url":"https://api.github.com/users/ronshapiro/followers","following_url":"https://api.github.com/users/ronshapiro/following{/other_user}","gists_url":"https://api.github.com/users/ronshapiro/gists{/gist_id}","starred_url":"https://api.github.com/users/ronshapiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronshapiro/subscriptions","organizations_url":"https://api.github.com/users/ronshapiro/orgs","repos_url":"https://api.github.com/users/ronshapiro/repos","events_url":"https://api.github.com/users/ronshapiro/events{/privacy}","received_events_url":"https://api.github.com/users/ronshapiro/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T16:27:52Z","updated_at":"2016-11-09T16:27:52Z","body":"Hm, this is a cycle that crosses components. But it's pretty hard for Dagger to know anything about this since we can't see method bodies in an annotation processor. We could provide an API to make this easier, but we're not 100% on our team that this is a first-class feature we want."}}
{"actor":{"display_login":"ronshapiro"}}