Language request: MATLAB (.m) - plus the .m / Objective-C extension collision
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- matlab, objective-c
- Domain
- developer-experience, tooling
Research direction
Start by reading the EXTENSION_MAP entry for .m and the codegraph.json extension mapping, then check how the project loads and validates tree-sitter grammars. The issue identifies the collision with Objective-C and asks for per-file disambiguation or a project-level mapping; verify grammar compatibility with the current tree-sitter ABI. Done means MATLAB files can be indexed with useful symbols while existing Objective-C .m files remain supported.
Written by the indexing model from the issue text.
Description
Language: MATLAB (.m) — scripts, functions, and classdef
Current behavior
MATLAB .m files are routed to the Objective-C grammar via EXTENSION_MAP (.m → objc), so they contribute nothing to the graph. Reproduced on a real repository:
- 61
.mfiles containing 74functiondeclarations - Index result:
Files by Language: objc 61, 0 function nodes extracted - What it extracts instead is noise: 402
variable+ 207enum_membernodes
On a mixed C++/MATLAB repo the CLI reports it outright:
matlab/fn_gaussian.m: parse produced no symbols (tree has errors) —
the file is indexed but contributes nothing to the graph
So the files are picked up but silently produce a meaningless graph — which is close to the worst outcome, since an agent may trust an index that actually contains nothing.
Why this is more than "wire in a tree-sitter-matlab .wasm"
The .m extension collides with Objective-C, which is already supported. A MATLAB grammar alone is not sufficient — the routing decision has to be made per file, not per extension, or exposed as an explicit user-side mapping. This is the same class of problem as #1586 (B4X .bas routed through the VB.NET grammar → 0 symbols), so it may be worth solving the disambiguation generically once.
A cheap first step that would already help: a codegraph.json way to map an extension to a language for a given project (the existing extensions map is global per project — if .m could be pointed at matlab once a grammar exists, users could opt in immediately).
Grammar availability
A community tree-sitter-matlab exists (e.g. mstanciu552/tree-sitter-matlab); there is also an Octave grammar. I have not verified either against the tree-sitter ABI this project currently uses.
On demand
MATLAB is heavily used in engineering, scientific and signal-processing work, and mixed pipelines are common: device firmware or drivers in C/C++/CUDA, with the acquisition/analysis layer in MATLAB. Those repos are exactly where structural search pays off, because the interesting call paths cross the language boundary.
That user base is under-represented in the coding-agent ecosystem — they are not the same people filing most language requests — so the demand here is likely silent rather than absent. 👍 from others in that space welcome.
Offer
Happy to run retrieval validation on real private repos (mixed C++/MATLAB, roughly 35–320 source files) once the grammar is wired, and to report precision on real MATLAB code.
- Dominant language
- C
- Stars
- 73.2k
- Forks
- 4.7k
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 418
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from colbymchenry/codegraph
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
colbymchenry/codegraph#2634 ·
Maintainers usually reply within 1 day
-
Windows: bundled Node v24.16.0 can abort at exit (nodejs/node#56645); please bundle Node >= 24.20.0Possibly taken @Ancienttwo claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
colbymchenry/codegraph#2617 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 72/100
colbymchenry/codegraph#2482 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
colbymchenry/codegraph#1900 · 2 comments · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
colbymchenry/codegraph#1700 ·
Maintainers usually reply within 1 day
All issues in colbymchenry/codegraph
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenPrinting/cups#1772 ·
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
antoxa2584x/nfsu2-sw#44 · 1 reaction ·
Maintainers usually reply within 1 day