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

Added support for doctest in cardano-ledger-api #3188

Merged

Conversation

koslambrou
Copy link
Collaborator

@koslambrou koslambrou commented Dec 3, 2022

  • Added a test-suite for running all doctests in Haddock comments

  • Fixed existing "doctest" in cardano-ledger-api's doc which wasn't conforming to the doctest syntax.

Linked to #3015, but this PR only enables doctests in cardano-ledger-api

@lehins
Copy link
Collaborator

lehins commented Dec 3, 2022

@koslambrou If you look at the #3015 ticket the goal is to setup doctest with doctest package, not cabal-doctest, which has been deprecated on hackage by the maintainer. Moreover cabal-doctest requires a custom setup, which is another thing we are trying to avoid

@koslambrou
Copy link
Collaborator Author

No problem, I'll close this PR.

@koslambrou koslambrou closed this Dec 4, 2022
@lehins lehins reopened this Dec 5, 2022
@lehins
Copy link
Collaborator

lehins commented Dec 5, 2022

I have tried the doctest package instead of cabal-doctest and it seems to be pretty broken for ghc-9

I think this approach is the next best option, at least until the time when the doctest gets fixed.

Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I am not fond of custom cabal setup that comes with cabal-doctest, but this is the best that we can do, as far as I am aware.

@koslambrou koslambrou force-pushed the cardano-ledger-api-doctests branch from 83d388b to c024b14 Compare December 5, 2022 14:16
@lehins lehins force-pushed the cardano-ledger-api-doctests branch from f8cd0a6 to bd36935 Compare December 6, 2022 09:09
* Added a test-suite for running all doctests in Haddock comments

* Fixed existing "doctest" in cardano-ledger-api's doc which wasn't
  conforming to the doctest syntax.
@lehins lehins force-pushed the cardano-ledger-api-doctests branch from bd36935 to 718ae62 Compare December 6, 2022 09:19
@aniketd aniketd merged commit 503104b into IntersectMBO:master Dec 6, 2022
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

Successfully merging this pull request may close these issues.

3 participants