{"action":"created","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/1002","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1002/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1002/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1002/events","html_url":"https://github.com/commercialhaskell/stack/issues/1002","id":106960185,"number":1002,"title":"Using Cabal-1.22 for Setup.hs with GHC-7.8","user":{"login":"mwu-tow","id":1548407,"avatar_url":"https://avatars.githubusercontent.com/u/1548407?v=3","gravatar_id":"","url":"https://api.github.com/users/mwu-tow","html_url":"https://github.com/mwu-tow","followers_url":"https://api.github.com/users/mwu-tow/followers","following_url":"https://api.github.com/users/mwu-tow/following{/other_user}","gists_url":"https://api.github.com/users/mwu-tow/gists{/gist_id}","starred_url":"https://api.github.com/users/mwu-tow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwu-tow/subscriptions","organizations_url":"https://api.github.com/users/mwu-tow/orgs","repos_url":"https://api.github.com/users/mwu-tow/repos","events_url":"https://api.github.com/users/mwu-tow/events{/privacy}","received_events_url":"https://api.github.com/users/mwu-tow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-17T11:03:17Z","updated_at":"2015-09-17T11:27:12Z","closed_at":null,"body":"Hello,\r\nI have a package that uses custom `Setup.hs` file that requires Cabal library at least in version 1.22. I need to build the package with GHC 7.8. \r\n\r\nWith `cabal` it is enough to `cabal install cabal` — and then `Setup.hs` will be linked against the latest Cabal library. Using GHC 7.8 with it works seamlessly.\r\n\r\nHow can I tell `stack` to use newer Cabal version for `Setup.hs`? \r\n\r\nI tried adding `Cabal-1.22.4.0` to the `extra-deps` field but it does not help — apparently the newer Cabal will be available to the built package but not its `Setup.hs`. It still gets `Cabal-1.18.1.5` that comes with GHC 7.8."},"comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments/141048878","html_url":"https://github.com/commercialhaskell/stack/issues/1002#issuecomment-141048878","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/1002","id":141048878,"user":{"login":"mwu-tow","id":1548407,"avatar_url":"https://avatars.githubusercontent.com/u/1548407?v=3","gravatar_id":"","url":"https://api.github.com/users/mwu-tow","html_url":"https://github.com/mwu-tow","followers_url":"https://api.github.com/users/mwu-tow/followers","following_url":"https://api.github.com/users/mwu-tow/following{/other_user}","gists_url":"https://api.github.com/users/mwu-tow/gists{/gist_id}","starred_url":"https://api.github.com/users/mwu-tow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwu-tow/subscriptions","organizations_url":"https://api.github.com/users/mwu-tow/orgs","repos_url":"https://api.github.com/users/mwu-tow/repos","events_url":"https://api.github.com/users/mwu-tow/events{/privacy}","received_events_url":"https://api.github.com/users/mwu-tow/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T11:27:12Z","updated_at":"2015-09-17T11:27:12Z","body":"@snoyberg \r\nThank you for such quick answer. Yes, of course — should I just raise that question on SO and post the link here?\r\nStill, please let's continue for a while here, since this format better works for follow-up doubts.\r\n\r\n\r\nI'm not sure if it will work for me. I use a custom (patched) GHC 7.8.4 build, the GHC downloaded by `stack setup` won't work for me. I was sure that `stack setup` with `--upgrade-cabal` will just install a new GHC with overwritten `cabal` so I didn't try it before.\r\nNow I tried `stack setup 7.8.4 --upgrade-cabal` and it detected my custom build from PATH:\r\n```\r\nTrying to upgrade Cabal library on a GHC not installed by stack.\r\nThis may fail, caveat emptor!\r\nInstalling Cabal-1.22.4.0 to replace 1.18.1.5\r\n[ 1 of 79] Compiling Distribution.GetOpt ( Distribution\\GetOpt.hs, Distribution\\GetOpt.o )\r\n[snip…]\r\n[79 of 79] Compiling Main             ( Setup.hs, Setup.o )\r\nLinking Setup.exe ...\r\nDid not find executable at specified path: C:\\Users\\MWURB_~1\\AppData\\Local\\Temp\\stack-cabal-upgrade19588\\Cabal-1.22.4.0\\Setup\r\n```\r\n\r\nApparently it failed. And so it is — `stack build` still uses the old Cabal after that.\r\nAm I doing something wrong? It's not clear to me what actually happened.\r\n"}}