Skip to content

Improve Swift type extraction coverage - #613

Open
xbsjason wants to merge 1 commit into
DeusData:mainfrom
xbsjason:main
Open

Improve Swift type extraction coverage#613
xbsjason wants to merge 1 commit into
DeusData:mainfrom
xbsjason:main

Conversation

@xbsjason

@xbsjason xbsjason commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • Index Swift protocol function requirements as methods.
  • Capture Swift enum bodies as Enum nodes with the parent type name.
  • Add regression coverage for Swift protocol, struct, and enum extraction.

Related issue

Verification

  • PASS: Swift extraction block from the C test runner after rebase. Confirmed swift_protocol, swift_struct, swift_enum, and Swift call extraction all pass.

Caveat

  • make -f Makefile.cbm cbm currently fails on this machine in pre-existing production allocator code with unknown type name git_allocator when CBM_BIND_TS_ALLOCATOR=1.

@DeusData

Copy link
Copy Markdown
Owner

Huge thanks for opening this PR and for the work you put into it.

The maintainer shop is currently full, so this may sit for a bit before it gets a proper review. We will come back to this as soon as possible with real feedback; I wanted to make sure it did not sit unacknowledged in the meantime.

@DeusData DeusData added enhancement New feature or request parsing/quality Graph extraction bugs, false positives, missing edges language-request Request for new language support priority/backlog Valuable contribution, lower scheduling urgency; review when maintainer capacity opens. labels Jun 29, 2026
@DeusData

DeusData commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Thanks for improving Swift extraction coverage. Before review can continue, please add a DCO Signed-off-by trailer to the non-merge commit and link the language coverage issue if there is one.

Signed-off-by: xbsjason <xbsjason@gmail.com>
@xbsjason
xbsjason requested a review from DeusData as a code owner July 1, 2026 11:38
@DeusData DeusData added this to the 0.9.2-rc milestone Jul 8, 2026
@DeusData

Copy link
Copy Markdown
Owner

Thank you for the Swift extraction work, and apologies that this has been sitting.

The CI failure here is a small one and it is genuinely in your diff — clang-format violations on your own lines in internal/cbm/lang_specs.c, at lines 558 and 560. That is all that is red; nothing else about the change is failing.

One thing that will save you a frustrating round trip: our CI lint uses the Homebrew LLVM clang-format specifically. A standalone clang-format-20 produces spurious whole-file drift against our config, so if you format with that you will get a diff that looks nothing like the two lines actually at fault.

The reliable local check is:

make -f Makefile.cbm lint-ci

which runs the same cppcheck + clang-format combination CI does, so a green result there means a green result on the runner.

Once that is clean I will give the extraction change itself a proper review — Swift type coverage is squarely the kind of graph-quality improvement we want, so it is worth finishing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request language-request Request for new language support parsing/quality Graph extraction bugs, false positives, missing edges priority/backlog Valuable contribution, lower scheduling urgency; review when maintainer capacity opens.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants