{"action":"created","comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/pulls/comments/40688587","id":40688587,"diff_hunk":"@@ -126,13 +133,15 @@ loadDatabase :: (M env m, PackageInstallInfo pii)\n              -> GetInstalledOpts\n              -> Maybe InstalledCache -- ^ if Just, profiling or haddock is required\n              -> Map PackageName pii -- ^ to determine which installed things we should include\n-             -> Maybe (InstallLocation, Path Abs Dir) -- ^ package database, Nothing for global\n+             -> [Path Abs Dir] -- ^ extra package databases this database depends on\n+             -> Maybe (InstalledPackageLocation, Path Abs Dir) -- ^ package database, Nothing for global\n              -> [LoadHelper] -- ^ from parent databases\n              -> m ([LoadHelper], [DumpPackage () ()])\n-loadDatabase menv opts mcache sourceMap mdb lhs0 = do\n+loadDatabase menv opts mcache sourceMap extraDBs mdb lhs0 = do\n     wc <- getWhichCompiler\n-    (lhs1, dps) <- ghcPkgDump menv wc (fmap snd mdb)\n-                  $ conduitDumpPackage =$ sink\n+    (lhs1, dps) <- ghcPkgDump menv wc (extraDBs ++ (fmap snd (maybeToList mdb)))","path":"src/Stack/Build/Installed.hs","position":54,"original_position":54,"commit_id":"ecc89f8ef110b7a58d478a43cb8322120458a2da","original_commit_id":"ecc89f8ef110b7a58d478a43cb8322120458a2da","user":{"login":"snoyberg","id":49415,"avatar_url":"https://avatars.githubusercontent.com/u/49415?v=3","gravatar_id":"","url":"https://api.github.com/users/snoyberg","html_url":"https://github.com/snoyberg","followers_url":"https://api.github.com/users/snoyberg/followers","following_url":"https://api.github.com/users/snoyberg/following{/other_user}","gists_url":"https://api.github.com/users/snoyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/snoyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snoyberg/subscriptions","organizations_url":"https://api.github.com/users/snoyberg/orgs","repos_url":"https://api.github.com/users/snoyberg/repos","events_url":"https://api.github.com/users/snoyberg/events{/privacy}","received_events_url":"https://api.github.com/users/snoyberg/received_events","type":"User","site_admin":false},"body":"Stack itself does the dependencies check and ignores ghc-pkg's opinion on the matter. You can see that we currently do the databases one at a time.","created_at":"2015-09-29T15:41:43Z","updated_at":"2015-09-29T15:41:43Z","html_url":"https://github.com/commercialhaskell/stack/pull/990#discussion_r40688587","pull_request_url":"https://api.github.com/repos/commercialhaskell/stack/pulls/990","_links":{"self":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/comments/40688587"},"html":{"href":"https://github.com/commercialhaskell/stack/pull/990#discussion_r40688587"},"pull_request":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/990"}}},"pull_request":{"url":"https://api.github.com/repos/commercialhaskell/stack/pulls/990","id":44900968,"html_url":"https://github.com/commercialhaskell/stack/pull/990","diff_url":"https://github.com/commercialhaskell/stack/pull/990.diff","patch_url":"https://github.com/commercialhaskell/stack/pull/990.patch","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/990","number":990,"state":"open","locked":false,"title":"Extra package database support","user":{"login":"vigoo","id":2292489,"avatar_url":"https://avatars.githubusercontent.com/u/2292489?v=3","gravatar_id":"","url":"https://api.github.com/users/vigoo","html_url":"https://github.com/vigoo","followers_url":"https://api.github.com/users/vigoo/followers","following_url":"https://api.github.com/users/vigoo/following{/other_user}","gists_url":"https://api.github.com/users/vigoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vigoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigoo/subscriptions","organizations_url":"https://api.github.com/users/vigoo/orgs","repos_url":"https://api.github.com/users/vigoo/repos","events_url":"https://api.github.com/users/vigoo/events{/privacy}","received_events_url":"https://api.github.com/users/vigoo/received_events","type":"User","site_admin":false},"body":"This pull-request adds support for creating and using reusable _extra package database_ with stack.\r\n\r\n[This test repository](https://github.com/vigoo/stack-sandbox-chain-test) demonstrates how it would work:\r\n- `stack build` in `lib1` builds the library into the local package database and nothing else\r\n- `stack build` in `lib2` builds its dependencies (`ansi-wl-pprint` and everything it needs) **and** `lib2` itself to its local package database.\r\n- `stack build` in `app` builds the executable using both `lib1` and `lib2` from the previously built package databases.\r\n\r\nThe change adds two new options to the stack yaml:\r\n- `extra-package-dbs` is a list of relative or absolute paths to extra package databases, which will be added on top of the _global_ package database, before snapshot and local\r\n- With `force-install-local` we still use the snapshots to determine the package versions to be installed, but they are _not_ installed to the shared snapshot package database but always to the current local package database. This is required to make the built package databases redistributable.\r\n\r\n**NOTE** Currently this does not work. But it worked before I rebased it, so I'm opening the PR to get some help in fixing it before we can merge. To reproduce the issue, build this branch, and run the test script from the above linked repository, giving it the built stack executable as its parameter.","created_at":"2015-09-14T07:44:14Z","updated_at":"2015-09-29T15:41:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6acfe0983326998d4affac9a7715f69e088f8dc0","assignee":{"login":"snoyberg","id":49415,"avatar_url":"https://avatars.githubusercontent.com/u/49415?v=3","gravatar_id":"","url":"https://api.github.com/users/snoyberg","html_url":"https://github.com/snoyberg","followers_url":"https://api.github.com/users/snoyberg/followers","following_url":"https://api.github.com/users/snoyberg/following{/other_user}","gists_url":"https://api.github.com/users/snoyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/snoyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snoyberg/subscriptions","organizations_url":"https://api.github.com/users/snoyberg/orgs","repos_url":"https://api.github.com/users/snoyberg/repos","events_url":"https://api.github.com/users/snoyberg/events{/privacy}","received_events_url":"https://api.github.com/users/snoyberg/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/commercialhaskell/stack/pulls/990/commits","review_comments_url":"https://api.github.com/repos/commercialhaskell/stack/pulls/990/comments","review_comment_url":"https://api.github.com/repos/commercialhaskell/stack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/990/comments","statuses_url":"https://api.github.com/repos/commercialhaskell/stack/statuses/ecc89f8ef110b7a58d478a43cb8322120458a2da","head":{"label":"vigoo:extra-pkg-db-support","ref":"extra-pkg-db-support","sha":"ecc89f8ef110b7a58d478a43cb8322120458a2da","user":{"login":"vigoo","id":2292489,"avatar_url":"https://avatars.githubusercontent.com/u/2292489?v=3","gravatar_id":"","url":"https://api.github.com/users/vigoo","html_url":"https://github.com/vigoo","followers_url":"https://api.github.com/users/vigoo/followers","following_url":"https://api.github.com/users/vigoo/following{/other_user}","gists_url":"https://api.github.com/users/vigoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vigoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigoo/subscriptions","organizations_url":"https://api.github.com/users/vigoo/orgs","repos_url":"https://api.github.com/users/vigoo/repos","events_url":"https://api.github.com/users/vigoo/events{/privacy}","received_events_url":"https://api.github.com/users/vigoo/received_events","type":"User","site_admin":false},"repo":{"id":41783202,"name":"stack","full_name":"vigoo/stack","owner":{"login":"vigoo","id":2292489,"avatar_url":"https://avatars.githubusercontent.com/u/2292489?v=3","gravatar_id":"","url":"https://api.github.com/users/vigoo","html_url":"https://github.com/vigoo","followers_url":"https://api.github.com/users/vigoo/followers","following_url":"https://api.github.com/users/vigoo/following{/other_user}","gists_url":"https://api.github.com/users/vigoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vigoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigoo/subscriptions","organizations_url":"https://api.github.com/users/vigoo/orgs","repos_url":"https://api.github.com/users/vigoo/repos","events_url":"https://api.github.com/users/vigoo/events{/privacy}","received_events_url":"https://api.github.com/users/vigoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vigoo/stack","description":"The Haskell Tool Stack","fork":true,"url":"https://api.github.com/repos/vigoo/stack","forks_url":"https://api.github.com/repos/vigoo/stack/forks","keys_url":"https://api.github.com/repos/vigoo/stack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vigoo/stack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vigoo/stack/teams","hooks_url":"https://api.github.com/repos/vigoo/stack/hooks","issue_events_url":"https://api.github.com/repos/vigoo/stack/issues/events{/number}","events_url":"https://api.github.com/repos/vigoo/stack/events","assignees_url":"https://api.github.com/repos/vigoo/stack/assignees{/user}","branches_url":"https://api.github.com/repos/vigoo/stack/branches{/branch}","tags_url":"https://api.github.com/repos/vigoo/stack/tags","blobs_url":"https://api.github.com/repos/vigoo/stack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vigoo/stack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vigoo/stack/git/refs{/sha}","trees_url":"https://api.github.com/repos/vigoo/stack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vigoo/stack/statuses/{sha}","languages_url":"https://api.github.com/repos/vigoo/stack/languages","stargazers_url":"https://api.github.com/repos/vigoo/stack/stargazers","contributors_url":"https://api.github.com/repos/vigoo/stack/contributors","subscribers_url":"https://api.github.com/repos/vigoo/stack/subscribers","subscription_url":"https://api.github.com/repos/vigoo/stack/subscription","commits_url":"https://api.github.com/repos/vigoo/stack/commits{/sha}","git_commits_url":"https://api.github.com/repos/vigoo/stack/git/commits{/sha}","comments_url":"https://api.github.com/repos/vigoo/stack/comments{/number}","issue_comment_url":"https://api.github.com/repos/vigoo/stack/issues/comments{/number}","contents_url":"https://api.github.com/repos/vigoo/stack/contents/{+path}","compare_url":"https://api.github.com/repos/vigoo/stack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vigoo/stack/merges","archive_url":"https://api.github.com/repos/vigoo/stack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vigoo/stack/downloads","issues_url":"https://api.github.com/repos/vigoo/stack/issues{/number}","pulls_url":"https://api.github.com/repos/vigoo/stack/pulls{/number}","milestones_url":"https://api.github.com/repos/vigoo/stack/milestones{/number}","notifications_url":"https://api.github.com/repos/vigoo/stack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vigoo/stack/labels{/name}","releases_url":"https://api.github.com/repos/vigoo/stack/releases{/id}","created_at":"2015-09-02T06:05:53Z","updated_at":"2015-09-02T06:05:54Z","pushed_at":"2015-09-28T18:37:47Z","git_url":"git://github.com/vigoo/stack.git","ssh_url":"git@github.com:vigoo/stack.git","clone_url":"https://github.com/vigoo/stack.git","svn_url":"https://github.com/vigoo/stack","homepage":"https://www.stackage.org/","size":3251,"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":"commercialhaskell:master","ref":"master","sha":"06a4b270de2d2dcbd3ee8abe98078151c4a8f075","user":{"login":"commercialhaskell","id":10633049,"avatar_url":"https://avatars.githubusercontent.com/u/10633049?v=3","gravatar_id":"","url":"https://api.github.com/users/commercialhaskell","html_url":"https://github.com/commercialhaskell","followers_url":"https://api.github.com/users/commercialhaskell/followers","following_url":"https://api.github.com/users/commercialhaskell/following{/other_user}","gists_url":"https://api.github.com/users/commercialhaskell/gists{/gist_id}","starred_url":"https://api.github.com/users/commercialhaskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercialhaskell/subscriptions","organizations_url":"https://api.github.com/users/commercialhaskell/orgs","repos_url":"https://api.github.com/users/commercialhaskell/repos","events_url":"https://api.github.com/users/commercialhaskell/events{/privacy}","received_events_url":"https://api.github.com/users/commercialhaskell/received_events","type":"Organization","site_admin":false},"repo":{"id":34817922,"name":"stack","full_name":"commercialhaskell/stack","owner":{"login":"commercialhaskell","id":10633049,"avatar_url":"https://avatars.githubusercontent.com/u/10633049?v=3","gravatar_id":"","url":"https://api.github.com/users/commercialhaskell","html_url":"https://github.com/commercialhaskell","followers_url":"https://api.github.com/users/commercialhaskell/followers","following_url":"https://api.github.com/users/commercialhaskell/following{/other_user}","gists_url":"https://api.github.com/users/commercialhaskell/gists{/gist_id}","starred_url":"https://api.github.com/users/commercialhaskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercialhaskell/subscriptions","organizations_url":"https://api.github.com/users/commercialhaskell/orgs","repos_url":"https://api.github.com/users/commercialhaskell/repos","events_url":"https://api.github.com/users/commercialhaskell/events{/privacy}","received_events_url":"https://api.github.com/users/commercialhaskell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commercialhaskell/stack","description":"The Haskell Tool Stack","fork":false,"url":"https://api.github.com/repos/commercialhaskell/stack","forks_url":"https://api.github.com/repos/commercialhaskell/stack/forks","keys_url":"https://api.github.com/repos/commercialhaskell/stack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commercialhaskell/stack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commercialhaskell/stack/teams","hooks_url":"https://api.github.com/repos/commercialhaskell/stack/hooks","issue_events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/events{/number}","events_url":"https://api.github.com/repos/commercialhaskell/stack/events","assignees_url":"https://api.github.com/repos/commercialhaskell/stack/assignees{/user}","branches_url":"https://api.github.com/repos/commercialhaskell/stack/branches{/branch}","tags_url":"https://api.github.com/repos/commercialhaskell/stack/tags","blobs_url":"https://api.github.com/repos/commercialhaskell/stack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commercialhaskell/stack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commercialhaskell/stack/git/refs{/sha}","trees_url":"https://api.github.com/repos/commercialhaskell/stack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commercialhaskell/stack/statuses/{sha}","languages_url":"https://api.github.com/repos/commercialhaskell/stack/languages","stargazers_url":"https://api.github.com/repos/commercialhaskell/stack/stargazers","contributors_url":"https://api.github.com/repos/commercialhaskell/stack/contributors","subscribers_url":"https://api.github.com/repos/commercialhaskell/stack/subscribers","subscription_url":"https://api.github.com/repos/commercialhaskell/stack/subscription","commits_url":"https://api.github.com/repos/commercialhaskell/stack/commits{/sha}","git_commits_url":"https://api.github.com/repos/commercialhaskell/stack/git/commits{/sha}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/comments{/number}","issue_comment_url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments{/number}","contents_url":"https://api.github.com/repos/commercialhaskell/stack/contents/{+path}","compare_url":"https://api.github.com/repos/commercialhaskell/stack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commercialhaskell/stack/merges","archive_url":"https://api.github.com/repos/commercialhaskell/stack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commercialhaskell/stack/downloads","issues_url":"https://api.github.com/repos/commercialhaskell/stack/issues{/number}","pulls_url":"https://api.github.com/repos/commercialhaskell/stack/pulls{/number}","milestones_url":"https://api.github.com/repos/commercialhaskell/stack/milestones{/number}","notifications_url":"https://api.github.com/repos/commercialhaskell/stack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commercialhaskell/stack/labels{/name}","releases_url":"https://api.github.com/repos/commercialhaskell/stack/releases{/id}","created_at":"2015-04-29T20:56:42Z","updated_at":"2015-09-28T22:44:35Z","pushed_at":"2015-09-29T15:30:41Z","git_url":"git://github.com/commercialhaskell/stack.git","ssh_url":"git@github.com:commercialhaskell/stack.git","clone_url":"https://github.com/commercialhaskell/stack.git","svn_url":"https://github.com/commercialhaskell/stack","homepage":"https://www.stackage.org/","size":7310,"stargazers_count":995,"watchers_count":995,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":94,"mirror_url":null,"open_issues_count":123,"forks":94,"open_issues":123,"watchers":995,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/990"},"html":{"href":"https://github.com/commercialhaskell/stack/pull/990"},"issue":{"href":"https://api.github.com/repos/commercialhaskell/stack/issues/990"},"comments":{"href":"https://api.github.com/repos/commercialhaskell/stack/issues/990/comments"},"review_comments":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/990/comments"},"review_comment":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/990/commits"},"statuses":{"href":"https://api.github.com/repos/commercialhaskell/stack/statuses/ecc89f8ef110b7a58d478a43cb8322120458a2da"}}}}