Skip to content

rag/treesitter: add nocgo build support#2329

Open
shaj13 wants to merge 1 commit intodocker:mainfrom
shaj13:sitter-nocgo
Open

rag/treesitter: add nocgo build support#2329
shaj13 wants to merge 1 commit intodocker:mainfrom
shaj13:sitter-nocgo

Conversation

@shaj13
Copy link
Copy Markdown

@shaj13 shaj13 commented Apr 5, 2026

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 !cgo build variant for the treesitter package. Applications that don't use RAG can now build with CGO_ENABLED=0. If RAG is used without CGO, it returns a clear error explaining the requirement.

Allow building without CGO for applications that do not use RAG.
DocumentProcessor returns an error when built without CGO and RAG is used.
@shaj13 shaj13 requested a review from a team as a code owner April 5, 2026 16:04
@krissetto
Copy link
Copy Markdown
Contributor

sry, could you rebase this? not at my pc now. i'll reapprove after that

@shaj13
Copy link
Copy Markdown
Author

shaj13 commented Apr 5, 2026

sry, could you rebase this? not at my pc now. i'll reapprove after that

@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?

Screenshot:
image

Fork:
image

@shaj13
Copy link
Copy Markdown
Author

shaj13 commented Apr 6, 2026

@krissetto & @dgageot Thanks for the approval.
Whenever you have a moment, could you please proceed with merging this PR?

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.

3 participants