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 need a long time to start #141

Closed
minad opened this issue Sep 26, 2016 · 3 comments
Closed

Doctests need a long time to start #141

minad opened this issue Sep 26, 2016 · 3 comments

Comments

@minad
Copy link

minad commented Sep 26, 2016

Hi,

it seems to me that much time of the doctests is needed for startup and library loading. Would it be possible to generate or cache doctest hs files e.g. in src/doctest which could then be compiled as usual by cabal/ghc? This way one could take advantage of the ghc dependency checking.

Maybe there is a better way?

Thx for the tool!

Daniel

@minad
Copy link
Author

minad commented Sep 26, 2016

Together with your hpack tool this could be very useful I guess since one would just have to specify the directory of the generated doctests for auto discovery. The main of the autogenerated tests could then regenerate or at least fail if the cached tests were outdated.

@sjakobi
Copy link

sjakobi commented Jan 16, 2017

I have profiled a doctest run that usually takes about 17s with stack test --profile :doctest. You can find the .prof file together with the code here.

@simonmichael
Copy link

Another data point: stack test hledger-lib:test:doctests takes about 40s to run 106 doctest examples on a 2013 macbook air. 15-20s before it shows the first tests being run.

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

No branches or pull requests

3 participants