{"action":"created","comment":{"url":"https://api.github.com/repos/google/dagger/pulls/comments/77926106","id":77926106,"diff_hunk":"@@ -410,9 +412,27 @@ private ComponentDescriptor create(\n       for (TypeElement componentDependency : componentDependencyTypes) {\n         List<ExecutableElement> dependencyMethods =\n             ElementFilter.methodsIn(elements.getAllMembers(componentDependency));\n+        HashMultimap<QualifiedMethodNameAndType, Equivalence.Wrapper<TypeMirror>> componentMethodType\n+                = HashMultimap.create();\n         for (ExecutableElement dependencyMethod : dependencyMethods) {\n           if (isComponentContributionMethod(elements, dependencyMethod)) {\n-            dependencyMethodIndex.put(dependencyMethod, componentDependency);\n+            if (dependencyMethod.getParameters().isEmpty()) {\n+              // If a component dependency extends from two interfaces that both contain the same named method, then","path":"compiler/src/main/java/dagger/internal/codegen/ComponentDescriptor.java","position":17,"original_position":23,"commit_id":"04647ae8de89c0a35c5872eaeabcb410c58c47b6","original_commit_id":"09837778abd9fade26a1b8a3c61b0c4e265edc71","user":{"login":"AttwellBrian","id":549900,"avatar_url":"https://avatars.githubusercontent.com/u/549900?v=3","gravatar_id":"","url":"https://api.github.com/users/AttwellBrian","html_url":"https://github.com/AttwellBrian","followers_url":"https://api.github.com/users/AttwellBrian/followers","following_url":"https://api.github.com/users/AttwellBrian/following{/other_user}","gists_url":"https://api.github.com/users/AttwellBrian/gists{/gist_id}","starred_url":"https://api.github.com/users/AttwellBrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AttwellBrian/subscriptions","organizations_url":"https://api.github.com/users/AttwellBrian/orgs","repos_url":"https://api.github.com/users/AttwellBrian/repos","events_url":"https://api.github.com/users/AttwellBrian/events{/privacy}","received_events_url":"https://api.github.com/users/AttwellBrian/received_events","type":"User","site_admin":false},"body":"I tried using `MoreElements.getLocalAndInheritedMethods()` but this still doesn't perform the deduplication that we want.\r\n\r\nSince I still needed to perform deduplication, I tried deduplicating based on `MethodSignature` like inside `implementInterfaceMethods()`. However, I realized that I needed to filter on the qualifier and return type if we want the following to continue being valid dagger code:\r\n\r\n```\r\ninterface ComponentA {\r\n    String type();\r\n}\r\n\r\ninterface ComponentB {\r\n    Integer type();\r\n}\r\n\r\ninterface ComponentC extends ComponentA, ComponentB { }\r\n\r\n@Component(dependencies = ComponentC.class)\r\ninterface TheComponent {\r\n    Integer type();\r\n}\r\n``` \r\n\r\nGranted, the above dagger structure is pretty silly. But it works today. And we probably don't want to introduce a breaking change?","created_at":"2016-09-07T23:56:06Z","updated_at":"2016-09-07T23:56:06Z","html_url":"https://github.com/google/dagger/pull/429#discussion_r77926106","pull_request_url":"https://api.github.com/repos/google/dagger/pulls/429","_links":{"self":{"href":"https://api.github.com/repos/google/dagger/pulls/comments/77926106"},"html":{"href":"https://github.com/google/dagger/pull/429#discussion_r77926106"},"pull_request":{"href":"https://api.github.com/repos/google/dagger/pulls/429"}}},"pull_request":{"url":"https://api.github.com/repos/google/dagger/pulls/429","id":80547612,"html_url":"https://github.com/google/dagger/pull/429","diff_url":"https://github.com/google/dagger/pull/429.diff","patch_url":"https://github.com/google/dagger/pull/429.patch","issue_url":"https://api.github.com/repos/google/dagger/issues/429","number":429,"state":"open","locked":false,"title":"No error when a component dependency extends multiple interfaces","user":{"login":"AttwellBrian","id":549900,"avatar_url":"https://avatars.githubusercontent.com/u/549900?v=3","gravatar_id":"","url":"https://api.github.com/users/AttwellBrian","html_url":"https://github.com/AttwellBrian","followers_url":"https://api.github.com/users/AttwellBrian/followers","following_url":"https://api.github.com/users/AttwellBrian/following{/other_user}","gists_url":"https://api.github.com/users/AttwellBrian/gists{/gist_id}","starred_url":"https://api.github.com/users/AttwellBrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AttwellBrian/subscriptions","organizations_url":"https://api.github.com/users/AttwellBrian/orgs","repos_url":"https://api.github.com/users/AttwellBrian/repos","events_url":"https://api.github.com/users/AttwellBrian/events{/privacy}","received_events_url":"https://api.github.com/users/AttwellBrian/received_events","type":"User","site_admin":false},"body":"* Adds a new unit test. This test used to fail. Also add some additional unit tests to gaurd against regressions.\r\n* Update ComponentDescriptor so that it doesn’t create two dependentMethods for method M just because the component’s dependency interface extends from two interfaces that both declare method M. This addresses the bug documented in https://github.com/williamlian/daggerbug. See Main.java to best understand the issue.\r\n\r\nTest plan: \r\n1) added new unit tests.\r\n2) Performed a maven install. Built the Uber app using local version of dagger.","created_at":"2016-08-09T01:16:32Z","updated_at":"2016-09-07T23:56:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d44db039f5d3fbd7656aadcf78dcc95da4b1d14c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/dagger/pulls/429/commits","review_comments_url":"https://api.github.com/repos/google/dagger/pulls/429/comments","review_comment_url":"https://api.github.com/repos/google/dagger/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/dagger/issues/429/comments","statuses_url":"https://api.github.com/repos/google/dagger/statuses/04647ae8de89c0a35c5872eaeabcb410c58c47b6","head":{"label":"AttwellBrian:component_dependency_extends_multiple_interfaces","ref":"component_dependency_extends_multiple_interfaces","sha":"04647ae8de89c0a35c5872eaeabcb410c58c47b6","user":{"login":"AttwellBrian","id":549900,"avatar_url":"https://avatars.githubusercontent.com/u/549900?v=3","gravatar_id":"","url":"https://api.github.com/users/AttwellBrian","html_url":"https://github.com/AttwellBrian","followers_url":"https://api.github.com/users/AttwellBrian/followers","following_url":"https://api.github.com/users/AttwellBrian/following{/other_user}","gists_url":"https://api.github.com/users/AttwellBrian/gists{/gist_id}","starred_url":"https://api.github.com/users/AttwellBrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AttwellBrian/subscriptions","organizations_url":"https://api.github.com/users/AttwellBrian/orgs","repos_url":"https://api.github.com/users/AttwellBrian/repos","events_url":"https://api.github.com/users/AttwellBrian/events{/privacy}","received_events_url":"https://api.github.com/users/AttwellBrian/received_events","type":"User","site_admin":false},"repo":{"id":65251183,"name":"dagger","full_name":"AttwellBrian/dagger","owner":{"login":"AttwellBrian","id":549900,"avatar_url":"https://avatars.githubusercontent.com/u/549900?v=3","gravatar_id":"","url":"https://api.github.com/users/AttwellBrian","html_url":"https://github.com/AttwellBrian","followers_url":"https://api.github.com/users/AttwellBrian/followers","following_url":"https://api.github.com/users/AttwellBrian/following{/other_user}","gists_url":"https://api.github.com/users/AttwellBrian/gists{/gist_id}","starred_url":"https://api.github.com/users/AttwellBrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AttwellBrian/subscriptions","organizations_url":"https://api.github.com/users/AttwellBrian/orgs","repos_url":"https://api.github.com/users/AttwellBrian/repos","events_url":"https://api.github.com/users/AttwellBrian/events{/privacy}","received_events_url":"https://api.github.com/users/AttwellBrian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AttwellBrian/dagger","description":"A fast dependency injector for Android and Java.","fork":true,"url":"https://api.github.com/repos/AttwellBrian/dagger","forks_url":"https://api.github.com/repos/AttwellBrian/dagger/forks","keys_url":"https://api.github.com/repos/AttwellBrian/dagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AttwellBrian/dagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AttwellBrian/dagger/teams","hooks_url":"https://api.github.com/repos/AttwellBrian/dagger/hooks","issue_events_url":"https://api.github.com/repos/AttwellBrian/dagger/issues/events{/number}","events_url":"https://api.github.com/repos/AttwellBrian/dagger/events","assignees_url":"https://api.github.com/repos/AttwellBrian/dagger/assignees{/user}","branches_url":"https://api.github.com/repos/AttwellBrian/dagger/branches{/branch}","tags_url":"https://api.github.com/repos/AttwellBrian/dagger/tags","blobs_url":"https://api.github.com/repos/AttwellBrian/dagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AttwellBrian/dagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AttwellBrian/dagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/AttwellBrian/dagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AttwellBrian/dagger/statuses/{sha}","languages_url":"https://api.github.com/repos/AttwellBrian/dagger/languages","stargazers_url":"https://api.github.com/repos/AttwellBrian/dagger/stargazers","contributors_url":"https://api.github.com/repos/AttwellBrian/dagger/contributors","subscribers_url":"https://api.github.com/repos/AttwellBrian/dagger/subscribers","subscription_url":"https://api.github.com/repos/AttwellBrian/dagger/subscription","commits_url":"https://api.github.com/repos/AttwellBrian/dagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/AttwellBrian/dagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/AttwellBrian/dagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/AttwellBrian/dagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/AttwellBrian/dagger/contents/{+path}","compare_url":"https://api.github.com/repos/AttwellBrian/dagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AttwellBrian/dagger/merges","archive_url":"https://api.github.com/repos/AttwellBrian/dagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AttwellBrian/dagger/downloads","issues_url":"https://api.github.com/repos/AttwellBrian/dagger/issues{/number}","pulls_url":"https://api.github.com/repos/AttwellBrian/dagger/pulls{/number}","milestones_url":"https://api.github.com/repos/AttwellBrian/dagger/milestones{/number}","notifications_url":"https://api.github.com/repos/AttwellBrian/dagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AttwellBrian/dagger/labels{/name}","releases_url":"https://api.github.com/repos/AttwellBrian/dagger/releases{/id}","deployments_url":"https://api.github.com/repos/AttwellBrian/dagger/deployments","created_at":"2016-08-09T01:08:24Z","updated_at":"2016-08-09T01:08:26Z","pushed_at":"2016-09-07T05:32:00Z","git_url":"git://github.com/AttwellBrian/dagger.git","ssh_url":"git@github.com:AttwellBrian/dagger.git","clone_url":"https://github.com/AttwellBrian/dagger.git","svn_url":"https://github.com/AttwellBrian/dagger","homepage":"http://google.github.io/dagger","size":13486,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"e9066f673ed62cc736ca9c2671efbc3e1e9c2a49","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":7968417,"name":"dagger","full_name":"google/dagger","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/dagger","description":"A fast dependency injector for Android and Java.","fork":true,"url":"https://api.github.com/repos/google/dagger","forks_url":"https://api.github.com/repos/google/dagger/forks","keys_url":"https://api.github.com/repos/google/dagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/dagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/dagger/teams","hooks_url":"https://api.github.com/repos/google/dagger/hooks","issue_events_url":"https://api.github.com/repos/google/dagger/issues/events{/number}","events_url":"https://api.github.com/repos/google/dagger/events","assignees_url":"https://api.github.com/repos/google/dagger/assignees{/user}","branches_url":"https://api.github.com/repos/google/dagger/branches{/branch}","tags_url":"https://api.github.com/repos/google/dagger/tags","blobs_url":"https://api.github.com/repos/google/dagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/dagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/dagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/dagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/dagger/statuses/{sha}","languages_url":"https://api.github.com/repos/google/dagger/languages","stargazers_url":"https://api.github.com/repos/google/dagger/stargazers","contributors_url":"https://api.github.com/repos/google/dagger/contributors","subscribers_url":"https://api.github.com/repos/google/dagger/subscribers","subscription_url":"https://api.github.com/repos/google/dagger/subscription","commits_url":"https://api.github.com/repos/google/dagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/dagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/dagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/dagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/dagger/contents/{+path}","compare_url":"https://api.github.com/repos/google/dagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/dagger/merges","archive_url":"https://api.github.com/repos/google/dagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/dagger/downloads","issues_url":"https://api.github.com/repos/google/dagger/issues{/number}","pulls_url":"https://api.github.com/repos/google/dagger/pulls{/number}","milestones_url":"https://api.github.com/repos/google/dagger/milestones{/number}","notifications_url":"https://api.github.com/repos/google/dagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/dagger/labels{/name}","releases_url":"https://api.github.com/repos/google/dagger/releases{/id}","deployments_url":"https://api.github.com/repos/google/dagger/deployments","created_at":"2013-02-01T23:14:14Z","updated_at":"2016-09-07T19:55:41Z","pushed_at":"2016-09-07T21:41:19Z","git_url":"git://github.com/google/dagger.git","ssh_url":"git@github.com:google/dagger.git","clone_url":"https://github.com/google/dagger.git","svn_url":"https://github.com/google/dagger","homepage":"http://google.github.io/dagger","size":15396,"stargazers_count":4527,"watchers_count":4527,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":585,"mirror_url":null,"open_issues_count":44,"forks":585,"open_issues":44,"watchers":4527,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/dagger/pulls/429"},"html":{"href":"https://github.com/google/dagger/pull/429"},"issue":{"href":"https://api.github.com/repos/google/dagger/issues/429"},"comments":{"href":"https://api.github.com/repos/google/dagger/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/google/dagger/pulls/429/comments"},"review_comment":{"href":"https://api.github.com/repos/google/dagger/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/dagger/pulls/429/commits"},"statuses":{"href":"https://api.github.com/repos/google/dagger/statuses/04647ae8de89c0a35c5872eaeabcb410c58c47b6"}}}}
{"actor":{"display_login":"AttwellBrian"}}