Skip to content

chore: vendor hasql#5084

Open
wolfgangwalther wants to merge 1391 commits into
PostgREST:mainfrom
wolfgangwalther:vendor-hasql
Open

chore: vendor hasql#5084
wolfgangwalther wants to merge 1391 commits into
PostgREST:mainfrom
wolfgangwalther:vendor-hasql

Conversation

@wolfgangwalther

@wolfgangwalther wolfgangwalther commented Jul 8, 2026

Copy link
Copy Markdown
Member

Step 2 for #4823. This replaces the hasql-* dependencies (which includes hasql-notifications, but I don't know of a way not to fork that as well, since it depends on hasql itself) with a vendored copy keeping the original history.

We're only using the source code, so far, but not the original tests. That will be a next, separate step to merge these tests with ours and integrate them into the nix tooling etc.

Right now, it builds. Let's see what CI says - I assume it should also pass all our tests.

TODO:

  • Seems like I should use hasql-pool 1.3.0.3 instead of 1.3.0.4
  • Fix doctests properly

Depends on #5093 and #5094.

nikita-volkov and others added 30 commits April 25, 2024 10:00
As a workaround for Hackage including the dependencies of internal libs in the public list of package dependencies.
* clean-up-public-deps:
  Remove rerebase from the internal library deps
Report errors when LISTEN or UNLISTEN fail
Remove stack from repo since I am currently working only with cabal
This prepares the merge into the postgrest main repo. To avoid merge
conflicts and give a clear history wrt renames, all the files are moved
to a vendor/ subdirectory first, before they are moved to their final
location.
This prepares the merge into the postgrest main repo. To avoid merge
conflicts and give a clear history wrt renames, all the files are moved
to a vendor/ subdirectory first, before they are moved to their final
location.
This prepares the merge into the postgrest main repo. To avoid merge
conflicts and give a clear history wrt renames, all the files are moved
to a vendor/ subdirectory first, before they are moved to their final
location.
This prepares the merge into the postgrest main repo. To avoid merge
conflicts and give a clear history wrt renames, all the files are moved
to a vendor/ subdirectory first, before they are moved to their final
location.
@wolfgangwalther wolfgangwalther force-pushed the vendor-hasql branch 2 times, most recently from 3b09a5b to 04d651b Compare July 8, 2026 21:59
Comment thread postgrest.cabal
This prepares the merge into the postgrest main repo. To avoid merge
conflicts and give a clear history wrt renames, all the files are moved
to a vendor/ subdirectory first, before they are moved to their final
location.
@wolfgangwalther wolfgangwalther force-pushed the vendor-hasql branch 2 times, most recently from 6591271 to 299d40c Compare July 12, 2026 11:57
@wolfgangwalther wolfgangwalther marked this pull request as ready for review July 12, 2026 11:58
@wolfgangwalther

Copy link
Copy Markdown
Member Author

The commit check can't pass due to the big number of historic commits merged here. Everything else should pass by now.

I do wonder whether we should merge this - or wait a bit and cut a v16 release first. This certainly needs follow up (inclusion of tests, reduction of code, ...), so we might want to have a last release without vendoring first.

@steve-chavez

Copy link
Copy Markdown
Member

I do wonder whether we should merge this - or wait a bit and cut a v16 release first.

Agree, let's do it for v16.

@steve-chavez

Copy link
Copy Markdown
Member

This certainly needs follow up (inclusion of tests, reduction of code, ...), so we might want to have a last release without vendoring first.

After v16 maybe we could merge this into another branch and remove what we don't need before merging into main.

This removes everything from the vendored hasql packages, except their
license, source code, tests and .cabal file.

We also remove metadata which is not needed anymore from .cabal file,
but leave everything that needs to be ported to our own .cabal file
later in place.
It's all MIT, so it will be enough to keep the additional copyright
notices.
To run it, we need to remove the Arrows extension from postgrest.cabal.
It doesn't seem to be depended upon by the hasql code (but was still
introduced along with it), but breaks the style check. That's because
stylish-haskell applies all extensions found in the .cabal file for all
files, even when they are only part of *one* component. The Arrows
extension makes `proc` a reserved keyword, which is used in CallPlan.hs.
I did not fix all of these by hand, but used the `--refactor` flag on
hlint to do it for me. This is something that we might want to add in
the future by default.
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.