Skip to content

Kotlin: expose kotlin version picker for internal packaging #16731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

redsun82
Copy link
Contributor

@redsun82 redsun82 commented Jun 12, 2024

The internal repository is still using kotlin_plugin_versions.py for running QL tests, which we want to replace with versions specified in versions.bzl.

This renames kotlin_plugin_versions.py to pick-kotlin-version.py, and enhances it to accept a list of available versions to pick from. This functionality was moved from the Starlark implementation in deps.bzl. The list of versions (taken from VERSIONS in versions.bzl) is now also exposed as a kotlin-versions.list file.

After this we will be able to package these files into the distribution, so that they can be used for running QL tests.

Please refer to the internal PR linked below to see how this is used.

@redsun82 redsun82 marked this pull request as ready for review June 12, 2024 08:42
@redsun82 redsun82 requested review from a team as code owners June 12, 2024 08:42
@redsun82 redsun82 requested review from criemen and igfoo June 12, 2024 08:42
Copy link
Collaborator

@criemen criemen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming we've tested that this works on Windows.

genrule(
name = "versions-list",
outs = ["kotlin-versions.list"],
cmd = "\n".join(["cat > $@ << EOF"] + VERSIONS + ["EOF"]),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we test this on Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bazel still uses bash for genrules on windows, but anyway I double checked and it indeed works.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it does, but due to msys paths sometimes genrules on Windows still behave weirdly... better check to be safe!

@redsun82 redsun82 merged commit b8de2ea into main Jun 13, 2024
13 checks passed
@redsun82 redsun82 deleted the redsun82/kotlin-fix-version-picker branch June 13, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants