Skip to content

Fix/cgo release build pr#6

Merged
isink17 merged 2 commits into
masterfrom
fix/cgo-release-build-pr
Mar 27, 2026
Merged

Fix/cgo release build pr#6
isink17 merged 2 commits into
masterfrom
fix/cgo-release-build-pr

Conversation

@isink17

@isink17 isink17 commented Mar 27, 2026

Copy link
Copy Markdown
Owner

No description provided.

isink17 and others added 2 commits March 27, 2026 22:35
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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread internal/cli/registry_cgo.go
@isink17 isink17 merged commit 9a1bd54 into master Mar 27, 2026
3 checks passed
@isink17 isink17 deleted the fix/cgo-release-build-pr branch March 27, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant