diff --git a/.travis.yml b/.travis.yml index 24bd3241ff3..145212cb463 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,6 +63,9 @@ matrix: - env: GHCVER=8.0.2 SCRIPT=bootstrap sudo: required os: linux + - env: GHCVER=8.2.1 SCRIPT=script + os: linux + sudo: required # We axed GHC 7.6 and earlier because it's not worth the trouble to # make older GHC work with clang's cpp. See @@ -117,7 +120,7 @@ install: # build config format changed. script: - rm -rf dist-newstyle - - ./travis-${SCRIPT}.sh -j1 + - ./travis-${SCRIPT}.sh -j2 cache: directories: diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal index ef7924b3e38..013a8318935 100644 --- a/cabal-install/cabal-install.cabal +++ b/cabal-install/cabal-install.cabal @@ -365,6 +365,29 @@ executable cabal hs-source-dirs: tests other-modules: UnitTests + UnitTests.Distribution.Client.ArbitraryInstances + UnitTests.Distribution.Client.FileMonitor + UnitTests.Distribution.Client.GZipUtils + UnitTests.Distribution.Client.Glob + UnitTests.Distribution.Client.IndexUtils.Timestamp + UnitTests.Distribution.Client.InstallPlan + UnitTests.Distribution.Client.JobControl + UnitTests.Distribution.Client.ProjectConfig + UnitTests.Distribution.Client.Sandbox + UnitTests.Distribution.Client.Sandbox.Timestamp + UnitTests.Distribution.Client.Store + UnitTests.Distribution.Client.Tar + UnitTests.Distribution.Client.Targets + UnitTests.Distribution.Client.UserConfig + UnitTests.Distribution.Solver.Modular.DSL + UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils + UnitTests.Distribution.Solver.Modular.MemoryUsage + UnitTests.Distribution.Solver.Modular.PSQ + UnitTests.Distribution.Solver.Modular.QuickCheck + UnitTests.Distribution.Solver.Modular.RetryLog + UnitTests.Distribution.Solver.Modular.Solver + UnitTests.Distribution.Solver.Modular.WeightedPSQ + UnitTests.Options MemoryUsageTests SolverQuickCheck IntegrationTests2 @@ -404,26 +427,27 @@ Test-Suite unit-tests other-modules: Distribution.Client.Compat.FileLock UnitTests.Distribution.Client.ArbitraryInstances - UnitTests.Distribution.Client.Targets UnitTests.Distribution.Client.FileMonitor - UnitTests.Distribution.Client.Glob UnitTests.Distribution.Client.GZipUtils + UnitTests.Distribution.Client.Glob + UnitTests.Distribution.Client.IndexUtils.Timestamp + UnitTests.Distribution.Client.InstallPlan + UnitTests.Distribution.Client.JobControl + UnitTests.Distribution.Client.ProjectConfig UnitTests.Distribution.Client.Sandbox UnitTests.Distribution.Client.Sandbox.Timestamp UnitTests.Distribution.Client.Store UnitTests.Distribution.Client.Tar + UnitTests.Distribution.Client.Targets UnitTests.Distribution.Client.UserConfig - UnitTests.Distribution.Client.ProjectConfig - UnitTests.Distribution.Client.JobControl - UnitTests.Distribution.Client.IndexUtils.Timestamp - UnitTests.Distribution.Client.InstallPlan + UnitTests.Distribution.Solver.Modular.DSL + UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils UnitTests.Distribution.Solver.Modular.PSQ UnitTests.Distribution.Solver.Modular.RetryLog UnitTests.Distribution.Solver.Modular.Solver - UnitTests.Distribution.Solver.Modular.DSL - UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils UnitTests.Distribution.Solver.Modular.WeightedPSQ UnitTests.Options + build-depends: base, async, diff --git a/cabal-testsuite/PackageTests/Backpack/T4447/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/T4447/setup.cabal.out new file mode 100644 index 00000000000..6166a270945 --- /dev/null +++ b/cabal-testsuite/PackageTests/Backpack/T4447/setup.cabal.out @@ -0,0 +1,10 @@ +# Setup configure +Resolving dependencies... +Configuring T4447-1.0... +Error: + Cannot instantiate requirement 'A' brought into scope by build-depends: T4447:foo-indef + with locally defined module brought into scope by other-modules: A + as this would create a cyclic dependency, which GHC does not support. + Try moving this module to a separate library, e.g., + create a new stanza: library 'sublib'. + In the stanza executable foo-exe diff --git a/cabal-testsuite/PackageTests/CustomWithoutCabalDefaultMain/cabal.test.hs b/cabal-testsuite/PackageTests/CustomWithoutCabalDefaultMain/cabal.test.hs index b8cf28b547f..7a2d9cd9586 100644 --- a/cabal-testsuite/PackageTests/CustomWithoutCabalDefaultMain/cabal.test.hs +++ b/cabal-testsuite/PackageTests/CustomWithoutCabalDefaultMain/cabal.test.hs @@ -3,8 +3,11 @@ main = cabalTest $ do r <- fails $ cabal' "new-build" [] assertRegex "Should not have been able to import Cabal" "(Could not find module|Failed to load interface for).*Distribution\\.Simple" r + {- + -- TODO: With GHC 8.2, this no longer is displayed -- When using --with-ghc, this message is not necessarily output has_cabal <- hasCabalForGhc when has_cabal $ assertRegex "It is a member of the hidden package .*Cabal-" "It is a member of the hidden package" r + -} diff --git a/cabal-testsuite/PackageTests/NewBuild/T4450/cabal.out b/cabal-testsuite/PackageTests/NewBuild/T4450/cabal.out index b36e1053a3c..e69de29bb2d 100644 --- a/cabal-testsuite/PackageTests/NewBuild/T4450/cabal.out +++ b/cabal-testsuite/PackageTests/NewBuild/T4450/cabal.out @@ -1,11 +0,0 @@ -# cabal new-build -Resolving dependencies... -In order, the following will be built: - - T4450-1.0 (exe:foo) (first run) -# cabal new-build -In order, the following will be built: - - T4450-1.0 (lib:T4450) (additional components to build) - - dep-1.0 (lib) (first run) -Configuring library for dep-1.0.. -Preprocessing library for dep-1.0.. -Building library for dep-1.0.. diff --git a/cabal-testsuite/PackageTests/NewBuild/T4450/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/T4450/cabal.test.hs index 86269b34829..0f9944501a8 100644 --- a/cabal-testsuite/PackageTests/NewBuild/T4450/cabal.test.hs +++ b/cabal-testsuite/PackageTests/NewBuild/T4450/cabal.test.hs @@ -1,5 +1,7 @@ import Test.Cabal.Prelude main = cabalTest $ do skipUnless =<< hasNewBuildCompatBootCabal - cabal "new-build" ["foo"] - cabal "new-build" ["dep"] + -- Custom Setups inconsistently report output depending + -- on your boot GHC. + recordMode DoNotRecord $ cabal "new-build" ["foo"] + recordMode DoNotRecord $ cabal "new-build" ["dep"] diff --git a/cabal-testsuite/Test/Cabal/Server.hs b/cabal-testsuite/Test/Cabal/Server.hs index 2463aaa5a07..2958cbe51a3 100644 --- a/cabal-testsuite/Test/Cabal/Server.hs +++ b/cabal-testsuite/Test/Cabal/Server.hs @@ -255,7 +255,8 @@ initServer s0 = do pid <- withProcessHandle (serverProcessHandle s0) $ \ph -> case ph of OpenHandle x -> return (show x) - ClosedHandle _ -> return (serverProcessId s0) + -- TODO: handle OpenExtHandle? + _ -> return (serverProcessId s0) #endif let s = s0 { serverProcessId = pid } -- We will read/write a line at a time, including for diff --git a/cabal.project b/cabal.project index 1f610d2501c..907bfbbd993 100644 --- a/cabal.project +++ b/cabal.project @@ -7,8 +7,12 @@ constraints: unix >= 2.7.1.0, program-options -- So us hackers get all the assertion failures early: - -- NOTE: currently commented out, see https://github.com/haskell/cabal/issues/3911 + -- + -- NOTE: currently commented out, see + -- https://github.com/haskell/cabal/issues/3911 + -- -- ghc-options: -fno-ignore-asserts + -- -- as a workaround we specify it for each package individually: package Cabal ghc-options: -fno-ignore-asserts