Skip to content

Add Mojo language wiring#939

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

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
@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.

@aaiyer aaiyer force-pushed the agent/mojo-language-wiring branch from 099b31f to 222e97a Compare July 8, 2026 02:16
@aaiyer

aaiyer commented Jul 8, 2026

Copy link
Copy Markdown
Author

Thanks for the triage. Addressed by force-pushing the PR branch back to the Mojo-only commit 222e97a0760ae320488a8228eea2a6521b3ec4dc.

vendored/nomic/code_vectors_blob.S is no longer in the PR diff. The current diff is limited to the Mojo language wiring pieces: extension mapping, language spec wiring, user-config alias, and grammar/language regression coverage.

@aaiyer aaiyer marked this pull request as ready for review July 8, 2026 02:57
@aaiyer aaiyer requested a review from DeusData as a code owner July 8, 2026 02:57
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