Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build static executable for linux aarch64 (w/ TH) #4193

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

Open
wolfgangwalther wants to merge 6 commits into PostgREST:main
base: main
Choose a base branch
Loading
from wolfgangwalther:ghc-9-6

Conversation

Copy link
Member

@wolfgangwalther wolfgangwalther commented Jul 11, 2025

Compared to #3866, this also enables building the static executable for Linux aarch64, but keeping Template Haskell around. This is based on upstream work to make Template Haskell work with GHC 9.6+ in Nixpkgs. It's currently based off my personal branch, which is subject to change and disappear eventually. Thus, this is not ready to merge, yet. But it works.

Also, the release process around the docker image still needs to be tested.

Note: This does not mean we can suddenly start using Template Haskell everywhere again. The main problem of Template Haskell is still there: We can't cross-compile it. And we'll still want to cross-compile static executables to FreeBSD, eventually. And maybe even Windows. So the long-term goal should still be to get rid of Template Haskell.

Also, we can only do this update here, because we pin hsie to use GHC 9.4 in the second commit. We will fall over this eventually, when GHC 9.4 is not supported in Nixpkgs anymore - or when we start using syntax that is GHC 9.6+ only at some point. hsie is tightly coupled to internal GHC APIs to do its thing, so non-trivial to update. @taimoorzaeem maybe you can look into that? Since we can separate the pin for hsie easily, it might make sense - depending on the required changes - to just jump to e.g. GHC 9.12 immediately and don't even work with the intermediate versions. Or, if it's easier do it one version at a time - whatever works best, I guess.

steve-chavez and laurenceisla reacted with thumbs up emoji steve-chavez and laurenceisla reacted with eyes emoji
Copy link
Collaborator

[...] we start using syntax that is GHC 9.6+ only at some point. hsie is tightly coupled to internal GHC APIs to do its thing, so non-trivial to update. @taimoorzaeem maybe you can look into that?

Sure, I can look into that. I'll put this in my backlog. Is nixpkgs dropping support for GHC 9.4 anytime soon?

steve-chavez reacted with rocket emoji

Copy link
Member Author

Sure, I can look into that. I'll put this in my backlog. Is nixpkgs dropping support for GHC 9.4 anytime soon?

I don't think so, no. Pretty sure that this will not happen before November this year, but maybe even not well into next year. So a lot of time there :)

taimoorzaeem reacted with thumbs up emoji

This branch contains fixes to build TemplateHaskell with GHC 9.6+.
This needs more involved changes in the hsie source code, which can be
deferred to later.
Also makes the aarch64 variant of the docker image consist of a single
static executable, similar to the x86_64 variant.
We don't need an impure environment anymore, because we can't run the
test suite via stack anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@steve-chavez steve-chavez steve-chavez left review comments

@laurenceisla laurenceisla laurenceisla left review comments

+1 more reviewer

@taimoorzaeem taimoorzaeem taimoorzaeem left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /