on master help sign in
Merge pull request #1554 from ysangkok/repl-doctest
de923fcGaël Deest
.github/workflows/master.yml+12−22
@@ -47,10 +47,7 @@ jobs:
47
47
48 - name: Configure
48 - name: Configure
49 run: |
49 run: |
50− # Using separate store-dir because default one already has 'ghc-paths' package installed
51− # with hardcoded path to ghcup's GHC path (which it was built with). This leads to failure in
52− # doctest, as it tries to invoke that GHC, and it doesn't exist here.
53− cabal --store-dir /tmp/cabal-store install --ignore-project -j2 doctest --constraint='doctest ^>=0.18'
50+ cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.20'
54
51
55 - name: Build
52 - name: Build
56 run: |
53 run: |
@@ -68,24 +65,17 @@ jobs:
68 # Necessary for doctest to be found in $PATH
65 # Necessary for doctest to be found in $PATH
69 export PATH="$HOME/.cabal/bin:$PATH"
66 export PATH="$HOME/.cabal/bin:$PATH"
70
67
71− # Filter out base-compat-batteries from .ghc.environment.*, as its modules
68+ DOCTEST="cabal repl --with-ghc=doctest --ghc-options=-w"
72− # conflict with those of base-compat.
73− #
74− # FIXME: This is an ugly hack. Ultimately, we'll want to use cabal-doctest
75− # (or cabal v2-doctest, if it ever lands) to provide a clean GHC environment.
76− # This might allow running doctests in GHCJS build as well.
77− perl -i -e 'while (<ARGV>) { print unless /package-id\s+(base-compat-batteries)-\d+(\.\d+)*/; }' .ghc.environment.*
78−
79− (cd servant && doctest src)
69+ (cd servant && eval $DOCTEST)
80− (cd servant-client && doctest src)
70+ (cd servant-client && eval $DOCTEST)
81− (cd servant-client-core && doctest src)
71+ (cd servant-client-core && eval $DOCTEST)
82− (cd servant-http-streams && doctest src)
72+ (cd servant-http-streams && eval $DOCTEST)
83− (cd servant-docs && doctest src)
73+ (cd servant-docs && eval $DOCTEST)
84− (cd servant-foreign && doctest src)
74+ (cd servant-foreign && eval $DOCTEST)
85− (cd servant-server && doctest src)
75+ (cd servant-server && eval $DOCTEST)
86− (cd servant-machines && doctest src)
76+ (cd servant-machines && eval $DOCTEST)
87− (cd servant-conduit && doctest src)
77+ (cd servant-conduit && eval $DOCTEST)
88− (cd servant-pipes && doctest src)
78+ (cd servant-pipes && eval $DOCTEST)
89
79
90 stack:
80 stack:
91 name: stack / ghc ${{ matrix.ghc }}
81 name: stack / ghc ${{ matrix.ghc }}
cabal.project−3
@@ -52,9 +52,6 @@ tests: True
52optimization: False
52optimization: False
53-- reorder-goals: True
53-- reorder-goals: True
54
54
55−-- needed for doctests
56−write-ghc-environment-files: always
57−
58-- https://github.com/chordify/haskell-servant-pagination/pull/12
55-- https://github.com/chordify/haskell-servant-pagination/pull/12
59allow-newer: servant-pagination-2.2.2:servant
56allow-newer: servant-pagination-2.2.2:servant
60allow-newer: servant-pagination-2.2.2:servant-server
57allow-newer: servant-pagination-2.2.2:servant-server
servant-client/src/Servant/Client/Internal/HttpClient.hs+1−1
@@ -246,7 +246,7 @@ defaultMakeClientRequest burl r = Client.defaultRequest
246 where
246 where
247 -- Content-Type and Accept are specified by requestBody and requestAccept
247 -- Content-Type and Accept are specified by requestBody and requestAccept
248 headers = filter (\(h, _) -> h /= "Accept" && h /= "Content-Type") $
248 headers = filter (\(h, _) -> h /= "Accept" && h /= "Content-Type") $
249− toList $requestHeaders r
249+ toList $ requestHeaders r
250
250
251 acceptHdr
251 acceptHdr
252 | null hs = Nothing
252 | null hs = Nothing
servant-swagger/servant-swagger.cabal+1−1
@@ -92,7 +92,7 @@ test-suite doctests
92 build-depends:
92 build-depends:
93 base,
93 base,
94 directory >= 1.0,
94 directory >= 1.0,
95− doctest >= 0.17 && <0.19,
95+ doctest >= 0.17 && <0.21,
96 servant,
96 servant,
97 QuickCheck,
97 QuickCheck,
98 filepath
98 filepath