Skip to content

Scan pgtypes for @ingroup and skip preprocessor lines in the fndef#63

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/doxygroup-scan-pgtypes
Jul 16, 2026
Merged

Scan pgtypes for @ingroup and skip preprocessor lines in the fndef#63
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/doxygroup-scan-pgtypes

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

What

Teaches the @ingroup pass to see the vendored base-type sources and to cope with the way those sources lay out a function under its doxygen block.

Why

The base-type functions the MEOS umbrella headers export — text_out, date_in, timestamp_cmp_internal, and the rest — live in the vendored pgtypes/ tree at the repo root, not under meos/src, and they already carry @ingroup meos_base_* there. doxygroup.py only globs meos/src/**/*.c, so those groups never reach the catalog and the base surface looks group-less. This is the signal a binding needs to place the base functions in the reference-manual structure and to derive their public/internal status from the tag.

Changes

  • _name_to_group accepts several source roots; run.py passes both meos/src and pgtypes/.
  • _FNDEF skips any run of blank / preprocessor / comment lines between the doxygen close and the return-type line, and tolerates carriage returns. A base source separates the doxygen block from the function by a #if MEOS guard, a multi-line comment, and blank lines — cstring_to_text shows all three together — and some sources use CRLF endings; the old one-optional-line pattern mis-binds those.

Equivalence

The meos/src group map stays byte-identical: the same assignments across 3419 groups (a diff of the produced name->group map shows no change). The pgtypes scan adds the base groups on top (meos_base_*, meos_json_base_*).

Tests

New tests/test_doxygroup.py covers the plain case, the #if MEOS-guarded twin with a multi-line comment, a blank line before the return type, CRLF sources, the multi-root scan, and a missing root. The pre-existing test_struct_layout / test_object_model failures are unrelated: they read FFI struct offsets from a catalog the provision-meos action builds, and this change only writes the group field, which those tests never read.

The exported base-type functions (text_out, date_in, timestamp_cmp_internal,
…) live in the vendored pgtypes/ tree at the repo root, not under meos/src,
and carry @InGroup meos_base_* there. Scan pgtypes/ alongside meos/src so the
catalog picks up the base surface too: _name_to_group now accepts several
source roots and run.py passes both.

Make _FNDEF robust to the layouts those base sources use. A doxygen block and
the function it labels can be separated by a #if MEOS guard, a multi-line
comment, and blank lines (cstring_to_text is all three), and some sources ship
CRLF. The fndef scanner now skips any run of blank / preprocessor / comment
lines before the return-type line, and tolerates carriage returns. The meos/src
group map is unchanged (verified: identical assignments across 3419 groups).
@estebanzimanyi
estebanzimanyi merged commit acb8d21 into MobilityDB:master Jul 16, 2026
2 checks passed
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