{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/cabal/issues/2931","labels_url":"https://api.github.com/repos/haskell/cabal/issues/2931/labels{/name}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/2931/comments","events_url":"https://api.github.com/repos/haskell/cabal/issues/2931/events","html_url":"https://github.com/haskell/cabal/pull/2931","id":118037049,"number":2931,"title":"Fix for #2155 including tests","user":{"login":"martinvlk","id":4638575,"avatar_url":"https://avatars.githubusercontent.com/u/4638575?v=3","gravatar_id":"","url":"https://api.github.com/users/martinvlk","html_url":"https://github.com/martinvlk","followers_url":"https://api.github.com/users/martinvlk/followers","following_url":"https://api.github.com/users/martinvlk/following{/other_user}","gists_url":"https://api.github.com/users/martinvlk/gists{/gist_id}","starred_url":"https://api.github.com/users/martinvlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinvlk/subscriptions","organizations_url":"https://api.github.com/users/martinvlk/orgs","repos_url":"https://api.github.com/users/martinvlk/repos","events_url":"https://api.github.com/users/martinvlk/events{/privacy}","received_events_url":"https://api.github.com/users/martinvlk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell/cabal/labels/sandbox","name":"sandbox","color":"009800"}],"state":"open","locked":false,"assignee":{"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},"milestone":null,"comments":4,"created_at":"2015-11-20T13:00:00Z","updated_at":"2015-11-23T10:57:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/haskell/cabal/pulls/2931","html_url":"https://github.com/haskell/cabal/pull/2931","diff_url":"https://github.com/haskell/cabal/pull/2931.diff","patch_url":"https://github.com/haskell/cabal/pull/2931.patch"},"body":"Here is my take on fixing https://github.com/haskell/cabal/issues/2155 (cabal sandbox delete-source gives no indication of whether it did anything)\r\n\r\nI included integration tests that capture the problem and the solution.\r\n\r\nI also did a bit of refactoring along the way and added corresponding unit tests.\r\n\r\nCould somebody review my code as I am a Haskell beginner and would appreciate feedback and making sure it's sound before it's potentially accepted into the project.\r\n\r\nCheers\r\nMartin"},"comment":{"url":"https://api.github.com/repos/haskell/cabal/issues/comments/158904277","html_url":"https://github.com/haskell/cabal/pull/2931#issuecomment-158904277","issue_url":"https://api.github.com/repos/haskell/cabal/issues/2931","id":158904277,"user":{"login":"martinvlk","id":4638575,"avatar_url":"https://avatars.githubusercontent.com/u/4638575?v=3","gravatar_id":"","url":"https://api.github.com/users/martinvlk","html_url":"https://github.com/martinvlk","followers_url":"https://api.github.com/users/martinvlk/followers","following_url":"https://api.github.com/users/martinvlk/following{/other_user}","gists_url":"https://api.github.com/users/martinvlk/gists{/gist_id}","starred_url":"https://api.github.com/users/martinvlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinvlk/subscriptions","organizations_url":"https://api.github.com/users/martinvlk/orgs","repos_url":"https://api.github.com/users/martinvlk/repos","events_url":"https://api.github.com/users/martinvlk/events{/privacy}","received_events_url":"https://api.github.com/users/martinvlk/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T10:57:15Z","updated_at":"2015-11-23T10:57:15Z","body":"I just found an old [pull request 2605](https://github.com/haskell/cabal/pull/2605) in the queue, that also attempts to fix #2155, but hasn't been merged since May. So we have two conflicting pull requests for that issue.\r\n\r\nThe fix in the pull request 2605 does work as far as I can see, but is done quite differently than my fix. It has no tests going with it.\r\n\r\nOne other thing I noticed is that the pull request 2605 mentions issue #1360, and I can see that one of the use cases I handle here goes against that fix. I am going to remove it so and tolerate nonexistent source directory as per #1360."}}