{"action":"created","issue":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/772","labels_url":"https://api.github.com/repos/commercialhaskell/stack/issues/772/labels{/name}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/772/comments","events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/772/events","html_url":"https://github.com/commercialhaskell/stack/issues/772","id":100661730,"number":772,"title":"Deleting ~/.stack and leaving .stack-work leads to corrupted package database","user":{"login":"wolftune","id":2801853,"avatar_url":"https://avatars.githubusercontent.com/u/2801853?v=3","gravatar_id":"","url":"https://api.github.com/users/wolftune","html_url":"https://github.com/wolftune","followers_url":"https://api.github.com/users/wolftune/followers","following_url":"https://api.github.com/users/wolftune/following{/other_user}","gists_url":"https://api.github.com/users/wolftune/gists{/gist_id}","starred_url":"https://api.github.com/users/wolftune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolftune/subscriptions","organizations_url":"https://api.github.com/users/wolftune/orgs","repos_url":"https://api.github.com/users/wolftune/repos","events_url":"https://api.github.com/users/wolftune/events{/privacy}","received_events_url":"https://api.github.com/users/wolftune/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/commercialhaskell/stack/milestones/6","html_url":"https://github.com/commercialhaskell/stack/milestones/0.3.0.0","labels_url":"https://api.github.com/repos/commercialhaskell/stack/milestones/6/labels","id":1191309,"number":6,"title":"0.3.0.0","description":"","creator":{"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},"open_issues":29,"closed_issues":31,"state":"open","created_at":"2015-07-02T18:20:49Z","updated_at":"2015-08-13T05:46:21Z","due_on":"2015-10-31T07:00:00Z","closed_at":null},"comments":8,"created_at":"2015-08-13T00:02:26Z","updated_at":"2015-08-13T06:13:52Z","closed_at":null,"body":"running `stack build` for [Snowdrift](https://github.com/snowdriftcoop/snowdrift)\r\n\r\nI get this weird error:\r\n\r\n```\r\n--  While building package libravatar-0.1.0.1 using:\r\n      /usr/local/bin/runhaskell -package=Cabal-1.18.1.5 -clear-package-db -global-package-db -package-db=/home/aaron/.stack/snapshots/x86_64-linux/lts-2.21/7.8.4/pkgdb/ /tmp/stack2717/Setup.hs --builddir=.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/ build --ghc-options -hpcdir .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/.hpc/ -ddump-hi -ddump-to-file\r\n    Process exited with code: ExitFailure 1\r\n    Logs have been written to: /home/aaron/sites-programs/snowdrift/.stack-work/logs/libravatar-0.1.0.1.log\r\n\r\n    Configuring libravatar-0.1.0.1...\r\n    Building libravatar-0.1.0.1...\r\n    Preprocessing library libravatar-0.1.0.1...\r\n\r\n    src/Network/Libravatar.hs:30:8:\r\n        Could not find module ‘Network.DNS.Lookup’\r\n        There are files missing in the ‘dns-2.0.0’ package,\r\n        try running 'ghc-pkg check'.\r\n        Use -v to see a list of the files searched for.\r\n\r\n    src/Network/Libravatar.hs:31:8:\r\n        Could not find module ‘Network.DNS.Resolver’\r\n        There are files missing in the ‘dns-2.0.0’ package,\r\n        try running 'ghc-pkg check'.\r\n        Use -v to see a list of the files searched for.\r\n\r\n    src/Network/Libravatar.hs:32:8:\r\n        Could not find module ‘Network.DNS.Types’\r\n        There are files missing in the ‘dns-2.0.0’ package,\r\n        try running 'ghc-pkg check'.\r\n        Use -v to see a list of the files searched for.\r\n```\r\n\r\nI had a similar error earlier (see http://paste.rel4tion.org/45 ) and tried changing stack.yaml to lts-2.22 and successfully built. I then tried removing all of .stack and starting fresh back with lts-2.21 and ran into this new error. I don't know exactly what's going on. Is this actually an issue with the LTS version and we should update to lts-2.22? How does one parse this error / troubleshoot / make sense of what is going on here?"},"comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments/130549811","html_url":"https://github.com/commercialhaskell/stack/issues/772#issuecomment-130549811","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/772","id":130549811,"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},"created_at":"2015-08-13T06:13:52Z","updated_at":"2015-08-13T06:13:52Z","body":"I've tested that case many times, in fact I did so just today. If you can\nprovide a step by step repro showing that add the problem, I can\ninvestigate that.\n\nOn Thu, Aug 13, 2015, 8:51 AM Aaron Wolf <notifications@github.com> wrote:\n\n> Ah, that makes sense, although I don't recall from my process if the issue\n> actually started with removing ~/.stack\n>\n> I think I *might* have hit the bug right away the first time I tried to\n> build after the lts version change. I don't know why I would have removed\n> ~/.stack otherwise. So I think I just updated to new master, the new master\n> had new lts version in stack.yaml and then I hit this bug without my doing\n> anything other than stack build. So, that could be tested with a smaller\n> repo to see if this happens.\n>\n> If so, it's definitely a bug if people have to manually remove .stack-work\n> every time lts version is changed.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/commercialhaskell/stack/issues/772#issuecomment-130545822>\n> .\n>\n"}}