Compile CodeQL sources with the Gradle build cache disabled - #15
Merged
Conversation
The CodeQL job builds in manual mode, so the extractor only sees code that an actual compiler process emits. setup-gradle restores the local build cache from earlier CI runs, which turns every compileKotlinJvm task into FROM-CACHE, no compiler runs, and database finalization fails with "CodeQL could not process any code written in Java/Kotlin" (see run 29678913155). Pass --no-build-cache so the tasks always execute under the CodeQL tracer; dependency and wrapper caches stay in place. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
IRus
added a commit
that referenced
this pull request
Jul 19, 2026
--no-build-cache (added in #15) stops Gradle from resolving compile tasks FROM-CACHE, but restored incremental state can still mark them UP-TO-DATE, in which case kotlinc never launches and CodeQL's manual-build extractor sees no compilation. Add --rerun-tasks so the scanned compile tasks always execute for real; dependency caching from setup-gradle stays in effect. Verified locally: the exact workflow command reports "27 actionable tasks: 27 executed" with zero UP-TO-DATE/FROM-CACHE outcomes. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
Analyze Java and Kotlinfails on every PR with:The job uses
build-mode: manual, so the CodeQL tracer only captures code compiled by a real compiler process during the "Compile JVM Kotlin sources" step.gradle/actions/setup-gradlerestores the Gradle build cache from previous CI runs, so on PRs everycompileKotlinJvmtask resolves asFROM-CACHE(run 29678913155: all 10 compile tasks came from cache). No compiler ever runs → the extractor sees nothing →database finalizeexits with code 32. It only passed onmainwhen the cache happened to miss.Fix
Add
--no-build-cacheto the compile invocation. Compilation always executes under the tracer; dependency, wrapper, and configuration caches are untouched, so the overhead is just the actual Kotlin compilation this job exists to observe.🤖 Generated with Claude Code