Fix/cgo release build pr#6
Merged
Merged
Conversation
Tree-sitter requires CGo, but CI cross-compiles with CGO_ENABLED=0. Add //go:build cgo tags to all tree-sitter adapter files and split the parser registry into build-tagged variants: - registry_cgo.go: uses tree-sitter parsers (full AST parsing) - registry_nocgo.go: uses heuristic/regex parsers (fallback) Both modes build and pass all tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep the release matrix from canceling after the first failure and print build context before cross-compiling. This makes it easier to diagnose the Linux tar.gz failure and observe the remaining targets in CI.
There was a problem hiding this comment.
Code Review
This pull request introduces build-tagged implementations for the default parser registry, allowing the application to function in environments where CGO is disabled. It moves the newDefaultRegistry function from internal/cli/app.go into two new files, registry_cgo.go and registry_nocgo.go, and adds //go:build cgo constraints to all tree-sitter based parser adapters. The reviewer suggested refactoring the registry creation logic to centralize the list of supported languages, which would reduce duplication and improve maintainability when adding new parsers in the future.
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.
No description provided.