Skip to content

Doctests assume cabal-install #196

Description

@mboes

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.

Activity

  1. hvr commented on Jun 5, 2016

    @hvr
    Member

    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
    
  2. eborden commented on Jun 5, 2016

    @eborden
    Collaborator

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

  3. hvr commented on Jun 5, 2016

    @hvr
    Member

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

  4. eborden commented on Jun 5, 2016

    @eborden
    Collaborator

    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

  5. eborden commented on Jun 5, 2016

    @eborden
    Collaborator

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

  6. hvr commented on Jun 5, 2016

    @hvr
    Member

    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

  7. kazu-yamamoto commented on Dec 15, 2017

    @kazu-yamamoto
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions