Language request: MATLAB (.m) - plus the .m / Objective-C extension collision
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- matlab, objective-c
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 73.2k
- Fork
- 4.7k
- Merge trung bình
- 11 giờ 28 phút
- Pull request đã merge (30 ngày)
- 596
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của colbymchenry/codegraph
-
codegraph ui - does not workĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
colbymchenry/codegraph#1900 · 2 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
colbymchenry/codegraph#1700 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
colbymchenry/codegraph#1535 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
colbymchenry/codegraph#1403 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-target
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
colbymchenry/codegraph#649 · 5 bình luận · 50 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của colbymchenry/codegraph
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 93/100
webarkit/WebARKitLib#107 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
polhenarejos/pico-fido#302 ·
-
[BUG] Out-of-range negative slice end returns the whole stringCó thể đã có người làm @Don-Yin đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
fastfetch-cli/fastfetch#2668 ·
Maintainer thường phản hồi trong vòng 1 ngày