Commit abe3432f authored by Mikhail Glushenkov's avatar Mikhail Glushenkov

Build Cabal/cabal-install with '-Werror' on Travis.

Also fix some warnings to make it work.
parent 66555521
......@@ -27,14 +27,14 @@ script:
- mkdir -p ./dist/setup
- cp Setup.hs ./dist/setup/setup.hs
# Should be able to build setup without extra dependencies
- /opt/ghc/$GHCVER/bin/ghc --make -odir ./dist/setup -hidir ./dist/setup -i -i. ./dist/setup/setup.hs -o ./dist/setup/setup -threaded # the command cabal-install would use to build setup
- /opt/ghc/$GHCVER/bin/ghc --make -odir ./dist/setup -hidir ./dist/setup -i -i. ./dist/setup/setup.hs -o ./dist/setup/setup -Werror -threaded # the command cabal-install would use to build setup
# Need extra dependencies for test suite
- cabal install --only-dependencies --enable-tests
- sudo /opt/ghc/$GHCVER/bin/ghc-pkg recache
- /opt/ghc/$GHCVER/bin/ghc-pkg recache --user
- ./dist/setup/setup configure --user --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
- ./dist/setup/setup configure --user --enable-tests --enable-benchmarks --ghc-option=-Werror -v2 # -v2 provides useful information for debugging
- ./dist/setup/setup build # this builds all libraries and executables (including tests/benchmarks)
- ./dist/setup/setup haddock # see #2198
- ./dist/setup/setup test --show-details=streaming
......@@ -58,7 +58,7 @@ script:
- cabal sandbox init
- cabal sandbox add-source ../Cabal
- cabal install --dependencies-only --enable-tests
- cabal configure --enable-tests
- cabal configure --enable-tests --ghc-option=-Werror
- cabal build
- cabal test
- cabal check
......
......@@ -27,8 +27,8 @@ import Distribution.PackageDescription
Flag(..), PackageDescription(..),
GenericPackageDescription(..))
import Text.PrettyPrint
(hsep, comma, punctuate, parens, char, nest, empty,
isEmpty, ($$), (<+>), colon, (<>), text, vcat, ($+$), Doc, render)
(hsep, parens, char, nest, empty, isEmpty, ($$), (<+>),
colon, (<>), text, vcat, ($+$), Doc, render)
import Distribution.Simple.Utils (writeUTF8File)
import Distribution.ParseUtils (showFreeText, FieldDescr(..), indentWith, ppField, ppFields)
import Distribution.PackageDescription.Parse (pkgDescrFieldDescrs,binfoFieldDescrs,libFieldDescrs,
......
......@@ -885,6 +885,7 @@ getRPaths lbi clbi | supportRPaths hostOS = do
supportRPaths IRIX = False
supportRPaths HaLVM = False
supportRPaths IOS = False
supportRPaths Android = False
supportRPaths Ghcjs = False
supportRPaths (OtherOS _) = False
-- Do _not_ add a default case so that we get a warning here when a new OS
......
......@@ -76,7 +76,6 @@ import System.Directory ( doesFileExist )
import System.FilePath ( (</>), (<.>), takeExtension,
takeDirectory, replaceExtension,
splitExtension )
import Distribution.Compat.Exception (catchIO)
configure :: Verbosity -> Maybe FilePath -> Maybe FilePath
-> ProgramConfiguration
......
......@@ -557,6 +557,7 @@ platformDefines lbi =
IRIX -> ["irix"]
HaLVM -> []
IOS -> ["ios"]
Android -> ["android"]
Ghcjs -> ["ghcjs"]
OtherOS _ -> []
archStr = case hostArch of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment