hackage-server
hackage-server copied to clipboard
Tests for `doctest` fail
https://hackage.haskell.org/package/doctest-0.20.0/reports/
Don't see a build log for the actual test failure, nor do I know how exactly hackage tries to run the tests. What I assume could be the issue is this: doctest's test suite needs to be run with cabal exec, specifically, this is how I run the tests:
cabal configure --enable-tests && cabal build && cabal exec -- cabal test --test-show-details=direct
Can this please be fixed? Alternatively, if this can not be fixed in a timely manner, can I please get rid of the -badge?
@sol, the relevant call to cabal is likely here: https://github.com/haskell/hackage-server/blob/507e8e557e78d0ff33811f5148ab3254c2390d80/exes/BuildClient.hs#L643
Unfortunately, no test log is made available. This would definitively be an improvement.
Would prefixing cabal test with cabal exec work for all packages?
cf https://github.com/haskell/hackage-server/issues/981 and https://github.com/haskell/hackage-server/issues/961
I don't think we want to support running tests in any other way than standard v2-test. But we should allow test opt-out and also definitely have ux to display test results.
@sol: An unexpected way to prevent tests being run on Hackage is to upload the documentation yourself (see #1037). I use this script
cabal haddock --haddock-for-hackage | tail -1 | xargs cabal upload -d "$@"
where $@ usually either contains --publish or not.
@gbaz I understand not wanting to support anything other than v2-test. What about explicitly setting GHC_ENVIRONMENT and/or GHC_PACKAGE_PATH when Hackage runs tests? It seems like this will never be added to plain v2-test (https://github.com/haskell/cabal/issues/7890#issuecomment-1003719028), but it seems like a lot of the desire for cabal exec -- cabal v2-test would be satisfied if these env vars were specifically set