Skip to content

feat: add Objective-C ingestion support (phase 1)#1882

Draft
call-me-sean wants to merge 2 commits into
abhigyanpatwari:mainfrom
call-me-sean:feat/objc-p0-p1
Draft

feat: add Objective-C ingestion support (phase 1)#1882
call-me-sean wants to merge 2 commits into
abhigyanpatwari:mainfrom
call-me-sean:feat/objc-p0-p1

Conversation

@call-me-sean

@call-me-sean call-me-sean commented May 28, 2026

Copy link
Copy Markdown

Summary

  • add Objective-C language support to ingestion pipeline (provider + parser wiring)
  • add Objective-C tree-sitter queries and fixture coverage
  • add integration tests for Objective-C parsing/definitions/calls
  • extend shared language detection/types for Objective-C

Implementation details

  • new provider: gitnexus/src/core/ingestion/languages/objc.ts
    • language id: SupportedLanguages.ObjectiveC
    • extensions: .m, .mm
    • import semantics: wildcard-transitive
    • built-in filtering for common ObjC/runtime symbols
    • preprocess nullability macros (NS_ASSUME_NONNULL_BEGIN/END) to preserve parser stability
  • parser registration: tree-sitter-objc wired in parser-loader.ts
  • queries: Objective-C captures in tree-sitter-queries.ts
  • tests:
    • fixture: test/fixtures/sample-code/simple.m
    • integration: Objective-C cases in test/integration/tree-sitter-languages.test.ts

Dependency note

  • use tree-sitter-objc@^2.1.0
  • reason: current repo uses tree-sitter@0.21.x; tree-sitter-objc@3.x pulls peerOptional tree-sitter@^0.22.1, causing install conflict in this branch setup

Validation

  • full integration suite passed locally after merge/conflict resolution:
    • Test Files: 91 passed, 5 skipped
    • Tests: 3049 passed, 133 skipped

Follow-ups (separate phase)

  • Objective-C++ specific semantics and query refinements
  • broader Apple framework/runtime heuristics for ObjC projects

Incremental update

Additional follow-up has now been pushed on branch feat/objcxx-p2-02-header-classification:

  • commit: f3ad5c21
  • title: fix(objcxx): honor guarded ObjC and C++ header signals

What this follow-up fixes:

  • content-aware .h/.pch classification now inspects compatibility-guarded branches
  • __OBJC__ sections contribute Objective-C signals
  • __cplusplus sections contribute C++ signals
  • guarded diagnostics were added for exact test assertions:
    • objcGuardedSignals
    • cppGuardedSignals

Why it matters:

  • Apple-style compatibility headers often hide ObjC or C++ declarations behind preprocessor guards
  • without scanning those guarded regions, mixed headers could be routed through the wrong language path during ingestion
  • this preserves Objective-C routing for guarded ObjC declarations and correctly classifies guarded C/C++ compatibility headers

Validation:

  • node gitnexus/scripts/build.js
  • cd gitnexus && npx vitest run test/unit/ingestion-utils.test.ts test/unit/sequential-language-availability.test.ts
  • result: 126 tests passed

@vercel

vercel Bot commented May 28, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the NexusCore Team on Vercel.

A member of the Team first needs to authorize it.

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