Go extractor does not support build-mode: none, preventing overlay/incremental analysis on PRs
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with the Go extractor's build-mode handling and the buildless option referenced in the issue; inspect codeql-extractor.yml for declared options, including trap.cache.*. Reproduce with build-mode: none and compare extraction behavior with the existing workaround. Done means Go accepts the mode and overlay or incremental extraction works without those environment variables.
Written by the indexing model from the issue text.
Description
Problem
The Go extractor (CodeQL CLI 2.25.1) does not support build-mode: none:
A fatal error occurred: Go does not support the none build mode.
Please try using one of the following build modes instead: autobuild, manual.
This means Go cannot benefit from overlay/incremental analysis on pull requests. JavaScript gets this automatically — in our monorepo we see Overlay filter removed 4311 out of 4312 files from extraction on JS PRs, reducing a full extraction to just the changed files. Go still does a full extraction of every package on every PR (~2.5 min for autobuild + ~1.5 min for analysis in a large monorepo).
Current workaround
We use legacy env var hacks to skip the actual go build:
env:
CODEQL_EXTRACTOR_GO_FAST_PACKAGE_INFO: y
CODEQL_EXTRACTOR_GO_BUILD_COMMAND: false
This avoids compilation but still runs full type extraction for every Go package on every PR.
Expected behavior
Setting build-mode: none should work for Go, enabling overlay/incremental analysis on PRs (as it already does for JavaScript/TypeScript). The Go extractor already has a buildless/standalone extraction path (DEPRECATED: Use --build-mode none instead appears in the extractor options for the buildless flag), so the extraction capability exists — it just isn't wired up to accept build-mode: none.
Additional context
- We also noticed that Go's extractor does not declare
trap.cache.*options incodeql-extractor.yml, so TRAP caching is also unavailable for Go. - The v3→v4 action upgrade enabled overlay for JS automatically, but there's no path to get the same benefit for Go.
- codeql-action v4.35.1, CodeQL CLI 2.25.1
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 493
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 44
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/codeql-action
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/codeql-action#4052 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
github/codeql-action#4078 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
github/codeql-action#4008 · 9 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
github/codeql-action#3978 · 4 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
github/codeql-action#3915 · 6 comments · 3 reactions ·
All issues in github/codeql-action
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·