{"action":"created","comment":{"url":"https://api.github.com/repos/haskell/cabal/pulls/comments/85509520","pull_request_review_id":6222050,"id":85509520,"diff_hunk":"@@ -699,13 +699,16 @@ validateSolverResult :: Platform\n                      -> SolverInstallPlan\n validateSolverResult platform comp indepGoals pkgs =\n     case planPackagesProblems platform comp pkgs of\n-      [] -> case SolverInstallPlan.new indepGoals index of\n+      [] -> case SolverInstallPlan.new indepGoals graph of\n               Right plan     -> plan\n               Left  problems -> error (formatPlanProblems problems)\n       problems               -> error (formatPkgProblems problems)\n \n   where\n-    index = Graph.fromList pkgs\n+    --FIXME: the solver produces large numbers of duplicate but identical\n+    -- instances, so we currently eliminate duplicates here, and the\n+    -- duplicate check below has to cope with there being identical instances.\n+    graph = Graph.fromDistinctList (ordNubBy Graph.nodeKey pkgs)","path":"cabal-install/Distribution/Client/Dependency.hs","position":24,"original_position":24,"commit_id":"a927fa3ad469eb2ed175262bed4a888f264cae0a","original_commit_id":"a927fa3ad469eb2ed175262bed4a888f264cae0a","user":{"login":"23Skidoo","id":47439,"avatar_url":"https://avatars.githubusercontent.com/u/47439?v=3","gravatar_id":"","url":"https://api.github.com/users/23Skidoo","html_url":"https://github.com/23Skidoo","followers_url":"https://api.github.com/users/23Skidoo/followers","following_url":"https://api.github.com/users/23Skidoo/following{/other_user}","gists_url":"https://api.github.com/users/23Skidoo/gists{/gist_id}","starred_url":"https://api.github.com/users/23Skidoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/23Skidoo/subscriptions","organizations_url":"https://api.github.com/users/23Skidoo/orgs","repos_url":"https://api.github.com/users/23Skidoo/repos","events_url":"https://api.github.com/users/23Skidoo/events{/privacy}","received_events_url":"https://api.github.com/users/23Skidoo/received_events","type":"User","site_admin":false},"body":"So given that the fixes to solver have landed, I guess that this can be removed now?","created_at":"2016-10-28T10:49:48Z","updated_at":"2016-10-28T10:49:48Z","html_url":"https://github.com/haskell/cabal/pull/4027#discussion_r85509520","pull_request_url":"https://api.github.com/repos/haskell/cabal/pulls/4027","_links":{"self":{"href":"https://api.github.com/repos/haskell/cabal/pulls/comments/85509520"},"html":{"href":"https://github.com/haskell/cabal/pull/4027#discussion_r85509520"},"pull_request":{"href":"https://api.github.com/repos/haskell/cabal/pulls/4027"}}},"pull_request":{"url":"https://api.github.com/repos/haskell/cabal/pulls/4027","id":90483323,"html_url":"https://github.com/haskell/cabal/pull/4027","diff_url":"https://github.com/haskell/cabal/pull/4027.diff","patch_url":"https://github.com/haskell/cabal/pull/4027.patch","issue_url":"https://api.github.com/repos/haskell/cabal/issues/4027","number":4027,"state":"open","locked":false,"title":"Change Graph.fromList to fromDistinctList and fix conseqeunces","user":{"login":"dcoutts","id":1339423,"avatar_url":"https://avatars.githubusercontent.com/u/1339423?v=3","gravatar_id":"","url":"https://api.github.com/users/dcoutts","html_url":"https://github.com/dcoutts","followers_url":"https://api.github.com/users/dcoutts/followers","following_url":"https://api.github.com/users/dcoutts/following{/other_user}","gists_url":"https://api.github.com/users/dcoutts/gists{/gist_id}","starred_url":"https://api.github.com/users/dcoutts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcoutts/subscriptions","organizations_url":"https://api.github.com/users/dcoutts/orgs","repos_url":"https://api.github.com/users/dcoutts/repos","events_url":"https://api.github.com/users/dcoutts/events{/privacy}","received_events_url":"https://api.github.com/users/dcoutts/received_events","type":"User","site_admin":false},"body":"It's really an error to try and build a graph where you have duplicate node keys, so remove `Graph.fromList` and add `Graph.fromDistinctList`. This check is always on, not just an assertion, because we get it for free given the way Maps can be constructed.\r\n\r\nAll uses of `Graph.fromList` are ok to convert to `fromDistinctList` except for the one taking the solver output and building the solver plan. It turns out the solver produces many duplicates. See issue #4026.\r\n\r\nSo we add a special duplicate check here, but nub out duplicates that are fully identical (ie == not just same keys). This should be removed when the solver is updated to not produce duplicates.\r\n\r\nAs part of that, add a `ordNubBy` to the Utils.\r\n\r\nThis builds on top of #4014 and #4022.","created_at":"2016-10-22T14:16:42Z","updated_at":"2016-10-28T10:49:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc469fe9acb337e85e785bc94b06634ba7912a24","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/haskell/cabal/pulls/4027/commits","review_comments_url":"https://api.github.com/repos/haskell/cabal/pulls/4027/comments","review_comment_url":"https://api.github.com/repos/haskell/cabal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/4027/comments","statuses_url":"https://api.github.com/repos/haskell/cabal/statuses/a927fa3ad469eb2ed175262bed4a888f264cae0a","head":{"label":"dcoutts:master","ref":"master","sha":"a927fa3ad469eb2ed175262bed4a888f264cae0a","user":{"login":"dcoutts","id":1339423,"avatar_url":"https://avatars.githubusercontent.com/u/1339423?v=3","gravatar_id":"","url":"https://api.github.com/users/dcoutts","html_url":"https://github.com/dcoutts","followers_url":"https://api.github.com/users/dcoutts/followers","following_url":"https://api.github.com/users/dcoutts/following{/other_user}","gists_url":"https://api.github.com/users/dcoutts/gists{/gist_id}","starred_url":"https://api.github.com/users/dcoutts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcoutts/subscriptions","organizations_url":"https://api.github.com/users/dcoutts/orgs","repos_url":"https://api.github.com/users/dcoutts/repos","events_url":"https://api.github.com/users/dcoutts/events{/privacy}","received_events_url":"https://api.github.com/users/dcoutts/received_events","type":"User","site_admin":false},"repo":{"id":10475196,"name":"cabal","full_name":"dcoutts/cabal","owner":{"login":"dcoutts","id":1339423,"avatar_url":"https://avatars.githubusercontent.com/u/1339423?v=3","gravatar_id":"","url":"https://api.github.com/users/dcoutts","html_url":"https://github.com/dcoutts","followers_url":"https://api.github.com/users/dcoutts/followers","following_url":"https://api.github.com/users/dcoutts/following{/other_user}","gists_url":"https://api.github.com/users/dcoutts/gists{/gist_id}","starred_url":"https://api.github.com/users/dcoutts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcoutts/subscriptions","organizations_url":"https://api.github.com/users/dcoutts/orgs","repos_url":"https://api.github.com/users/dcoutts/repos","events_url":"https://api.github.com/users/dcoutts/events{/privacy}","received_events_url":"https://api.github.com/users/dcoutts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dcoutts/cabal","description":"Duncan's random Cabal hacking","fork":true,"url":"https://api.github.com/repos/dcoutts/cabal","forks_url":"https://api.github.com/repos/dcoutts/cabal/forks","keys_url":"https://api.github.com/repos/dcoutts/cabal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcoutts/cabal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcoutts/cabal/teams","hooks_url":"https://api.github.com/repos/dcoutts/cabal/hooks","issue_events_url":"https://api.github.com/repos/dcoutts/cabal/issues/events{/number}","events_url":"https://api.github.com/repos/dcoutts/cabal/events","assignees_url":"https://api.github.com/repos/dcoutts/cabal/assignees{/user}","branches_url":"https://api.github.com/repos/dcoutts/cabal/branches{/branch}","tags_url":"https://api.github.com/repos/dcoutts/cabal/tags","blobs_url":"https://api.github.com/repos/dcoutts/cabal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcoutts/cabal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcoutts/cabal/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcoutts/cabal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcoutts/cabal/statuses/{sha}","languages_url":"https://api.github.com/repos/dcoutts/cabal/languages","stargazers_url":"https://api.github.com/repos/dcoutts/cabal/stargazers","contributors_url":"https://api.github.com/repos/dcoutts/cabal/contributors","subscribers_url":"https://api.github.com/repos/dcoutts/cabal/subscribers","subscription_url":"https://api.github.com/repos/dcoutts/cabal/subscription","commits_url":"https://api.github.com/repos/dcoutts/cabal/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcoutts/cabal/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcoutts/cabal/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcoutts/cabal/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcoutts/cabal/contents/{+path}","compare_url":"https://api.github.com/repos/dcoutts/cabal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcoutts/cabal/merges","archive_url":"https://api.github.com/repos/dcoutts/cabal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcoutts/cabal/downloads","issues_url":"https://api.github.com/repos/dcoutts/cabal/issues{/number}","pulls_url":"https://api.github.com/repos/dcoutts/cabal/pulls{/number}","milestones_url":"https://api.github.com/repos/dcoutts/cabal/milestones{/number}","notifications_url":"https://api.github.com/repos/dcoutts/cabal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcoutts/cabal/labels{/name}","releases_url":"https://api.github.com/repos/dcoutts/cabal/releases{/id}","deployments_url":"https://api.github.com/repos/dcoutts/cabal/deployments","created_at":"2013-06-04T09:31:49Z","updated_at":"2015-04-28T14:55:48Z","pushed_at":"2016-10-26T16:36:32Z","git_url":"git://github.com/dcoutts/cabal.git","ssh_url":"git@github.com:dcoutts/cabal.git","clone_url":"https://github.com/dcoutts/cabal.git","svn_url":"https://github.com/dcoutts/cabal","homepage":"http://haskell.org/cabal","size":29333,"stargazers_count":0,"watchers_count":0,"language":"Haskell","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":"haskell:master","ref":"master","sha":"ccbd8d160864a97b681102b8f19e87ffa4c370a9","user":{"login":"haskell","id":450574,"avatar_url":"https://avatars.githubusercontent.com/u/450574?v=3","gravatar_id":"","url":"https://api.github.com/users/haskell","html_url":"https://github.com/haskell","followers_url":"https://api.github.com/users/haskell/followers","following_url":"https://api.github.com/users/haskell/following{/other_user}","gists_url":"https://api.github.com/users/haskell/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell/subscriptions","organizations_url":"https://api.github.com/users/haskell/orgs","repos_url":"https://api.github.com/users/haskell/repos","events_url":"https://api.github.com/users/haskell/events{/privacy}","received_events_url":"https://api.github.com/users/haskell/received_events","type":"Organization","site_admin":false},"repo":{"id":3728161,"name":"cabal","full_name":"haskell/cabal","owner":{"login":"haskell","id":450574,"avatar_url":"https://avatars.githubusercontent.com/u/450574?v=3","gravatar_id":"","url":"https://api.github.com/users/haskell","html_url":"https://github.com/haskell","followers_url":"https://api.github.com/users/haskell/followers","following_url":"https://api.github.com/users/haskell/following{/other_user}","gists_url":"https://api.github.com/users/haskell/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell/subscriptions","organizations_url":"https://api.github.com/users/haskell/orgs","repos_url":"https://api.github.com/users/haskell/repos","events_url":"https://api.github.com/users/haskell/events{/privacy}","received_events_url":"https://api.github.com/users/haskell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haskell/cabal","description":"Official upstream development repository for Cabal and cabal-install","fork":false,"url":"https://api.github.com/repos/haskell/cabal","forks_url":"https://api.github.com/repos/haskell/cabal/forks","keys_url":"https://api.github.com/repos/haskell/cabal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haskell/cabal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haskell/cabal/teams","hooks_url":"https://api.github.com/repos/haskell/cabal/hooks","issue_events_url":"https://api.github.com/repos/haskell/cabal/issues/events{/number}","events_url":"https://api.github.com/repos/haskell/cabal/events","assignees_url":"https://api.github.com/repos/haskell/cabal/assignees{/user}","branches_url":"https://api.github.com/repos/haskell/cabal/branches{/branch}","tags_url":"https://api.github.com/repos/haskell/cabal/tags","blobs_url":"https://api.github.com/repos/haskell/cabal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haskell/cabal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haskell/cabal/git/refs{/sha}","trees_url":"https://api.github.com/repos/haskell/cabal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haskell/cabal/statuses/{sha}","languages_url":"https://api.github.com/repos/haskell/cabal/languages","stargazers_url":"https://api.github.com/repos/haskell/cabal/stargazers","contributors_url":"https://api.github.com/repos/haskell/cabal/contributors","subscribers_url":"https://api.github.com/repos/haskell/cabal/subscribers","subscription_url":"https://api.github.com/repos/haskell/cabal/subscription","commits_url":"https://api.github.com/repos/haskell/cabal/commits{/sha}","git_commits_url":"https://api.github.com/repos/haskell/cabal/git/commits{/sha}","comments_url":"https://api.github.com/repos/haskell/cabal/comments{/number}","issue_comment_url":"https://api.github.com/repos/haskell/cabal/issues/comments{/number}","contents_url":"https://api.github.com/repos/haskell/cabal/contents/{+path}","compare_url":"https://api.github.com/repos/haskell/cabal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haskell/cabal/merges","archive_url":"https://api.github.com/repos/haskell/cabal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haskell/cabal/downloads","issues_url":"https://api.github.com/repos/haskell/cabal/issues{/number}","pulls_url":"https://api.github.com/repos/haskell/cabal/pulls{/number}","milestones_url":"https://api.github.com/repos/haskell/cabal/milestones{/number}","notifications_url":"https://api.github.com/repos/haskell/cabal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haskell/cabal/labels{/name}","releases_url":"https://api.github.com/repos/haskell/cabal/releases{/id}","deployments_url":"https://api.github.com/repos/haskell/cabal/deployments","created_at":"2012-03-15T12:53:38Z","updated_at":"2016-10-27T10:31:42Z","pushed_at":"2016-10-28T08:44:55Z","git_url":"git://github.com/haskell/cabal.git","ssh_url":"git@github.com:haskell/cabal.git","clone_url":"https://github.com/haskell/cabal.git","svn_url":"https://github.com/haskell/cabal","homepage":"http://haskell.org/cabal","size":34301,"stargazers_count":656,"watchers_count":656,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":354,"mirror_url":null,"open_issues_count":754,"forks":354,"open_issues":754,"watchers":656,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haskell/cabal/pulls/4027"},"html":{"href":"https://github.com/haskell/cabal/pull/4027"},"issue":{"href":"https://api.github.com/repos/haskell/cabal/issues/4027"},"comments":{"href":"https://api.github.com/repos/haskell/cabal/issues/4027/comments"},"review_comments":{"href":"https://api.github.com/repos/haskell/cabal/pulls/4027/comments"},"review_comment":{"href":"https://api.github.com/repos/haskell/cabal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/haskell/cabal/pulls/4027/commits"},"statuses":{"href":"https://api.github.com/repos/haskell/cabal/statuses/a927fa3ad469eb2ed175262bed4a888f264cae0a"}}}}
{"actor":{"display_login":"23Skidoo"}}