git.iko.soy/typeable/servant
on master help sign in
servant, servant-server: handle corner case in doctests

They seem to encounter multiple sandboxes sometimes, we now provide a more helpful error if that happens. Didn't look into why this happens.

commitec551777963e905f708cb581d0c8cf3fe8b7c6ff authorChristian Marie <christian@ponies.io> dateSat 16 May 2015, 11:14 (11 years ago) parent955261d
2 files changed+4
servant-server/test/Doctests.hs+2 servant/test/Doctests.hs+2
servant-server/test/Doctests.hs+2
@@ -27,3 +27,5 @@ getCabalMacrosFile = do
2727 return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
2828 [x] -> "dist" </> x </> rest
2929 [] -> "dist" </> rest
30+ xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
31+ ++ show xs ++ "\nTry cabal clean"
servant/test/Doctests.hs+2
@@ -25,3 +25,5 @@ getCabalMacrosFile = do
2525 return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
2626 [x] -> "dist" </> x </> rest
2727 [] -> "dist" </> rest
28+ xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
29+ ++ show xs ++ "\nTry cabal clean"