Description
After upgrading to v0.9.2, CodeGraph enforces a behavior change where committed files that are not gitignored are now indexed even under vendor/. However, for Go microservices, it is a common practice to commit the vendor/ directory to the repository to ensure CI/CD stability and faster builds.
Because the vendor/ directory contains huge amounts of third-party dependency code and is already committed, there is currently no way to exclude it from being indexed. Adding vendor/ to .gitignore does not prevent indexing because Git still tracks committed files, and CodeGraph continues to index them. This results in an extremely bloated database (over 200MB for a single lightweight microservice) and wastes massive amounts of local index time.
Steps to Reproduce
- Create a Go project where the
vendor/ folder is committed to the git repository (standard workflow for some CI/CD pipelines).
- Add
vendor/ to the project's .gitignore (which naturally doesn't stop git from tracking already committed files).
- Attempted workarounds like adding
vendor/ to .git/info/exclude or running git update-index --assume-unchanged.
- Run
npx @colbymchenry/codegraph init -i.
Expected Behavior
There should be a way to force-exclude specific committed folders like vendor/ or Pods/ from being indexed to keep the local database lightweight and prevent the AI from being distracted by third-party dependencies.
Actual Behavior
CodeGraph forces indexing on all committed vendor/ files, generating a .codegraph/codegraph.db file of over 200MB for a small microservice.
Suggested Solution / Feature Request
Please consider providing a --exclude CLI flag or bringing back a minimal local ignore override mechanism (like a fallback custom ignore or respecting local .git/info/exclude), so that developers who must commit their vendor/dependencies can still use CodeGraph without database bloating.
Environment
- CodeGraph Version: v0.9.2
- Language: Go (Golang)
- OS: Windows
Description
After upgrading to v0.9.2, CodeGraph enforces a behavior change where committed files that are not gitignored are now indexed even under
vendor/. However, for Go microservices, it is a common practice to commit thevendor/directory to the repository to ensure CI/CD stability and faster builds.Because the
vendor/directory contains huge amounts of third-party dependency code and is already committed, there is currently no way to exclude it from being indexed. Addingvendor/to.gitignoredoes not prevent indexing because Git still tracks committed files, and CodeGraph continues to index them. This results in an extremely bloated database (over 200MB for a single lightweight microservice) and wastes massive amounts of local index time.Steps to Reproduce
vendor/folder is committed to the git repository (standard workflow for some CI/CD pipelines).vendor/to the project's.gitignore(which naturally doesn't stop git from tracking already committed files).vendor/to.git/info/excludeor runninggit update-index --assume-unchanged.npx @colbymchenry/codegraph init -i.Expected Behavior
There should be a way to force-exclude specific committed folders like
vendor/orPods/from being indexed to keep the local database lightweight and prevent the AI from being distracted by third-party dependencies.Actual Behavior
CodeGraph forces indexing on all committed
vendor/files, generating a.codegraph/codegraph.dbfile of over 200MB for a small microservice.Suggested Solution / Feature Request
Please consider providing a
--excludeCLI flag or bringing back a minimal local ignore override mechanism (like a fallback custom ignore or respecting local.git/info/exclude), so that developers who must commit their vendor/dependencies can still use CodeGraph without database bloating.Environment