Repository navigation
chore(scripts): regenerate the Go standard-library method table from Go's source - #2760
Merged
Merged
Conversation
…Go's source go-stdlib-methods.ts lists the methods of 130 standard-library types with their parameter and result counts. Its generator lived in a validation kit. scripts/gen-go-stdlib-methods.mjs reads a Go source tree with the engine's Go grammar, counts with the engine's own goSignatureArity, and prints (or --write's) the table for the types it lists, so a later Go release's methods are one command away. Against go1.27.3 it reproduces the table byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
danusha2345
pushed a commit
to danusha2345/codegraph
that referenced
this pull request
Oct 22, 2026
…mchenry#2790; superseded colbymchenry#2458/colbymchenry#2460/colbymchenry#2471/colbymchenry#2490/colbymchenry#2591/colbymchenry#2747/colbymchenry#2758 yield to main's versions; EXTRACTION_VERSION 53) Co-Authored-By: Claude Fable 5.1 <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.
Summary
src/resolution/go-stdlib-methods.ts(#2759) lists the methods of 130 standard-library types, each asname:params/results. It was generated from Go's own source, but the generator lived in a validation kit, so updating the table for a later Go release would have meant re-deriving the counting rules. This checks the generator in asscripts/gen-go-stdlib-methods.mjs:<GOROOT>/src/<import path>/*.go(tests skipped) for every type the table lists now, with the engine's Go grammar. To add or drop a type, edit the table and rerun.Tor*T) and those its embedded fields promote;goSignatureArity, imported fromdist, so a table method is held to what the arity gate reads off a project method's stored signature.testing.TB'sprivate).--writerewrites it in place, keeping the file's line endings.dist/is missing.The module's doc comment now points at the script.
Validation
--writeleaves the module byte-identical (same md5), both before and after this PR's doc-comment edit.--maxWorkers=4 --minWorkers=1and the kernel built (CODEGRAPH_KERNEL_EXPECT=1): 698 files, 8342 tests, 8260 passed, 0 failed, 82 skipped.🤖 Generated with Claude Code