Skip to content

doctest-driver-gen fails in checks and tests #509

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

Closed
dhess opened this issue Mar 24, 2020 · 6 comments
Closed

doctest-driver-gen fails in checks and tests #509

dhess opened this issue Mar 24, 2020 · 6 comments

Comments

@dhess
Copy link
Contributor

dhess commented Mar 24, 2020

It appears that ghc can't find the doctest-driver-gen driver. Here's a repo that demonstrates the issue:

https://github.com/hackworthltd/haskell-hacknix/tree/doctest

nix-build default.nix -A hhp.check
...
Preprocessing library for hhp-1.0.0.0..
Building library for hhp-1.0.0.0..
Preprocessing test suite 'doctest' for hhp-1.0.0.0..
Building test suite 'doctest' for hhp-1.0.0.0..
building
[1 of 1] Compiling MyLib
Preprocessing test suite 'hlint' for hhp-1.0.0.0..
Building test suite 'hlint' for hhp-1.0.0.0..
ghc: could not execute: doctest-driver-gen
builder for '/nix/store/2wb7hyps5mmg0ks483xzi02nqk9larg7-hhp-1.0.0.0-test-doctest.drv' failed with exit code 1
cannot build derivation '/nix/store/1bgjla92hcj3md46wjkvf073dr5y4wjq-hhp-1.0.0.0-test-doctest-check.drv': 1 dependencies couldn't be built
error: build of '/nix/store/1bgjla92hcj3md46wjkvf073dr5y4wjq-hhp-1.0.0.0-test-doctest-check.drv', '/nix/store/4935cmsw6kxvi9nhkh8k4syhvi0cv2iq-hhp-1.0.0.0-test-hhp-test-check.drv', '/nix/store/b3wc4c179gd6h7izl2ri0l1f1z64dirq-hhp-1.0.0.0-test-hlint-check.drv' failed
@hamishmack
Copy link
Collaborator

Can you please try out #427 and let us know if it works for your case? You will need to add something like this this and you may need the nonReinstallablePkgs bit too.

@dhess
Copy link
Contributor Author

dhess commented Mar 26, 2020

Thanks for the suggestion. I'm afraid it made no difference in my case.

See https://github.com/hackworthltd/haskell-hacknix/compare/doctest...support-cabal-doctest for the changes I made for this test.

@cdepillabout
Copy link
Contributor

@dhess You'll need to actually use cabal-doctest to run the doctests.

@dhess
Copy link
Contributor Author

dhess commented Mar 26, 2020

Duh. Sorry, I completely missed that. I've never used it, so I'll need to find a bit of time to adapt the project.

@dhess
Copy link
Contributor Author

dhess commented Mar 26, 2020

I attempted to convert the project to use cabal-doctest but it's having a different issue, now. Rather than go through that here, since it's not relevant to doctest-driver-gen anymore, I'll post something at #427

@hamishmack
Copy link
Collaborator

I think cabal-doctest support works reasonably well now. See https://github.com/input-output-hk/haskell.nix/tree/master/test/cabal-doctests for an example. Please reopen if doctest-driver-gen support is still needed.

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