diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index 5a4c84f66..191785aa7 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -156,14 +156,19 @@ tests: source-dirs: test dependencies: - Glob >=0.7 - - doctest >=0.8 - # doctest >=0.16.0 needed to show verbose progress output - # doctest with ghc 8.4 on mac requires a workaround: - # ~$ locate HSinteger-gmp-1.0.2.0.o - # /Users/simon/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.2/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o - # ~$ mv /Users/simon/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.2/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o{,_DISABLE_GHC_ISSUE_15105} + # Use a doctest new enough to support --fast and --verbose. + - doctest >=0.16 + # Note: doctest with ghc 8.4+ on mac breaks, needs this workaround: + # ~$ locate HSinteger-gmp-1.0.2.0.o + # /Users/simon/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.2/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o + # ~$ mv /Users/simon/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.2/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o{,_DISABLE_GHC_ISSUE_15105} # See https://github.com/sol/doctest/issues/199, - # https://ghc.haskell.org/trac/ghc/ticket/15105#comment:10 + # https://ghc.haskell.org/trac/ghc/ticket/15105#comment:10 . + # Should probably disable it by default, but I think my testing convenience + # outweighs the small number of folks who'll hit this.. if I'm wrong let me know. + #when: + # - condition: os(darwin) && impl(ghc >= 8.4) + # buildable: false easytests: main: easytests.hs diff --git a/hledger-lib/test/doctests.hs b/hledger-lib/test/doctests.hs index 784a0b6c5..264b335c6 100644 --- a/hledger-lib/test/doctests.hs +++ b/hledger-lib/test/doctests.hs @@ -57,7 +57,7 @@ main = do ++ if fslen > 1 then " files, plus any files they import:" else " file, plus any files it imports:" when verbose $ putStrLn $ unwords fs - doctest $ - (if verbose then ("--verbose" :) else id) $ - (if slow then id else ("--fast" :)) $ + doctest $ + (if verbose then ("--verbose" :) else id) $ -- doctest >= 0.15.0 + (if slow then id else ("--fast" :)) $ -- doctest >= 0.11.4 fs diff --git a/stack-ghc7.10.yaml b/stack-ghc7.10.yaml index bcb4a4caa..ece30da8a 100644 --- a/stack-ghc7.10.yaml +++ b/stack-ghc7.10.yaml @@ -30,6 +30,7 @@ extra-deps: - criterion-1.4.1.0 - data-clist-0.1.2.1 - directory-1.2.7.0 +- doctest-0.16.0 - exceptions-0.10.0 - free-5.0.2 - generics-sop-0.3.2.0 diff --git a/stack-ghc8.0.yaml b/stack-ghc8.0.yaml index 6d7083a20..c57e1cc65 100644 --- a/stack-ghc8.0.yaml +++ b/stack-ghc8.0.yaml @@ -21,6 +21,7 @@ extra-deps: - base-compat-batteries-0.10.1 - bifunctors-5.5.2 - criterion-1.4.1.0 +- doctest-0.16.0 - generics-sop-0.3.2.0 - hashable-1.2.7.0 - http-media-0.7.1.2 diff --git a/stack-ghc8.2.yaml b/stack-ghc8.2.yaml index c82eeafe8..815605316 100644 --- a/stack-ghc8.2.yaml +++ b/stack-ghc8.2.yaml @@ -16,6 +16,7 @@ extra-deps: - base-compat-0.10.1 - base-compat-batteries-0.10.1 - criterion-1.4.1.0 +- doctest-0.16.0 - swagger2-2.2.2 # avoid no hashable instance for AccountName from doctests - hashtables-1.2.3.1