{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/cabal/issues/2755","repository_url":"https://api.github.com/repos/haskell/cabal","labels_url":"https://api.github.com/repos/haskell/cabal/issues/2755/labels{/name}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/2755/comments","events_url":"https://api.github.com/repos/haskell/cabal/issues/2755/events","html_url":"https://github.com/haskell/cabal/issues/2755","id":99884952,"number":2755,"title":"Strange \"cabal sdist\" warning","user":{"login":"svenpanne","id":5070764,"avatar_url":"https://avatars.githubusercontent.com/u/5070764?v=3","gravatar_id":"","url":"https://api.github.com/users/svenpanne","html_url":"https://github.com/svenpanne","followers_url":"https://api.github.com/users/svenpanne/followers","following_url":"https://api.github.com/users/svenpanne/following{/other_user}","gists_url":"https://api.github.com/users/svenpanne/gists{/gist_id}","starred_url":"https://api.github.com/users/svenpanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svenpanne/subscriptions","organizations_url":"https://api.github.com/users/svenpanne/orgs","repos_url":"https://api.github.com/users/svenpanne/repos","events_url":"https://api.github.com/users/svenpanne/events{/privacy}","received_events_url":"https://api.github.com/users/svenpanne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell/cabal/labels/type:%20bug","name":"type: bug","color":"e99695"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-08-09T10:37:15Z","updated_at":"2016-08-16T21:05:38Z","closed_at":null,"body":"Cabal from HEAD started to issue the warning `Warning: Cannot run preprocessors. Run 'configure' command first.` when running `cabal sdist` after a `cabal install`, see e.g. https://travis-ci.org/haskell-Opengl/OpenGL/jobs/74581138#L264. Previous versions didn't do this, see e.g. https://travis-ci.org/haskell-opengl/OpenGL/jobs/74581137#L264. Somehow the warning doesn't make sense, because the package has obviously been built before, so configuration must have happened, too.\r\n\r\nIMHO the warning is bogus, but perhaps I misunderstood how things are supposed to work...\r\n"},"comment":{"url":"https://api.github.com/repos/haskell/cabal/issues/comments/240238664","html_url":"https://github.com/haskell/cabal/issues/2755#issuecomment-240238664","issue_url":"https://api.github.com/repos/haskell/cabal/issues/2755","id":240238664,"user":{"login":"ezyang","id":13564,"avatar_url":"https://avatars.githubusercontent.com/u/13564?v=3","gravatar_id":"","url":"https://api.github.com/users/ezyang","html_url":"https://github.com/ezyang","followers_url":"https://api.github.com/users/ezyang/followers","following_url":"https://api.github.com/users/ezyang/following{/other_user}","gists_url":"https://api.github.com/users/ezyang/gists{/gist_id}","starred_url":"https://api.github.com/users/ezyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezyang/subscriptions","organizations_url":"https://api.github.com/users/ezyang/orgs","repos_url":"https://api.github.com/users/ezyang/repos","events_url":"https://api.github.com/users/ezyang/events{/privacy}","received_events_url":"https://api.github.com/users/ezyang/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T21:05:38Z","updated_at":"2016-08-16T21:05:38Z","body":"OK, so the problem is related to OpenGL (and my test package) having no test suite sections. You can see this by configuring with `--enable-tests` on  `-v`:\r\n\r\n```\r\nezyang@sabre:~/Dev/cabal-tmp/cabal-install/tests/IntegrationTests/regression/t2755$ cabal configure --enable-tests  -v\r\n[snip]\r\nUsing internal setup method with build-type Simple and args:\r\n[\"configure\",\"--verbose=2\",\"--ghc\",\"--prefix=/home/ezyang/.cabal\",\"--user\",\"--ipid=test-t2755-0.1.0.0-BReSicMX0IP22iudDoBilg\",\"--dependency=base=base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d\",\"--disable-tests\",\"--exact-configuration\",\"--disable-benchmarks\"]\r\n```\r\n\r\nSay what?! The reason for this is `cabal-install` determines whether or not `--enable-tests` should be passed to `./Setup configure` is NOT, as you might imagine, what flags were passed, but rather, whether or not the solver decided to enable the stanza. So I guess, if there is no test suite in the package, the solver disables it. But then when we reconfigure for `cabal test` we check if `--enable-tests` was passed (it wasn't) and (uselessly) reconfigure if it wasn't.\r\n\r\nWorkaround: if you don't have tests, don't call `cabal test`.\r\n\r\nMaybe the `sdist` bug is different."}}
{"actor":{"display_login":"ezyang"}}