Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctests assume cabal-install #196

Closed
mboes opened this issue Jun 5, 2016 · 7 comments
Closed

Doctests assume cabal-install #196

mboes opened this issue Jun 5, 2016 · 7 comments
Labels

Comments

@mboes
Copy link
Contributor

mboes commented Jun 5, 2016

The doctests test suite fails when using Stack:

$ stack test
[...]
Test suite failure for package network-2.6.2.2
    doctest:  exited with: ExitFailure 1
Logs printed to console

This is because doctests.hs hardcodes a bunch of paths that are private to Cabal and private to where cabal-install decides to put the builddir etc.

We need a more generic way of running doctests so as to support running all test suites on all build tools users/developers commonly use.

@hvr
Copy link
Member

hvr commented Jun 5, 2016

fwiw, this also affects cabal new-build

$ dist-newstyle/build/network-2.6.2.2/build/doctest/doctest
doctest: doctest: can't find a package database at dist/package.conf.inplace

@eborden eborden added the tooling label Jun 5, 2016
@eborden
Copy link
Collaborator

eborden commented Jun 5, 2016

Yes, the new travis.yml is showing this: https://travis-ci.org/haskell/network/jobs/135456991

@hvr
Copy link
Member

hvr commented Jun 5, 2016

I've seen doctest-related issues to appear in a few places already with new-build.

@eborden
Copy link
Collaborator

eborden commented Jun 5, 2016

Hmm, digging around a bit. This might just require a doctest upgrade for auto discovery. Will dig further, but Warp's doctest usage is quite simple:
yesodweb/wai@52f892c

@eborden
Copy link
Collaborator

eborden commented Jun 5, 2016

Hmm, actually we are using the same version. @kazu-yamamoto do you have any specifics on the current doc test setup?

@hvr
Copy link
Member

hvr commented Jun 5, 2016

the problem for new-build is that doctest simply doesn't know about new-build's different package-db layout. See https://github.com/sol/doctest/blob/master/src/PackageDBs.hs

@kazu-yamamoto
Copy link
Collaborator

I close this in favor of #268.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants