Repository navigation
Add Zig and Vue SFC analyzers, Autotools build artifacts - #142
Merged
Merged
Conversation
Zig (analyzers/zig.py): functions, containers (struct, enum, union,
opaque), their member functions (Point.add), and generic type functions
(fn List(comptime T: type) type { return struct {...}; }) become
components, with call, T{...} instantiation, and type-reference edges.
@import aliases and re-exports resolve to the file that declares the
name, as do module names the root build.zig registers with addModule;
std, builtin, and third-party packages are dropped. test blocks and
zig-cache/, .zig-cache/, zig-out/ are skipped.
Vue (analyzers/vue.py): the <script> and <script setup> blocks of a .vue
file go through the JavaScript/TypeScript analyzers with everything else
blanked, so line numbers stay those of the .vue file. The file itself
becomes a component and its options-API members (methods, computed,
watch, lifecycle hooks) its methods. Edges link the component to the
.vue files and modules it imports (relative and @/ paths), to the
components its template uses (kebab- or PascalCase tags), and to the
members and script functions its template expressions call or bind.
Autotools (analyzers/artifact.py): configure.ac, Makefile.am / *.am,
acinclude.m4 and m4/*.m4 are build artifacts. A Makefile.am gets a unit
per library or program it builds, linked to its _SOURCES; SUBDIRS links
sub-directory Makefile.am files. configure.ac gets a unit per
AC_ARG_ENABLE / AC_ARG_WITH option and links to the Makefile.am files
AC_CONFIG_FILES generates. build.zig is a build artifact and
build.zig.zon a manifest.
Wires .zig and .vue through the call-graph dispatch, supported-language
lists, extension maps, include patterns, CLI validators, and MCP change
detection. All grammars come from tree-sitter-language-pack, so no new
dependency.
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 support for the languages and build systems in SWE-Refactor-Bench that CodeWiki couldn't analyze yet:
analyzers/zig.py. Covers lang05 (goyaml Go→Zig).analyzers/vue.py. Covers fw03 (conduit Vue→React).analyzers/artifact.py. Covers build01 (libsodium autotools→CMake).All three grammars come from
tree-sitter-language-pack, so there's no new dependency.Zig
struct,enum,union,opaque), their member functions (Point.add), and generic type functions (fn List(comptime T: type) type { return struct {...}; }).T{...}instantiation, and types named in params, return types, fields and annotated locals.@importaliases and re-exports resolve to the file that declares the name, and so do module names registered withaddModulein the rootbuild.zig.std,builtinand third-party packages are dropped.testblocks, pluszig-cache/,.zig-cache/andzig-out/.build.zigis a build artifact andbuild.zig.zona manifest.Vue
<script>and<script setup>go through the existing JS/TS analyzers. Everything else in the file is blanked, so line numbers match the.vuefile.methods,computed,watch, lifecycle hooks) become its methods..vuefiles and modules it imports (relative and@/paths);Autotools
configure.ac,Makefile.amand other*.amfiles,acinclude.m4, andm4/*.m4.Makefile.am: one unit per library or program it builds (libsodium.la), linked to its_SOURCES.SUBDIRSlinks the sub-directoryMakefile.amfiles.configure.ac: one unit perAC_ARG_ENABLE/AC_ARG_WITHoption, plus links to theMakefile.amfiles listed inAC_CONFIG_FILES.Test plan
tests/test_zig_analyzer.pyandtests/test_vue_analyzer.py, plus new Autotools cases intests/test_artifact_analyzer.py.pytest -q -o addopts="": 402 passed, 1 failed. The failure istest_clustering_skip.py::test_over_threshold_calls_llm_and_bad_response_falls_back, which fails the same way onmain.ruff checkandruff format --checkare clean.codewiki generatewith--provider codexand modelgpt-6-luna. Every run exited 0:.vuefiles)