Skip to content

Add a doctest-% pattern target#11799

Open
philderbeast wants to merge 2 commits intohaskell:masterfrom
cabalism:add/doctest-pattern-target
Open

Add a doctest-% pattern target#11799
philderbeast wants to merge 2 commits intohaskell:masterfrom
cabalism:add/doctest-pattern-target

Conversation

@philderbeast
Copy link
Copy Markdown
Collaborator

@philderbeast philderbeast commented May 7, 2026

Fixes #11798. Adds a make help item doctest-PACKAGENAME and targets for running doctests for a single package using a doctest-% pattern rule.

$ make help
...
doctest-PACKAGENAME            Run doctests for a single package (replace PACKAGENAME).
doctest-install                Install doctest tool needed for running doctests.
doctest                        Run doctests in all packages.
$ make doctest-PACKAGENAME
Please use one of the following targets:
doctest-Cabal
doctest-Cabal-described
doctest-Cabal-syntax
doctest-cabal-install
doctest-cabal-install-solver
doctest-cabal-testsuite

Note

There were doctests in cabal-testsuite. These weren't being run before and cannot be run with cd cabal-testsuite && cabal doctest so these use REPL_WITH_DOCTEST. I renamed DOCTEST to CABAL_DOCTEST.


  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@ulysses4ever
Copy link
Copy Markdown
Collaborator

thanks for the split but the PR title is still far from what is actually done because of how much is done. I think adding convenience targets and switching between cabal doctest and cabal repl should be different PRs. The latter is highly questionable for me while the former is a no brainer (well, if not for the metaprogramming).

@philderbeast philderbeast force-pushed the add/doctest-pattern-target branch from 684b2db to a34b26c Compare May 9, 2026 11:32
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.

Add doctest-% pattern target

2 participants