From ec551777963e905f708cb581d0c8cf3fe8b7c6ff Mon Sep 17 00:00:00 2001 From: Christian Marie Date: Sat, 16 May 2015 11:14:24 +1000 Subject: [PATCH] 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. --- servant-server/test/Doctests.hs | 2 ++ servant/test/Doctests.hs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/servant-server/test/Doctests.hs b/servant-server/test/Doctests.hs index 5bf9c91f..71d1d2c2 100644 --- a/servant-server/test/Doctests.hs +++ b/servant-server/test/Doctests.hs @@ -27,3 +27,5 @@ getCabalMacrosFile = do return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of [x] -> "dist" x rest [] -> "dist" rest + xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n" + ++ show xs ++ "\nTry cabal clean" diff --git a/servant/test/Doctests.hs b/servant/test/Doctests.hs index 63d842f0..eb3f688c 100644 --- a/servant/test/Doctests.hs +++ b/servant/test/Doctests.hs @@ -25,3 +25,5 @@ getCabalMacrosFile = do return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of [x] -> "dist" x rest [] -> "dist" rest + xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n" + ++ show xs ++ "\nTry cabal clean"