Skip to content

Support new Kotlin version 2.5.0 #23167

Backlog
Backlog

Description

@paul-dingemans

Description of the issue

Every time a new Kotlin version is released it takes a while before it is supported by CodeQL. This is understandable and I do understand that CodeQL policy is to not support non-production releases (alpha, beta, release candidate). But every time it raises issues with projects that like to stay up to date with new Kotlin releases, and do not want to wait until CodeQL is updated. For example see:

I have now created a workaround in ktlint to not fail my CodeQL job when it fails due to the notification that the new Kotlin version is not supported. The work around consist of following:

  • Run codeql-init, codeql-analyze with continue-on-error set to true. As a result those steps no longer fail on any CodeQL notification.
  • Add an additional step that analyzes the notifications in the CodeQL Sarif file. If it finds any error notification not emitted by java/extractor-agent/kotlin-version-too-new than fail this step (and therefore the job). If it finds an error notification emitted by java/extractor-agent/kotlin-version-too-new than add that error message as notification to the job, but without failing the job.

This made me realized that a cleaner solution would be that CodeQL would be if the message of java/extractor-agent/kotlin-version-too-new was not marked as error but as a warning (assuming that warnings do not fail the codeql-init and codeql-analyze steps).

Activity

  1. jketema commented on Nov 18, 2026

    @jketema
    Contributor

    Hi @paul-dingemans

    Thanks for the headsup. I do not expect us to be able to do a significant of work on Kotlin 2.5.0 until we're close to the actual release date.

    We cannot change error to warning as that defies the purpose of the error, i.e., to make it abundantly clear that we likely did not extract any code and that the analysis should not be trusted.

  2. paul-dingemans commented on Nov 18, 2026

    @paul-dingemans
    Author

    We cannot change error to warning as that defies the purpose of the error, i.e., to make it abundantly clear that we likely did not extract any code and that the analysis should not be trusted.

    I do understand that.

    My workaround indeed means that some notifications will be missed as long as CodeQL is not on the same compiler versions. The value of my workaround is that CodeQL is not disabled while waiting until it is updated. This reduces the risk of forgetting to enable it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions