{"action":"created","issue":{"url":"https://api.github.com/repos/ndmitchell/ghc-make/issues/10","labels_url":"https://api.github.com/repos/ndmitchell/ghc-make/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/ndmitchell/ghc-make/issues/10/comments","events_url":"https://api.github.com/repos/ndmitchell/ghc-make/issues/10/events","html_url":"https://github.com/ndmitchell/ghc-make/issues/10","id":121660455,"number":10,"title":"Cabal instructions seems to be out of date","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-11T08:19:28Z","updated_at":"2015-12-11T09:26:44Z","closed_at":null,"body":"With GHC 7.10.2 and Cabal 1.23.0.0, I see the following:\r\n\r\nShake suggests that \"cabal build --with-ghc=ghc-make --ghc-options=-j4\". This does not seem to work, because Cabal now passes `-j1` by default at the beginning and this seems to confuse Shake. (Probably because the monoid on Maybe is left-biased.)\r\n\r\nWhat seems to 'work' is \"cabal build --with-ghc=ghc-make -j4\".\r\n\r\nHowever, this seems to run afoul another problem. When I run Shake on a very simple Cabal project with two files, A.hs and B.hs, where B imports A, Shake tries to run this command:\r\n\r\n```\r\nghc -odir. -hidir. -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-package-key pTjl42H8j5vVCw94RYCG1 -hide-all-packages -package-db dist/package.conf.inplace -package-id base-4.8.1.0-4f7206fd964c629946bb89db72c80011 -XHaskell2010 A B -idist/build -o dist/build/A.o -c A.hs\r\n```\r\nIn particular, Shake is blindly passing the list of modules that it was supposed to `--make` to ghc in one-shot mode (and it is consequently no surprise that this fails.) In fact, I'm kind of surprised this ever worked."},"comment":{"url":"https://api.github.com/repos/ndmitchell/ghc-make/issues/comments/163884771","html_url":"https://github.com/ndmitchell/ghc-make/issues/10#issuecomment-163884771","issue_url":"https://api.github.com/repos/ndmitchell/ghc-make/issues/10","id":163884771,"user":{"login":"ndmitchell","id":1651197,"avatar_url":"https://avatars.githubusercontent.com/u/1651197?v=3","gravatar_id":"","url":"https://api.github.com/users/ndmitchell","html_url":"https://github.com/ndmitchell","followers_url":"https://api.github.com/users/ndmitchell/followers","following_url":"https://api.github.com/users/ndmitchell/following{/other_user}","gists_url":"https://api.github.com/users/ndmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/ndmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndmitchell/subscriptions","organizations_url":"https://api.github.com/users/ndmitchell/orgs","repos_url":"https://api.github.com/users/ndmitchell/repos","events_url":"https://api.github.com/users/ndmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/ndmitchell/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T09:26:44Z","updated_at":"2015-12-11T09:26:44Z","body":"Each version of Cabal and GHC change lots of very subtle things about the information they give out, and since I am using subtle clues to guess at the information that is available, it's no great shock it doesn't work. I notice you are building with dynamic, perhaps try avoiding that and it might work? I'll delve into the precise details later."}}