Skip to content

Parse the MEOS headers with NDEBUG defined#67

Closed
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/catalog-ndebug-parse
Closed

Parse the MEOS headers with NDEBUG defined#67
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/catalog-ndebug-parse

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Defines NDEBUG for the libclang parse, so the catalog describes the library that bindings link against.

Eight catalog predicates — meos_basetype, alphanum_basetype, alphanum_temptype, set_basetype, talphanum_type, temporal_basetype, temptype_subtype, temptype_subtype_all — exist only in a debug build. Their declarations in meos/include/temporal/meos_catalog.h and their definitions in meos_catalog.c both sit behind #ifndef NDEBUG, and meos_catalog.c notes they are used only in the asserts. The released libmeos is a Release build and exports none of them, yet the catalog lists all eight and bindings project them into their FFI surface, where an unresolved symbol surfaces only at call time. JMEOS declares all eight.

Against MobilityDB e6d3cb410, with the catalog derived from a -DMEOS=ON -DALL=ON install, the function count is 4250 -> 4242 and those eight predicates are the whole difference. timestamptz_in, add_date_int, mul_tint_int, temporal_tsequence, temporal_as_tinstant and tnumber_avg_value remain present.

The catalog described eight assert-only catalog predicates (meos_basetype,
alphanum_basetype, alphanum_temptype, set_basetype, talphanum_type,
temporal_basetype, temptype_subtype, temptype_subtype_all) that no released
libmeos exports: their declarations and definitions both sit behind
"#ifndef NDEBUG", and the shipped library is a Release build. Bindings projected
them into their FFI surface, where a call fails only at run time with an
unresolved symbol.

Define NDEBUG for the parse so the catalog describes the library bindings link
against. Function count 4250 -> 4242 against MobilityDB e6d3cb410, the eight
predicates being the whole difference.
@estebanzimanyi

Copy link
Copy Markdown
Member Author

The catalog is faithful here, and MEOS is the side that carries the defect.

These eight are the only eight of sixty-one type predicates in meos_catalog.h behind #ifndef NDEBUG. Their immediate siblings — tnumber_basetype, geo_basetype, span_basetype, spatial_basetype, pointcloud_basetype, timespan_basetype, talpha_type, temporal_type — are unconditional, so which type introspection a caller gets depends on which member of one family it asks for.

Bindings already project and call them: GoMEOS emits C.meos_basetype(...) and C.temptype_subtype(...), PyMEOS-CFFI emits _lib.meos_basetype(...), and MobilityDuck and MobilitySpark carry them in their vendored catalogs. A catalog filter withdraws introspection those bindings expose.

Debug-only also keeps them out of every Release build, which is the gap the alphanum_temptype parse error passed through into a published pin.

A MobilityDB change exports the eight; a Release build then carries all eight and the catalog needs no filter.

@estebanzimanyi

Copy link
Copy Markdown
Member Author

Closing in favour of exporting the eight predicates from MEOS, so the catalog stays an unfiltered description of the library.

@estebanzimanyi
estebanzimanyi deleted the fix/catalog-ndebug-parse branch July 22, 2026 14:33
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