feat(al): add AL (Business Central / Dynamics 365) language support - #1649
Draft
Capitaller wants to merge 7 commits into
Draft
feat(al): add AL (Business Central / Dynamics 365) language support#1649Capitaller wants to merge 7 commits into
Capitaller wants to merge 7 commits into
Conversation
…into feature/al-language-support
…extensions, and namespace-aware symbol resolution
…th case-insensitive matching support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds full AL (Microsoft Dynamics 365 Business Central) language support to CodeGraph, enabling semantic code intelligence across large ERP codebases.
What's included:
alExtractorinsrc/extraction/languages/al.tswith aresolveNamehook that correctly resolves AL object names from theobject_namefield (Codeunit, Table, Page, Report, XMLport, Query, and all extension types).alextension registered insrc/extraction/grammars.ts'al'language type added tosrc/types.tssrc/resolution/name-matcher.ts(AL is case-insensitive by language spec)__tests__/al-extraction.test.tstree-sitter-alWASM grammar (bundled undersrc/extraction/wasm/)Motivation
AL is the primary language for Microsoft Dynamics 365 Business Central, one of the most widely deployed ERP platforms globally. A typical BC codebase (e.g. the official W1 BaseApp) contains 7,800+ files, 115,000+ symbols and 264,000+ dependency edges.
Without CodeGraph, AI agents are forced to rely on grep/find, which fails to understand the graph of Codeunit dependencies and produces shallow, keyword-matched answers.
With CodeGraph, an AI agent answers this in 47s using 2 tool calls:
The agent correctly traces the full call chain:
GetSalesLines→InsertInvoiceRounding→InitInvoiceRoundingLine, identifies the responsible Codeunit (Sales-Post Prepayments, Codeunit 442), and names the correct temporary tables (TempPrepmtInvLineBuf,TempSalesLine,TempVATAmountLine). Without CodeGraph, the same agent runs 10+ grep commands and produces a shallow answer that misses the core architecture.Test plan
npm run build— passes with zero TypeScript errorsnpm run test __tests__/al-extraction.test.ts— AL extraction parity test passes (Codeunit name, procedure nodes, and call reference edges all verified)npm run test— full suite passes: 175 test files, 3,010 tests, 0 failurescodegraph_exploreMCP tool calls exclusively — no grep/find fallback — on real Business Central architecture queries