Skip to content

Commit 57ee7d0

Browse files
Parse the H3 header on the catalog path as the build path does
The catalog path of the provision-meos action and the openapi-validate workflow install libh3-dev with the other headers libclang reads, so the H3 functions keep the typedef H3Index on their uint64_t parameters and results. The build path of the action installs libh3-dev already, so both paths derive the same catalog. Why. Without h3api.h libclang reads H3Index as uint64_t, and the catalog the action derives without build-libmeos drops the typedef from 72 H3 functions that the catalog it derives with build-libmeos states. A consumer that generates from one path and checks against the other reads a difference neither its code nor MobilityDB causes: MobilityDB/MobilityAPI-Python#19 is the case. Measured. On MobilityDB 92c29a5fae, a catalog-path derivation in an ubuntu-24.04 container with the action's packages differs from one with libh3-dev only by the typedef H3Index on the parameters and results of 72 functions, and with libh3-dev it projects to the same MobilityAPI-Python table byte for byte as a derivation on a machine carrying libh3-dev.
1 parent bf3b6cf commit 57ee7d0

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎.github/actions/provision-meos/action.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ runs:
6363
python-version: "3.11"
6464

6565
# libclang (Python wheel) needs the system C headers MEOS depends on so
66-
# types like size_t / json_object * / GSERIALIZED * resolve to their real
67-
# names instead of degrading to int / int *. Same install set as the
68-
# pytest / OpenAPI-validate regenerate paths so every path agrees.
66+
# types like size_t / json_object * / GSERIALIZED * / H3Index resolve to
67+
# their real names instead of degrading to int / int * / uint64_t. Same
68+
# install set as the OpenAPI-validate regenerate path, and the build path
69+
# below installs the same headers, so every path derives the same catalog.
6970
# Every path installs them, so their .deb files are kept as the build path keeps its
7071
# own (see "Key the provision caches"): a run that restores them installs without
7172
# downloading, and a stalled mirror costs it only the index update.
@@ -74,7 +75,7 @@ runs:
7475
shell: bash
7576
env:
7677
PACKAGES: >-
77-
clang libclang-dev libjson-c-dev libproj-dev
78+
clang libclang-dev libjson-c-dev libproj-dev libh3-dev
7879
run: |
7980
# The PostgreSQL server headers are those of the PostgreSQL the image ships.
8081
packages="$PACKAGES $(bash "$GITHUB_ACTION_PATH/server-dev-package.sh")"

‎.github/workflows/openapi-validate.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,18 @@ jobs:
3737
python-version: "3.11"
3838

3939
# libclang (Python wheel) needs the system C headers MEOS depends on
40-
# so types like `size_t`, `json_object *`, `GSERIALIZED *`, … resolve
41-
# to their real names instead of degrading to `int` / `int *`. Mirror
42-
# the same install set as MobilityAPI's vendor-drift workflow so the
43-
# two regenerate paths produce byte-identical catalogs.
40+
# so types like `size_t`, `json_object *`, `GSERIALIZED *`, `H3Index`,
41+
# … resolve to their real names instead of degrading to `int` /
42+
# `int *` / `uint64_t`. Mirror the install set of the provision-meos
43+
# action's catalog path so the two regenerate paths produce
44+
# byte-identical catalogs.
4445
- name: Install dev headers for libclang sysroot
4546
run: |
4647
bash .github/actions/provision-meos/pgdg-source.sh
4748
bash .github/actions/provision-meos/apt-get.sh update -qq
4849
bash .github/actions/provision-meos/apt-get.sh install -y --no-install-recommends \
4950
clang libclang-dev \
50-
libjson-c-dev libproj-dev \
51+
libjson-c-dev libproj-dev libh3-dev \
5152
"$(bash .github/actions/provision-meos/server-dev-package.sh)"
5253
5354
- name: Clone MobilityDB master (MEOS headers source)

0 commit comments

Comments
 (0)