From 0135f8c863c8244877a6b50a9b141c560da54a8e Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 3 Aug 2018 18:08:05 +0100 Subject: [PATCH] tools: make doctest: use default snapshot/ghc 8.4, mention mac workaround --- Makefile | 6 ++++-- hledger-lib/package.yaml | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 9f55cc494..3ff96efa3 100644 --- a/Makefile +++ b/Makefile @@ -653,9 +653,11 @@ pkgtest: $(call def-help,pkgtest, run the test suites in each package ) hunittest: $(call def-help,hunittest, run just the hunit tests in hledger-lib ) @($(STACKTEST) hledger-lib:test:hunittests && echo $@ PASSED) || (echo $@ FAILED; false) -# doctests don't run with ghc 8.4 on mac, see package.yaml +# doctest with ghc 8.4 on mac requires a workaround, see hledger-lib/package.yaml. +# Or, could run it with ghc 8.2: +# @($(STACKTEST) --stack-yaml stack-ghc8.2.yaml hledger-lib:test:doctests && echo $@ PASSED) || (echo $@ FAILED; false) doctest: $(call def-help,doctest, run just the doctest tests in hledger-lib ) - @($(STACKTEST) --stack-yaml stack-ghc8.2.yaml hledger-lib:test:doctests && echo $@ PASSED) || (echo $@ FAILED; false) + @($(STACKTEST) hledger-lib:test:doctests && echo $@ PASSED) || (echo $@ FAILED; false) easytest: $(call def-help,easytest, run just the easytest tests in hledger-lib ) @($(STACKTEST) hledger-lib:test:easytests && echo $@ PASSED) || (echo $@ FAILED; false) diff --git a/hledger-lib/package.yaml b/hledger-lib/package.yaml index f8fd62c27..4e521fe41 100644 --- a/hledger-lib/package.yaml +++ b/hledger-lib/package.yaml @@ -154,14 +154,14 @@ tests: main: doctests.hs source-dirs: tests dependencies: - - doctest >=0.8 - Glob >=0.7 - # doctest with ghc 8.4 on mac requires a workaround, but we'll leave it enabled + - doctest >=0.8 + # 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} + # See https://github.com/sol/doctest/issues/199, # https://ghc.haskell.org/trac/ghc/ticket/15105#comment:10 - # https://github.com/sol/doctest/issues/199 - # when: - # - condition: impl(ghc >= 8.4) && os(darwin) - # buildable: false hunittests: main: hunittests.hs