Skip to content

Attribute multiply-declared public symbols to their umbrella header#52

Closed
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/catalog-attribute-public-umbrella-header
Closed

Attribute multiply-declared public symbols to their umbrella header#52
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/catalog-attribute-public-umbrella-header

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A MEOS public symbol may be declared both in its public umbrella meos_<family>.h header — the surface MobilityDB installs (meos/CMakeLists.txt) and a binding #includes — and in a family-internal implementation header. This is systemic: cbuffer, pose, rgeo and h3 all redeclare umbrella symbols in internal headers.

Deduplication keys on the header amalgamation order, so a symbol also present in an internal header is attributed to that internal header. 18 public symbols (15 declared in meos_h3.h, 3 in meos_internal_geo.h) land on an internal header rather than their umbrella, and a binding that keys on the installed public headers — as GoMEOS, MEOS.js and PyMEOS-CFFI do — drops them (e.g. all 10 h3index_* I/O and comparison functions).

This change deduplicates by preferring the declaration in a top-level meos*.h umbrella header over an internal one, independent of amalgamation order, so every umbrella-exposed function is attributed to the header it is published through.

Verified against MobilityDB master 2f23076851:

  • function count is unchanged (4545); only the file attribution of the 18 symbols changes,
  • umbrella-declared public symbols mis-attributed to a non-umbrella header drop from 18 to 0,
  • h3index_in is attributed to meos_h3.h,
  • the 3 meos_internal_geo.h symbols are classified internal (matching where they are declared).

A MEOS public symbol may be declared both in its public umbrella
meos_<family>.h header (the surface MobilityDB installs and a binding
includes) and in a family-internal implementation header; cbuffer, pose,
rgeo and h3 all do this. The parser deduplicated by keeping the first
declaration seen in the amalgamation, which follows header sort order, so
18 public symbols (15 in meos_h3.h, 3 in meos_internal_geo.h) were
attributed to an internal header instead of their umbrella. A binding that
keys on the installed public headers then silently dropped them.

Deduplicate by preferring the declaration in a top-level meos*.h umbrella
header over an internal one, independent of amalgamation order, so every
umbrella-exposed function is attributed to the header it is published
through. Function count is unchanged (4545); only the file attribution of
the 18 symbols is corrected.
@estebanzimanyi

Copy link
Copy Markdown
Member Author

Every binding consumes the catalog derived from the INSTALLED public headers via the provision-meos action: it builds and installs MobilityDB, then runs run.py against meos-headers/include, which holds only the public umbrella meos_<family>.h headers. There each public symbol is declared once, so the umbrella-preference dedup this PR adds never triggers and the catalog is byte-identical with or without it (verified: GoMEOS CI keeps all h3index_* functions, drift is only the new adjacent-span functions).

The 18-symbol mis-attribution this PR fixes occurs only when run.py runs against the source tree — which contains the internal subdir headers and which the pipeline never uses. Closing as unnecessary: the canonical installed-headers generation already attributes every public symbol to its umbrella.

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