rag/treesitter: add nocgo build support#2329
Merged
krissetto merged 1 commit intodocker:mainfrom Apr 6, 2026
Merged
Conversation
Allow building without CGO for applications that do not use RAG. DocumentProcessor returns an error when built without CGO and RAG is used.
krissetto
approved these changes
Apr 5, 2026
Contributor
|
sry, could you rebase this? not at my pc now. i'll reapprove after that |
Contributor
Author
@krissetto Git tree and branch are up to date. Could this be due to workflow approval, or because the PR is coming from a fork? |
dgageot
approved these changes
Apr 6, 2026
Contributor
Author
|
@krissetto & @dgageot Thanks for the approval. |
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.


I'm building a CLI tool that uses docker-agent but doesn't need RAG functionality. Currently, the tree-sitter dependency forces CGO even when RAG isn't used, which causes Go stdlib and other 3rd party packages to also be built with CGO.
This PR adds a
!cgobuild variant for the treesitter package. Applications that don't use RAG can now build withCGO_ENABLED=0. If RAG is used without CGO, it returns a clear error explaining the requirement.