Skip to content

[arrow-adbc] Fix the postgresql feature with fmt 12 - #54910

Open
Denis Rouzaud (3nids) wants to merge 2 commits into
microsoft:masterfrom
3nids:arrow-adbc-fmt
Open

Denis Rouzaud (3nids) wants to merge 2 commits into
microsoft:masterfrom
3nids:arrow-adbc-fmt

Conversation

@3nids

Copy link
Copy Markdown
Contributor

With the current fmt port (12.2.0), arrow-adbc[postgresql] doesn't compile:

c/driver/postgresql/error.h:76:25: error: no member named 'vformat' in namespace 'fmt'

In fmt 12, fmt/core.h only includes fmt/base.h (it includes format.h only with FMT_DEPRECATED_HEAVY_CORE), and fmt::vformat is declared in fmt/format.h. This backports the two #include <fmt/format.h> lines from apache/arrow-adbc@d629515 (apache/arrow-adbc#4626). The rest of that commit updates the vendored fmt, which the port deletes. The fix is in ADBC 25 but not in 24 (#53853).

postgresql is not a default feature, so the fmt 12.2.0 update (#52423) didn't build it.

Tested on arm64 macOS 26.6 (Apple clang 21):

  • arrow-adbc[core,postgresql,sqlite]:arm64-osx in a fresh install root: builds with this change.
  • arrow-adbc[core,postgresql,sqlite] for a release-only arm64-osx-dynamic overlay triplet: fails with the error above without this change and builds with it.
  • The same features for a release-only x64-osx-dynamic overlay triplet, cross-built on the arm64 host: builds, and the open-vcpkg/python-registry py-adbc-postgresql and py-adbc-sqlite ports build on top of it. An ADBC SQLite query runs from Python.

Not tested: Linux, Windows.

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version, or no changes were necessary.
  • Any fixed CI baseline and CI feature baseline entries are removed from that file, or no entries needed to be changed.
  • All patch files in the port are applied and succeed.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Exactly one version is added in each modified versions file.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 05:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the fmt 12 compatibility backport, although no builds were run.

No open issues 🎉

What changed in this PR

Backports the upstream fmt header fix to restore arrow-adbc[postgresql] compatibility with fmt 12, without updating the packaged ADBC version.

Changes:

  • Adds explicit <fmt/format.h> includes in the framework and PostgreSQL driver headers.
  • Applies the patch during source preparation.
  • Increments ADBC 23’s port revision to 1 and updates the version registry.

Review was limited to the supplied changes; no builds were run.

File Description
versions/​baseline.json Selects ADBC 23 port revision 1.
versions/​a-/​arrow-adbc.json Registers the patched port revision.
ports/​arrow-adbc/​vcpkg.json Bumps the port revision to 1.
ports/​arrow-adbc/​portfile.cmake Applies the upstream-derived compatibility patch.
ports/​arrow-adbc/​fmt-format.patch Adds the fmt headers needed for fmt::vformat.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

2 participants