From 523f43c3c957e2b737e7e7ae1f0d64f398de08a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Sat, 11 Apr 2015 16:40:27 +0200 Subject: [PATCH] Fix some tests --- .travis.yml | 5 ++--- Language/Haskell/GhcMod/Logger.hs | 2 +- ghc-mod.cabal | 11 ++++++----- test/doctests.hs | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd3a6b1..1322045 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,10 @@ install: # - ( $CABAL122 && cabal install cabal-install --constraint "Cabal >= 1.22" && ghc-pkg unregister Cabal ) || true - echo $PATH - which cabal - - cabal install cabal-install --constraint "Cabal == $(cabal --version | grep 'Cabal library' | awk '{ print $3 }' | awk -vFS=. '{ print $1 "." $2 }' | tail -n1).*" # - cabal install Cabal --constraint "Cabal == $(cabal --version | grep 'Cabal library' | awk '{ print $3 }' | tail -n1)" - cabal install happy - happy --version - - cabal install -j --only-dependencies --enable-tests + - cabal install -j --only-dependencies --enable-tests --constraint "tagged < 0.8" script: - touch ChangeLog # Create ChangeLog if we're not on the release branch @@ -27,7 +26,7 @@ script: - if [ -n "$(ghc --version | awk '{ print $8 }' | sed -n '/^7.8/p')" ]; then export WERROR="--ghc-option=-Werror"; fi - cabal configure --enable-tests $WERROR - cabal build - - export ghc_mod_libexecdir=$PWD/dist/build/cabal-helper-wrapper + - export cabal_helper_libexecdir=$HOME/.cabal/bin - export ghc_mod_datadir=$PWD - cabal test diff --git a/Language/Haskell/GhcMod/Logger.hs b/Language/Haskell/GhcMod/Logger.hs index cba6858..8778d33 100644 --- a/Language/Haskell/GhcMod/Logger.hs +++ b/Language/Haskell/GhcMod/Logger.hs @@ -13,12 +13,12 @@ import Data.IORef (IORef, newIORef, readIORef, writeIORef, modifyIORef) import System.FilePath (normalise) import Text.PrettyPrint -import Bag (Bag, bagToList) import ErrUtils (ErrMsg, errMsgShortDoc, errMsgExtraInfo) import GHC (DynFlags, SrcSpan, Severity(SevError)) import HscTypes import Outputable import qualified GHC as G +import Bag import Language.Haskell.GhcMod.Convert import Language.Haskell.GhcMod.Doc (showPage) diff --git a/ghc-mod.cabal b/ghc-mod.cabal index 96cf525..9fc8b57 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -24,7 +24,7 @@ Description: For more information, please see its home page. Category: GHC, Development -Cabal-Version: >= 1.16 +Cabal-Version: >= 1.14 Build-Type: Custom Data-Files: elisp/Makefile elisp/*.el @@ -121,7 +121,7 @@ Library , bytestring , cereal >= 0.4 , containers - , cabal-helper >= 0.3 + , cabal-helper >= 0.3.1.0 , deepseq , directory , filepath @@ -146,9 +146,10 @@ Library , djinn-ghc >= 0.0.2.2 if impl(ghc < 7.8) Build-Depends: convertible - if impl(ghc <= 7.4.2) + if impl(ghc < 7.5) -- Only used to constrain random to a version that still works with GHC 7.4 - Build-Depends: random <= 1.0.1.1 + Build-Depends: random <= 1.0.1.1, + ghc-prim Executable ghc-mod Default-Language: Haskell2010 @@ -229,7 +230,7 @@ Test-Suite spec PathsAndFilesSpec HomeModuleGraphSpec - Build-Depends: hspec + Build-Depends: hspec >= 2.0.0 if impl(ghc == 7.4.*) Build-Depends: executable-path X-Build-Depends-Like: CLibName diff --git a/test/doctests.hs b/test/doctests.hs index a591638..08da97b 100644 --- a/test/doctests.hs +++ b/test/doctests.hs @@ -9,7 +9,7 @@ main = doctest , "-package", "transformers-" ++ VERSION_transformers , "-package", "mtl-" ++ VERSION_mtl , "-package", "directory-" ++ VERSION_directory - , "-XConstraintKinds", "-XFlexibleContexts", "-XScopedTypeVariables", "-XRecordWildCards", "-XNamedFieldPuns" + , "-XScopedTypeVariables", "-XRecordWildCards", "-XNamedFieldPuns", "-XConstraintKinds", "-XFlexibleContexts", "-XDataKinds", "-XKindSignatures" , "-idist/build/autogen/" , "-optP-include" , "-optPdist/build/autogen/cabal_macros.h"