From dd864db3b9409ac2b38a19574a6a8d25dd9edbaf Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Sun, 30 Oct 2011 14:49:35 +0100 Subject: [PATCH] Always pass -hide-all-packages to ghc. Makes error messages more obvious. --- GHC/ParMake/Engine.hs | 5 +++-- README | 2 ++ tests/Tests.hs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/GHC/ParMake/Engine.hs b/GHC/ParMake/Engine.hs index 3844cb9..be5dbbb 100644 --- a/GHC/ParMake/Engine.hs +++ b/GHC/ParMake/Engine.hs @@ -72,8 +72,9 @@ workerThread outHooks verbosity totNum ghcArgs wch cch runGHC :: [String] -> IO ExitCode runGHC args = - do debug outHooks verbosity $ show ("ghc":args) - runProcess outHooks Nothing "ghc" args + do let args' = "-hide-all-packages":args + debug outHooks verbosity $ show ("ghc":args') + runProcess outHooks Nothing "ghc" args' onSuccess :: ExitCode -> ControlMessage -> ControlMessage -> IO () onSuccess exitCode msgSucc msgFail = diff --git a/README b/README index 064116e..469025a 100644 --- a/README +++ b/README @@ -27,5 +27,7 @@ Known limitations: * Building libraries is not yet supported. * Build fails when -odir != -hidir. + * Unlike 'ghc --make', ghc-parmake can't figure out package dependencies automatically, + so you'll need to specify them by hand with the -package option. * -hisuf/-osuf are not supported (needed for building libs for profiling). * Tested only on Linux. diff --git a/tests/Tests.hs b/tests/Tests.hs index b9a36f0..8816fc4 100644 --- a/tests/Tests.hs +++ b/tests/Tests.hs @@ -108,7 +108,7 @@ mkTestCase dirName numJobs = curDir <- getCurrentDirectory createDirectory oDir exitCode <- getExitCode (curDir makeProgram) - [ "Main.hs", "-j", show numJobs + [ "Main.hs", "-package", "base", "-j", show numJobs , "-odir", oDirName, "-hidir", oDirName] testDir assertEqual "ghc-parmake invocation failed!" ExitSuccess exitCode removeDirectoryRecursive oDir