Skip to content

Add Mojo language wiring#939

Draft
aaiyer wants to merge 2 commits into
DeusData:mainfrom
aaiyer:agent/mojo-language-wiring
Draft

Add Mojo language wiring#939
aaiyer wants to merge 2 commits into
DeusData:mainfrom
aaiyer:agent/mojo-language-wiring

Conversation

@aaiyer

@aaiyer aaiyer commented Jul 7, 2026

Copy link
Copy Markdown

Summary

Adds the missing Mojo language wiring now that a Mojo tree-sitter grammar is vendored in the C backend.

Root Cause

The repository includes tree_sitter_mojo, but the language was not reachable through the normal discovery/indexing path:

  • no CBM_LANG_MOJO enum entry
  • no .mojo extension mapping
  • no user config language-name mapping
  • no CBMLangSpec row for Mojo parser/query node types

As a result, .mojo files did not produce Mojo symbols during indexing.

Changes

  • Adds CBM_LANG_MOJO.
  • Maps .mojo files to Mojo.
  • Adds mojo to user-config language name lookup.
  • Wires the vendored tree_sitter_mojo parser into lang_specs with function, class/trait, call, import, branch, assignment, and module node types.
  • Adds language-extension and grammar-regression coverage.

Validation

build/c/test-runner language grammar_regression

Result: 218 passed.

I also verified the patched backend against a small .mojo sample locally: it indexed fn, struct, and method symbols, and outbound trace found a method calling a top-level function.

@aaiyer aaiyer force-pushed the agent/mojo-language-wiring branch from b8e3577 to 5d785b0 Compare July 7, 2026 18:08
Signed-off-by: Anand Aiyer <aaiyer@gmail.com>
@aaiyer aaiyer force-pushed the agent/mojo-language-wiring branch from 5d785b0 to 222e97a Compare July 7, 2026 18:35
Signed-off-by: Anand Aiyer <aaiyer@gmail.com>
@DeusData DeusData added 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. labels Jul 7, 2026
@DeusData

DeusData commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Thanks for picking up Mojo wiring. Triage: draft language-support PR, backlog priority.

Before review can proceed, please remove or fully justify the unrelated vendored/nomic/code_vectors_blob.S change. Mojo language wiring should not include an unrelated vendored/generated blob. Once that is gone, review can focus on the expected pieces: extension mapping, language spec wiring, user-config alias, and grammar regression coverage.

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