Skip to content

Fix CodeQL Java toolchain discovery - #169

Merged
mcculls merged 1 commit into
mainfrom
mcculls/fix-codeql-java-toolchain
Nov 12, 2026
Merged

mcculls merged 1 commit into
mainfrom
mcculls/fix-codeql-java-toolchain

Conversation

@mcculls

@mcculls mcculls commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What Does This Do

Map the GitHub runner's JAVA_HOME_17_X64 to JAVA_17_HOME before initializing CodeQL for Java/Kotlin. Only write the mapping when the directory exists, preserving any existing JAVA_17_HOME otherwise.

Motivation

Gradle disables toolchain auto-detection and looks for Java 17 through JAVA_17_HOME. CodeQL discovers the runner's JDK through a different variable, so our build fails to find the required compiler when running via GitHub actions.

Additional Notes

Full CodeQL analysis remains to be verified in CI.

Contributor Checklist

  • Validated workflow YAML and setup behavior with an unset variable, empty value, missing directory, and existing directory.
  • Reproduced the missing-toolchain failure locally and verified clean testClasses succeeds with Java 25 as the default and the Java 17 mapping applied, including configuration-cache storage.

@mcculls
mcculls requested a review from a team as a code owner November 12, 2026 09:55
@mcculls
mcculls requested review from amarziali and dougqh and removed request for a team November 12, 2026 09:55
@mcculls
mcculls merged commit adeacef into main Nov 12, 2026
8 checks passed
@mcculls
mcculls deleted the mcculls/fix-codeql-java-toolchain branch November 12, 2026 10:01
@github-actions github-actions Bot added this to the 0.0.7 milestone Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants