{"action":"created","comment":{"url":"https://api.github.com/repos/uber-go/dig/pulls/comments/199652725","pull_request_review_id":133809088,"id":199652725,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTY1MjcyNQ==","diff_hunk":"@@ -130,21 +163,84 @@ func (dg *Graph) AddCtor(c *Ctor, paramList []*Param, resultList []*Result) {\n \tc.Results = resultList\n \n \tdg.Ctors = append(dg.Ctors, c)\n+\tdg.ctorMap[c.ID] = c\n+}\n+\n+func (dg *Graph) failNode(r *Result, pof bool) {\n+\tif pof {\n+\t\tdg.addRootCause(r)\n+\t} else {\n+\t\tdg.addTransitiveFailure(r)\n+\t}\n+}\n+\n+// MissingNodes adds missing nodes to the list of failed Results in the graph.\n+func (dg *Graph) MissingNodes(results []*Result) {\n+\tpof := len(dg.Failed.RootCauses) == 0\n+\n+\tfor _, r := range results {\n+\t\tdg.failNode(r, pof)\n+\t}\n+}\n+\n+// FailNodes adds results to the list of failed Results in the graph, and\n+// updates the state of the constructor with the given id accordingly.\n+func (dg *Graph) FailNodes(results []*Result, id CtorID) {\n+\tpof := len(dg.Failed.RootCauses) == 0","path":"internal/dot/graph.go","position":121,"original_position":121,"commit_id":"b0a10c2f341d4b8c5a102ab5f5f88738d39e6346","original_commit_id":"b0a10c2f341d4b8c5a102ab5f5f88738d39e6346","user":{"login":"amckinney","id":5760684,"node_id":"MDQ6VXNlcjU3NjA2ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5760684?v=4","gravatar_id":"","url":"https://api.github.com/users/amckinney","html_url":"https://github.com/amckinney","followers_url":"https://api.github.com/users/amckinney/followers","following_url":"https://api.github.com/users/amckinney/following{/other_user}","gists_url":"https://api.github.com/users/amckinney/gists{/gist_id}","starred_url":"https://api.github.com/users/amckinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amckinney/subscriptions","organizations_url":"https://api.github.com/users/amckinney/orgs","repos_url":"https://api.github.com/users/amckinney/repos","events_url":"https://api.github.com/users/amckinney/events{/privacy}","received_events_url":"https://api.github.com/users/amckinney/received_events","type":"User","site_admin":false},"body":"When is `len(dg.Failed.RootCauses) != 0`? It seems like once a failure is encountered, there will always be at least one root (that therefore create transitive failures). If this is the case, after the initial root failure is added, this will always be > 0, and everything would be colored as red since `pof` is true. \r\n\r\nI'm assuming that transitive failures are appropriately colored, however, so what piece am I misunderstanding?","created_at":"2018-07-03T00:03:18Z","updated_at":"2018-07-03T00:03:38Z","html_url":"https://github.com/uber-go/dig/pull/195#discussion_r199652725","pull_request_url":"https://api.github.com/repos/uber-go/dig/pulls/195","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/uber-go/dig/pulls/comments/199652725"},"html":{"href":"https://github.com/uber-go/dig/pull/195#discussion_r199652725"},"pull_request":{"href":"https://api.github.com/repos/uber-go/dig/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/uber-go/dig/pulls/195","id":196863598,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODYzNTk4","html_url":"https://github.com/uber-go/dig/pull/195","diff_url":"https://github.com/uber-go/dig/pull/195.diff","patch_url":"https://github.com/uber-go/dig/pull/195.patch","issue_url":"https://api.github.com/repos/uber-go/dig/issues/195","number":195,"state":"open","locked":false,"title":"error: Detect and visualize invoke errors in graph","user":{"login":"leyao","id":14879114,"node_id":"MDQ6VXNlcjE0ODc5MTE0","avatar_url":"https://avatars2.githubusercontent.com/u/14879114?v=4","gravatar_id":"","url":"https://api.github.com/users/leyao","html_url":"https://github.com/leyao","followers_url":"https://api.github.com/users/leyao/followers","following_url":"https://api.github.com/users/leyao/following{/other_user}","gists_url":"https://api.github.com/users/leyao/gists{/gist_id}","starred_url":"https://api.github.com/users/leyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leyao/subscriptions","organizations_url":"https://api.github.com/users/leyao/orgs","repos_url":"https://api.github.com/users/leyao/repos","events_url":"https://api.github.com/users/leyao/events{/privacy}","received_events_url":"https://api.github.com/users/leyao/received_events","type":"User","site_admin":false},"body":"On invoke errors, the graph is updated to reflect the node(s) that failed to build. The root cause(s) of failure will have red borders, while nodes that failed to build due to missing/failed dependencies will be orange.","created_at":"2018-06-22T23:08:02Z","updated_at":"2018-07-03T00:03:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a356cf4228e13009a3764303876bdac0120ab86d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uber-go/dig/pulls/195/commits","review_comments_url":"https://api.github.com/repos/uber-go/dig/pulls/195/comments","review_comment_url":"https://api.github.com/repos/uber-go/dig/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber-go/dig/issues/195/comments","statuses_url":"https://api.github.com/repos/uber-go/dig/statuses/b0a10c2f341d4b8c5a102ab5f5f88738d39e6346","head":{"label":"uber-go:error-representation","ref":"error-representation","sha":"b0a10c2f341d4b8c5a102ab5f5f88738d39e6346","user":{"login":"uber-go","id":19262598,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjYyNTk4","avatar_url":"https://avatars2.githubusercontent.com/u/19262598?v=4","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"repo":{"id":85765458,"node_id":"MDEwOlJlcG9zaXRvcnk4NTc2NTQ1OA==","name":"dig","full_name":"uber-go/dig","owner":{"login":"uber-go","id":19262598,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjYyNTk4","avatar_url":"https://avatars2.githubusercontent.com/u/19262598?v=4","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber-go/dig","description":"A reflection based dependency injection toolkit for Go.","fork":false,"url":"https://api.github.com/repos/uber-go/dig","forks_url":"https://api.github.com/repos/uber-go/dig/forks","keys_url":"https://api.github.com/repos/uber-go/dig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber-go/dig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber-go/dig/teams","hooks_url":"https://api.github.com/repos/uber-go/dig/hooks","issue_events_url":"https://api.github.com/repos/uber-go/dig/issues/events{/number}","events_url":"https://api.github.com/repos/uber-go/dig/events","assignees_url":"https://api.github.com/repos/uber-go/dig/assignees{/user}","branches_url":"https://api.github.com/repos/uber-go/dig/branches{/branch}","tags_url":"https://api.github.com/repos/uber-go/dig/tags","blobs_url":"https://api.github.com/repos/uber-go/dig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber-go/dig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber-go/dig/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber-go/dig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber-go/dig/statuses/{sha}","languages_url":"https://api.github.com/repos/uber-go/dig/languages","stargazers_url":"https://api.github.com/repos/uber-go/dig/stargazers","contributors_url":"https://api.github.com/repos/uber-go/dig/contributors","subscribers_url":"https://api.github.com/repos/uber-go/dig/subscribers","subscription_url":"https://api.github.com/repos/uber-go/dig/subscription","commits_url":"https://api.github.com/repos/uber-go/dig/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber-go/dig/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber-go/dig/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber-go/dig/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber-go/dig/contents/{+path}","compare_url":"https://api.github.com/repos/uber-go/dig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber-go/dig/merges","archive_url":"https://api.github.com/repos/uber-go/dig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber-go/dig/downloads","issues_url":"https://api.github.com/repos/uber-go/dig/issues{/number}","pulls_url":"https://api.github.com/repos/uber-go/dig/pulls{/number}","milestones_url":"https://api.github.com/repos/uber-go/dig/milestones{/number}","notifications_url":"https://api.github.com/repos/uber-go/dig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber-go/dig/labels{/name}","releases_url":"https://api.github.com/repos/uber-go/dig/releases{/id}","deployments_url":"https://api.github.com/repos/uber-go/dig/deployments","created_at":"2017-03-21T23:55:50Z","updated_at":"2018-07-02T15:14:12Z","pushed_at":"2018-06-29T20:41:17Z","git_url":"git://github.com/uber-go/dig.git","ssh_url":"git@github.com:uber-go/dig.git","clone_url":"https://github.com/uber-go/dig.git","svn_url":"https://github.com/uber-go/dig","homepage":"https://go.uber.org/dig","size":448,"stargazers_count":271,"watchers_count":271,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":15,"open_issues":9,"watchers":271,"default_branch":"master"}},"base":{"label":"uber-go:feature/graphviz","ref":"feature/graphviz","sha":"e661aeac5708cd2e29791a92cf29b553364aa48a","user":{"login":"uber-go","id":19262598,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjYyNTk4","avatar_url":"https://avatars2.githubusercontent.com/u/19262598?v=4","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"repo":{"id":85765458,"node_id":"MDEwOlJlcG9zaXRvcnk4NTc2NTQ1OA==","name":"dig","full_name":"uber-go/dig","owner":{"login":"uber-go","id":19262598,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjYyNTk4","avatar_url":"https://avatars2.githubusercontent.com/u/19262598?v=4","gravatar_id":"","url":"https://api.github.com/users/uber-go","html_url":"https://github.com/uber-go","followers_url":"https://api.github.com/users/uber-go/followers","following_url":"https://api.github.com/users/uber-go/following{/other_user}","gists_url":"https://api.github.com/users/uber-go/gists{/gist_id}","starred_url":"https://api.github.com/users/uber-go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber-go/subscriptions","organizations_url":"https://api.github.com/users/uber-go/orgs","repos_url":"https://api.github.com/users/uber-go/repos","events_url":"https://api.github.com/users/uber-go/events{/privacy}","received_events_url":"https://api.github.com/users/uber-go/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber-go/dig","description":"A reflection based dependency injection toolkit for Go.","fork":false,"url":"https://api.github.com/repos/uber-go/dig","forks_url":"https://api.github.com/repos/uber-go/dig/forks","keys_url":"https://api.github.com/repos/uber-go/dig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber-go/dig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber-go/dig/teams","hooks_url":"https://api.github.com/repos/uber-go/dig/hooks","issue_events_url":"https://api.github.com/repos/uber-go/dig/issues/events{/number}","events_url":"https://api.github.com/repos/uber-go/dig/events","assignees_url":"https://api.github.com/repos/uber-go/dig/assignees{/user}","branches_url":"https://api.github.com/repos/uber-go/dig/branches{/branch}","tags_url":"https://api.github.com/repos/uber-go/dig/tags","blobs_url":"https://api.github.com/repos/uber-go/dig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber-go/dig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber-go/dig/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber-go/dig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber-go/dig/statuses/{sha}","languages_url":"https://api.github.com/repos/uber-go/dig/languages","stargazers_url":"https://api.github.com/repos/uber-go/dig/stargazers","contributors_url":"https://api.github.com/repos/uber-go/dig/contributors","subscribers_url":"https://api.github.com/repos/uber-go/dig/subscribers","subscription_url":"https://api.github.com/repos/uber-go/dig/subscription","commits_url":"https://api.github.com/repos/uber-go/dig/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber-go/dig/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber-go/dig/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber-go/dig/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber-go/dig/contents/{+path}","compare_url":"https://api.github.com/repos/uber-go/dig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber-go/dig/merges","archive_url":"https://api.github.com/repos/uber-go/dig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber-go/dig/downloads","issues_url":"https://api.github.com/repos/uber-go/dig/issues{/number}","pulls_url":"https://api.github.com/repos/uber-go/dig/pulls{/number}","milestones_url":"https://api.github.com/repos/uber-go/dig/milestones{/number}","notifications_url":"https://api.github.com/repos/uber-go/dig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber-go/dig/labels{/name}","releases_url":"https://api.github.com/repos/uber-go/dig/releases{/id}","deployments_url":"https://api.github.com/repos/uber-go/dig/deployments","created_at":"2017-03-21T23:55:50Z","updated_at":"2018-07-02T15:14:12Z","pushed_at":"2018-06-29T20:41:17Z","git_url":"git://github.com/uber-go/dig.git","ssh_url":"git@github.com:uber-go/dig.git","clone_url":"https://github.com/uber-go/dig.git","svn_url":"https://github.com/uber-go/dig","homepage":"https://go.uber.org/dig","size":448,"stargazers_count":271,"watchers_count":271,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":15,"open_issues":9,"watchers":271,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber-go/dig/pulls/195"},"html":{"href":"https://github.com/uber-go/dig/pull/195"},"issue":{"href":"https://api.github.com/repos/uber-go/dig/issues/195"},"comments":{"href":"https://api.github.com/repos/uber-go/dig/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/uber-go/dig/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/uber-go/dig/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber-go/dig/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/uber-go/dig/statuses/b0a10c2f341d4b8c5a102ab5f5f88738d39e6346"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"amckinney"}}