Skip to content

chore: run doctests in parallel#5094

Merged
wolfgangwalther merged 2 commits into
PostgREST:mainfrom
wolfgangwalther:doctest-parallel
Jul 14, 2026
Merged

chore: run doctests in parallel#5094
wolfgangwalther merged 2 commits into
PostgREST:mainfrom
wolfgangwalther:doctest-parallel

Conversation

@wolfgangwalther

Copy link
Copy Markdown
Member

Runs the doctests much faster, which is potentially useful in combination with postgrest-watch for local development.

This implies that doctests run on compiled code, not in a GHCi session, which has some implications:

  • Only exported functions can be tested.
  • Imports need to be made explicit in doctests themselves.

On the flipside, this would allow us to potentially include doctest results in code coverage, I believe.

This change is a requirement to vendor hasql, which otherwise breaks the existing doctests: hasql contains a .hsc file, which needs to be compiled - not interpreted - to make the tests work.

This essentially just tests upstream's show instance.
Comment thread src/PostgREST/ApiRequest/QueryParams.hs
Runs the doctests much faster, which is potentially useful in
combination with postgrest-watch for local development.

This implies that doctests run on compiled code, not in a GHCi session,
which has some implications:
- Only exported functions can be tested.
- Imports need to be made explicit in doctests themselves.

On the flipside, this would allow us to potentially include doctest
results in code coverage, I believe.

This change is a requirement to vendor hasql, which otherwise breaks the
existing doctests: hasql contains a .hsc file, which *needs* to be
compiled - not interpreted - to make the tests work.

@steve-chavez steve-chavez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

On the flipside, this would allow us to potentially include doctest results in code coverage, I believe.

Sounds great! 🚀

@wolfgangwalther wolfgangwalther merged commit 44e15e4 into PostgREST:main Jul 14, 2026
41 of 42 checks passed
@wolfgangwalther wolfgangwalther deleted the doctest-parallel branch July 14, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants