Skip to content

Take the headers of the flat layer from the catalog - #34

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:codegen/headers-from-catalog
Oct 27, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:codegen/headers-from-catalog

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

tools/codegen.py binds every non-vendored catalog function of a bound family whose header the libmeos prefix installs, one Go file per header, as JMEOS FunctionsGenerator binds every catalog function of an enabled family: the headers come from the catalog's file field, a family leaves with =OFF in the environment, and the installed headers are the names pkg-config gives for the meos prefix, read as PyMEOS-CFFI get_installed_headers reads them, names only. The preambles include those headers, meos.h first, and the generator holds no list of headers. Each run writes the Go file of each header its plan names and removes the others.

The flat layer binds meos_raster.h, meos_s2cell.h, meos_cellindex.h and the pg_*.h headers of the base types, so the object layer reaches 1524 methods and defers 67. The 227 internal functions of pgtypes.h and pgsql_compat.h, headers the prefix does not install, are named in the report and not bound. tools/refresh.conf gives the generator the prefix it builds, so a header installed under /usr/local decides nothing.

Measured over MobilityDB master a23e01a60b and MEOS-API master: 4612 wrappers, every header the generated files include present in the prefix; go build of functions and types, go test of the root examples with TZ=UTC as CI sets it, and the parity test pass.

tools/codegen.py binds every non-vendored catalog function of a bound family whose header the libmeos prefix installs, one Go file per header, as JMEOS FunctionsGenerator binds every catalog function of an enabled family: the headers come from the catalog's file field, a family leaves with <FAMILY>=OFF in the environment, and the installed headers are the names pkg-config gives for the meos prefix, read as PyMEOS-CFFI get_installed_headers reads them, names only. The preambles include those headers, meos.h first, and the generator holds no list of headers. Each run writes the Go file of each header its plan names and removes the others.

The flat layer binds meos_raster.h, meos_s2cell.h, meos_cellindex.h and the pg_*.h headers of the base types, so the object layer reaches 1524 methods and defers 67. The 227 internal functions of pgtypes.h and pgsql_compat.h, headers the prefix does not install, are named in the report and not bound. tools/refresh.conf gives the generator the prefix it builds, so a header installed under /usr/local decides nothing.

Measured over MobilityDB master a23e01a60b and MEOS-API master: 4612 wrappers, every header the generated files include present in the prefix; go build of functions and types, go test of the root examples with TZ=UTC as CI sets it, and the parity test pass.
@estebanzimanyi
estebanzimanyi merged commit 0083281 into MobilityDB:main Oct 27, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the codegen/headers-from-catalog branch October 27, 2026 22:59
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.

1 participant