{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/cabal/issues/2916","repository_url":"https://api.github.com/repos/haskell/cabal","labels_url":"https://api.github.com/repos/haskell/cabal/issues/2916/labels{/name}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/2916/comments","events_url":"https://api.github.com/repos/haskell/cabal/issues/2916/events","html_url":"https://github.com/haskell/cabal/pull/2916","id":115717579,"number":2916,"title":"Fix space leak in solver backjumping","user":{"login":"grayjay","id":4276753,"avatar_url":"https://avatars.githubusercontent.com/u/4276753?v=3","gravatar_id":"","url":"https://api.github.com/users/grayjay","html_url":"https://github.com/grayjay","followers_url":"https://api.github.com/users/grayjay/followers","following_url":"https://api.github.com/users/grayjay/following{/other_user}","gists_url":"https://api.github.com/users/grayjay/gists{/gist_id}","starred_url":"https://api.github.com/users/grayjay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayjay/subscriptions","organizations_url":"https://api.github.com/users/grayjay/orgs","repos_url":"https://api.github.com/users/grayjay/repos","events_url":"https://api.github.com/users/grayjay/events{/privacy}","received_events_url":"https://api.github.com/users/grayjay/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell/cabal/labels/solver","name":"solver","color":"009800"}],"state":"closed","locked":false,"assignee":{"login":"kosmikus","id":293191,"avatar_url":"https://avatars.githubusercontent.com/u/293191?v=3","gravatar_id":"","url":"https://api.github.com/users/kosmikus","html_url":"https://github.com/kosmikus","followers_url":"https://api.github.com/users/kosmikus/followers","following_url":"https://api.github.com/users/kosmikus/following{/other_user}","gists_url":"https://api.github.com/users/kosmikus/gists{/gist_id}","starred_url":"https://api.github.com/users/kosmikus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosmikus/subscriptions","organizations_url":"https://api.github.com/users/kosmikus/orgs","repos_url":"https://api.github.com/users/kosmikus/repos","events_url":"https://api.github.com/users/kosmikus/events{/privacy}","received_events_url":"https://api.github.com/users/kosmikus/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/haskell/cabal/milestones/29","html_url":"https://github.com/haskell/cabal/milestones/cabal-install%201.24","labels_url":"https://api.github.com/repos/haskell/cabal/milestones/29/labels","id":929438,"number":29,"title":"cabal-install 1.24","description":"","creator":{"login":"tibbe","id":17277,"avatar_url":"https://avatars.githubusercontent.com/u/17277?v=3","gravatar_id":"","url":"https://api.github.com/users/tibbe","html_url":"https://github.com/tibbe","followers_url":"https://api.github.com/users/tibbe/followers","following_url":"https://api.github.com/users/tibbe/following{/other_user}","gists_url":"https://api.github.com/users/tibbe/gists{/gist_id}","starred_url":"https://api.github.com/users/tibbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tibbe/subscriptions","organizations_url":"https://api.github.com/users/tibbe/orgs","repos_url":"https://api.github.com/users/tibbe/repos","events_url":"https://api.github.com/users/tibbe/events{/privacy}","received_events_url":"https://api.github.com/users/tibbe/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":42,"state":"open","created_at":"2015-01-09T23:38:12Z","updated_at":"2016-03-05T06:12:50Z","due_on":"2016-03-30T22:00:00Z","closed_at":null},"comments":12,"created_at":"2015-11-08T08:22:26Z","updated_at":"2016-03-05T10:52:49Z","closed_at":"2016-03-04T23:01:07Z","pull_request":{"url":"https://api.github.com/repos/haskell/cabal/pulls/2916","html_url":"https://github.com/haskell/cabal/pull/2916","diff_url":"https://github.com/haskell/cabal/pull/2916.diff","patch_url":"https://github.com/haskell/cabal/pull/2916.patch"},"body":"This commit refactors backjumping so that it uses the `Progress` type instead of\r\nseparate references to a node's children and the conflict set calculated from\r\nthose children.  The behavior should be unchanged.\r\n\r\nI added to #2914 so that I could test memory usage more easily.  These heap profiles were generated with `cabal --ignore-sandbox install --dry-run --max-backjumps -1 hackage-server-0.4 aeson yesod --with-compiler C:/ghc-7.6.3_64/bin/ghc +RTS -p -s -h -L50`.\r\n\r\nafter #2914 (https://github.com/haskell/cabal/commit/90c777299251deda571083ec0b95b68ca20e0873):\r\n![cabal-refactored-logging](https://cloud.githubusercontent.com/assets/4276753/11019389/c4b64036-85ab-11e5-9097-10bb2e702940.png)\r\n\r\nafter both commits (https://github.com/haskell/cabal/commit/c1189c3d61585207e99818531e3cd990d4babf3a):\r\n![cabal](https://cloud.githubusercontent.com/assets/4276753/11019366/f4cd1cfa-85aa-11e5-8af5-481f1eb0c0dc.png)\r\n\r\nlonger run with both commits, using ` -i10`.  I don't know why it increases later.\r\n![cabal-longer-run](https://cloud.githubusercontent.com/assets/4276753/11019369/fcc05364-85aa-11e5-8f3c-0ef2826c3bb0.png)\r\n\r\nI have a few concerns about this PR.  I combined backjumping and exploring the tree into one traversal, which is less modular.  Is there a way that we could use two passes without storing conflict sets directly on the tree's nodes?  The `combine` function is also less recognizable after the refactoring.  I'd like to make it clearer, if possible.\r\n\r\n~~I deleted several unused functions that didn't compile with my change, such as `explore`.  Is that alright, or should I refactor them?~~"},"comment":{"url":"https://api.github.com/repos/haskell/cabal/issues/comments/192621817","html_url":"https://github.com/haskell/cabal/pull/2916#issuecomment-192621817","issue_url":"https://api.github.com/repos/haskell/cabal/issues/2916","id":192621817,"user":{"login":"hvr","id":285533,"avatar_url":"https://avatars.githubusercontent.com/u/285533?v=3","gravatar_id":"","url":"https://api.github.com/users/hvr","html_url":"https://github.com/hvr","followers_url":"https://api.github.com/users/hvr/followers","following_url":"https://api.github.com/users/hvr/following{/other_user}","gists_url":"https://api.github.com/users/hvr/gists{/gist_id}","starred_url":"https://api.github.com/users/hvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvr/subscriptions","organizations_url":"https://api.github.com/users/hvr/orgs","repos_url":"https://api.github.com/users/hvr/repos","events_url":"https://api.github.com/users/hvr/events{/privacy}","received_events_url":"https://api.github.com/users/hvr/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T10:52:49Z","updated_at":"2016-03-05T10:52:49Z","body":"@kosmikus tbh, I don't think it's essential getting this refactoring into the 1.24 branch; we're still in the process of merging the `nix-local-build` branch into 1.24 and it'd be helpful if `master` and `1.24` wouldn't diverge too much as this will only cause more work otherwise, current delta:\r\n\r\n```\r\n .travis.yml                                               |   31 ++-\r\n Cabal/Cabal.cabal                                         |    2 +-\r\n Cabal/Distribution/Simple/PackageIndex.hs                 |    2 +-\r\n Cabal/Distribution/Simple/Setup.hs                        |    1 +\r\n cabal-install/Distribution/Client/BuildTarget.hs          | 1596 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n cabal-install/Distribution/Client/Dependency/Types.hs     |    5 +\r\n cabal-install/Distribution/Client/DistDirLayout.hs        |  131 ++++++++++\r\n cabal-install/Distribution/Client/FileMonitor.hs          |    9 +\r\n cabal-install/Distribution/Client/Glob.hs                 |   12 +-\r\n cabal-install/Distribution/Client/GlobalFlags.hs          |   48 ++--\r\n cabal-install/Distribution/Client/InstallPlan.hs          |  108 +++++++-\r\n cabal-install/Distribution/Client/MultiPkg.hs             |  745 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n cabal-install/Distribution/Client/PackageHash.hs          |  224 +++++++++++++++++\r\n cabal-install/Distribution/Client/ParseUtils.hs           |  240 +++++++++++++++++-\r\n cabal-install/Distribution/Client/ProjectBuilding.hs      | 1255 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n cabal-install/Distribution/Client/ProjectConfig.hs        |  679 ++++++++++++++++++++++++++++++++++++++++++++++++++\r\n cabal-install/Distribution/Client/ProjectConfig/Legacy.hs | 1077 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n cabal-install/Distribution/Client/ProjectConfig/Types.hs  |  333 +++++++++++++++++++++++++\r\n cabal-install/Distribution/Client/ProjectPlanning.hs      | 2328 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n cabal-install/Distribution/Client/RebuildMonad.hs         |   15 +-\r\n cabal-install/Distribution/Client/Setup.hs                |    1 +\r\n cabal-install/Distribution/Client/Types.hs                |   11 +\r\n cabal-install/Distribution/Client/Utils/Json.hs           |  225 +++++++++++++++++\r\n cabal-install/Main.hs                                     |   49 +++-\r\n cabal-install/cabal-install.cabal                         |   24 +-\r\n cabal.project                                             |    1 +\r\n 26 files changed, 9095 insertions(+), 57 deletions(-)\r\n```\r\n\r\n\r\n...that being said, since as far as I understand it, the solver split won't touch the `Cabal` library at all (since only `cabal-install` would depend on the new split-off solver library package), this could in theory be backported/cherry-picked to the `1.24` branch lateron if there's any compelling reason to do so.\r\n\r\nMorever, there may very well be an interim 1.26 branch not bundled with any GHC release (like there was the 1.20 branch inbetween GHC 7.8 and GHC 7.10), before a 1.28 branch to go with GHC 8.2\r\n\r\nSo there's imho no hurry as there's plenty of opportunities to release such a solver package into the open in the forseeable future. And there's still the question of how to version the solver library and how to reconcile this with Git... for instance, having all in a single Git repo will severly limit our options, and effectively force use to develop the solver library in lock-step with cabal-install and  resulting in an even more intertwined and confusing history (IMO, Git handles multiple-deliverables-in-a-single-Git-repo very poorly -- having `Cabal` and `cabal-install` in the same Git repo already results in confusing Git tagging scenarios, adding yet another versioned item will make this only worse)"}}