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

doctest failed to run #12

Open
felixonmars opened this Issue Nov 29, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@felixonmars

felixonmars commented Nov 29, 2017

The other two tests pass normally. Not sure what causes this :(

Running 3 test suites...
Test suite test-doctest: RUNNING...

src/Data/Ini/Config.hs:97:1: error:
    Could not find module ‘Data.Ini.Config.Raw’
    Use -v to see a list of the files searched for.
   |
97 | import           Data.Ini.Config.Raw
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Test suite test-doctest: FAIL
@aisamanra

This comment has been minimized.

Show comment
Hide comment
@aisamanra

aisamanra Dec 9, 2017

Owner

Can you let me know what version you're testing against an what version of GHC you have?

I will say that running the Doctest tests has been incredibly finicky in the past, and I'm considering disabling them by default and having them be opt-in. They're very useful, but I've found it's easy to have accidental, incidental parts of a development configuration make them just plain not work, and it's possible you've come across one of those unfortunate situations.

Owner

aisamanra commented Dec 9, 2017

Can you let me know what version you're testing against an what version of GHC you have?

I will say that running the Doctest tests has been incredibly finicky in the past, and I'm considering disabling them by default and having them be opt-in. They're very useful, but I've found it's easy to have accidental, incidental parts of a development configuration make them just plain not work, and it's possible you've come across one of those unfortunate situations.

@felixonmars

This comment has been minimized.

Show comment
Hide comment
@felixonmars

felixonmars Dec 9, 2017

I am testing config-ini 0.2.1.1 with GHC 8.2.2.

felixonmars commented Dec 9, 2017

I am testing config-ini 0.2.1.1 with GHC 8.2.2.

@peti

This comment has been minimized.

Show comment
Hide comment
@peti

peti Dec 19, 2017

We have the exact same problem in NixOS.

peti commented Dec 19, 2017

We have the exact same problem in NixOS.

@sboosali

This comment has been minimized.

Show comment
Hide comment
@sboosali

sboosali Dec 20, 2017

you might need to add the imported modules to your doctest call (in like a topological sort order), even if they don't have any tests themselves. that might slow things down a little, doctest has been capricious for me too. @ @

sboosali commented Dec 20, 2017

you might need to add the imported modules to your doctest call (in like a topological sort order), even if they don't have any tests themselves. that might slow things down a little, doctest has been capricious for me too. @ @

@peti

This comment has been minimized.

Show comment
Hide comment
@sboosali

This comment has been minimized.

Show comment
Hide comment
@sboosali

sboosali Dec 20, 2017

nvm, looking at the documentation, including the source directory should work

doctest ["-isrc", ..]

but I don't know if it's recursive.

https://hackage.haskell.org/package/doctest-0.13.0/docs/Test-DocTest.html

sboosali commented Dec 20, 2017

nvm, looking at the documentation, including the source directory should work

doctest ["-isrc", ..]

but I don't know if it's recursive.

https://hackage.haskell.org/package/doctest-0.13.0/docs/Test-DocTest.html

@aisamanra

This comment has been minimized.

Show comment
Hide comment
@aisamanra

aisamanra Jan 11, 2018

Owner

Sorry about the silence on this issue; I got sidetracked. I'm going to look more deeply into this in the next few days, but for the newest version (0.2.2.0), I've also added a flag for --enable-doctests which is disabled by default. I still want them [i.e. all the doctests] to be included in the standard test suite, but I don't want the from-scratch cabal test operation to produce errors that aren't actually test failures from the library, so until I've figured out how to get the doctests to run consistently, I'll include them as an opt-in extra test.

Owner

aisamanra commented Jan 11, 2018

Sorry about the silence on this issue; I got sidetracked. I'm going to look more deeply into this in the next few days, but for the newest version (0.2.2.0), I've also added a flag for --enable-doctests which is disabled by default. I still want them [i.e. all the doctests] to be included in the standard test suite, but I don't want the from-scratch cabal test operation to produce errors that aren't actually test failures from the library, so until I've figured out how to get the doctests to run consistently, I'll include them as an opt-in extra test.

@kquick kquick referenced this issue Sep 11, 2018

Open

Fix doc tests #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment