Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Language request: MATLAB (.m) - plus the .m / Objective-C extension collision

Aperta
#2,534 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
matlab, objective-c

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 .m files containing 74 function declarations
  • Index result: Files by Language: objc 61, 0 function nodes extracted
  • What it extracts instead is noise: 402 variable + 207 enum_member nodes

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.

Lingua principale
C
Stelle
73.2k
Fork
4.7k
Merge medio
4h 46m
PR unite (30g)
478

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di colbymchenry/codegraph

Tutte le issue di colbymchenry/codegraph

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.