Repository navigation
feat: get_function_definitions (release 0.2.0) - #14
Merged
Merged
Conversation
New read-only tool get_function_definitions returns a DEFINE block with the selected functions of a package and their call closure, also in the declared dependency packages at the exact declared versions. Call detection uses a tokenizer; problems are reported as warnings with a `complete` flag, recursion as an error. The tool never connects to a model. Names and code are returned as published. install_package now warns (dependencyNotInstalled) when a manifest dependency has no function in the model. get_package points to the new tool. CI also builds and tests on Linux and macOS as a non-blocking try. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the hand-written tokenizer with Dax.Tokenizer from sql-bi/Vpax-Obfuscator (commit 8990d0b, MIT), an ANTLR-generated DAX lexer. The source is vendored unchanged in src/Dax.Tokenizer as its own project with the upstream namespace, so it can be replaced by the NuGet package with a reference change (see src/Dax.Tokenizer/README.md). QueryDefinitions/DaxSyntax adapts the lexer for call detection, parameter parsing (keyword tokens such as `text` or `year` are accepted as parameter names) and the literal spans the DEFINE writer must not re-indent. Call graphs of all 64 published packages still match the golden data (300 edges). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The executable now bundles the ANTLR 4 C# runtime (BSD-3-Clause). The release workflow copies THIRD-PARTY-NOTICES.md into the win32-x64 npm package, next to the executable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Implements release 0.2.0 of the DAX Lib MCP inline-functions spec: DAX Lib functions inside a DAX query (
DEFINE FUNCTION ... EVALUATE ...) without changing the model.Changes
get_function_definitions: returns aDEFINEblock (embedded resourcedaxlib-define://<id>/<version>/define.dax) with the selected functions and their call closure, also in declared dependency packages at the exact declared versions. Inputs:id,version,functions,includeDependencies(none/package/all, defaultall),includeDescriptions. Never connects to a model; no compatibility-level check; no renames.src/Dax.Tokenizer: the DAX lexer of sql-bi/Vpax-Obfuscator (commit8990d0b, MIT, ANTLR 4.13.1 runtime), vendored unchanged as its own project with the upstream namespace. When the NuGet package is published, the project is replaced by a package reference (steps insrc/Dax.Tokenizer/README.md).QueryDefinitions/:DaxSyntax(adapter over the lexer: calls, comments, parameter names, literal spans), embedded built-in list (472 names,INFO.FUNCTIONS),FunctionCatalog(descriptions, parameters, calls),DependencyResolver(closure, warnings,complete, recursion check, per-call cache, download only when a call leaves the package),DaxQueryWriter.missingDependency,dependencyNotFound,dependencyVersionNotFound,versionConflict,functionNotFound(setcomplete = false);undeclaredDependency,unresolvedCall,packageCycle(information). Errors carrydata.code:unknownFunction(up to 10 close names),tmdlParseFailed,recursiveCall,nameCollision.install_package: warningdependencyNotInstalledwhen a manifest dependency has no function in the model.get_packagedescription and server instructions point to the new tool.windows-latest,ubuntu-latest,macos-latest; non-Windows jobs arecontinue-on-error(build try).RuntimeIdentifiers=win-x64;linux-x64;osx-arm64, lock files regenerated.docs/decisions/dependency-resolution.md, CHANGELOG;version.json= 0.2.0 (separatechore(release)commit).Verification
-warnaserror, locked-mode restore: OK. 110 unit tests pass (4 opt-in live tests skipped).Viz.Pill+Viz.ProgressBarclosure: 9 functions, 16,454 characters.DAXLIB_MCP_LIVE_GALLERY_TESTS=1): every latest package returns a block. Stdio smoke test of the built executable against the live gallery: OK.DAXLIB_MCP_PBI_WORKSPACE_ID,DAXLIB_MCP_PBI_DATASET_ID,DAXLIB_MCP_PBI_ACCESS_TOKEN; expects 62 of 64 to run, known failures DaxLib.SVG and Ankush.SemanticInfo); Linux/macOS CI (this PR).Notes for review
data.codeon errors is new for this tool; the other tools return only a message.unresolvedCallis reported only for dotted names, so keywords such asRETURN (do not warn.chore(release): prepare 0.2.0commit may need to move to its own release branch perdocs/release-process.md.🤖 Generated with Claude Code