Skip to content

bug: No Objective-C support #554

Description

@IronMan-2026

What happened?

Title

No Objective-C support — all .m/.mm files produce empty summaries ("contains 0 function definitions")

Labels

bug, enhancement, language-support

Body

Description

Objective-C (.m) and Objective-C++ (.mm) files are not supported. The project scanner detects them by extension (language: "m"), but no Tree-sitter grammar or language config exists for them. As a result, the file-analyzer LLM subagent receives no structural information (functions, classes, methods) and falls back to a generic template summary.
This is a critical gap for any iOS project — Objective-C is the primary language for a large portion of the iOS ecosystem.

Steps to Reproduce

  1. Run /understand on any iOS project containing .m or .mm files
  2. Open the generated knowledge-graph.json
  3. Search for "contains 0 function" (or localized equivalent) in the summary field

Expected Behavior

  • .m files should be parsed like other source files
  • Functions, classes (@interface/@implementation), methods, and properties should be extracted
  • Summaries should describe the actual business logic, not just the module name + file type

Actual Behavior

100% of .m and .mm files produce empty summaries:

File extension Result
.m All files report "0 function definitions"
.mm All files report "0 function definitions"
The only .m files that get meaningful summaries are main.m and AppDelegate.m — the LLM recognizes them as entry points without needing structural extraction.
Example of degraded output:
{
  "id": "file:path/to/SomeManager.m",
  "type": "file",
  "name": "SomeManager.m",
  "summary": "SomeModule module implementation file, containing 0 function definitions.",
  "tags": ["implementation"],
  "complexity": "complex"
}
A 1000+ line core class with dozens of methods — but the graph knows nothing about it.
Root Cause
1. packages/core/src/languages/configs/ contains no objectivec.ts (or objc.ts)
2. No tree-sitter-objc WASM grammar is bundled
3. No ObjC language extractor exists (no @interface/@implementation parsing)
4. The scanner classifies .m files as language: "m" instead of mapping to a known language config
5. Without structural extraction, the LLM file-analyzer subagent has no input context and generates a template summary
Impact
- The knowledge graph is effectively useless for iOS projects — the primary language is unsupported
- /understand-chat cannot answer questions about business logic because core classes have no semantic information in the graph
- A significant portion of all nodes in any iOS project's graph will be degraded
Suggested Fix
1. Add objectivec.ts language config in packages/core/src/languages/configs/
   - Extensions: .m, .h (when in ObjC context)
   - Tree-sitter grammar: tree-sitter-objc (https://github.com/tree-sitter-grammars/tree-sitter-objc)
2. Bundle tree-sitter-objc.wasm
3. Create an ObjC language extractor that handles:
   - @interface / @implementation → classes
   - - (void)methodName: / + (instancetype)sharedInstance → methods/functions
   - @property → properties
   - #import → imports
4. Map .m extension to objective-c in the scanner

### Minimal reproduction

_No response_

### Plugin version

2.7.4

### Platform / client

opencode

### OS + Node version

macOS arm64

### Primary language of the analyzed project

_No response_

### Approximate file count of the analyzed project

_No response_

### Relevant logs

```shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions