-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Pin kotlin to latest version(2.1.21) #12442
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
base: main
Are you sure you want to change the base?
Pin kotlin to latest version(2.1.21) #12442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR pins Kotlin to version 2.1.21 and updates the macOS tooling tests to work with Kotlin 2.x, adjusting kapt and kotlinc-js invocations.
- Refactor tests to explicitly invoke each Kotlin tool with the correct flags for version 2.x.
- Remove custom Homebrew bottle pinning for Kotlin in favor of the default latest installation.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
images/macos/scripts/tests/BasicTools.Tests.ps1 | Replace generic TestCases loop with individual It blocks and update Kotlin tool flags. |
images/macos/scripts/build/install-common-utils.sh | Comment out custom Kotlin pinning logic so Homebrew installs the default latest version. |
#Describe "Kotlin" { | ||
#$kotlinPackages = @("kapt", "kotlin", "kotlinc", "kotlinc-jvm", "kotlinc-js") | ||
|
||
#It "<toolName> is available" -TestCases ($kotlinPackages | ForEach-Object { @{ toolName = $_ } }) { | ||
#"$toolName -version" | Should -ReturnZeroExitCode | ||
#} | ||
#} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commented-out generic Describe "Kotlin"
block and associated lines can be removed to clean up dead code and avoid confusion.
#Describe "Kotlin" { | |
#$kotlinPackages = @("kapt", "kotlin", "kotlinc", "kotlinc-jvm", "kotlinc-js") | |
#It "<toolName> is available" -TestCases ($kotlinPackages | ForEach-Object { @{ toolName = $_ } }) { | |
#"$toolName -version" | Should -ReturnZeroExitCode | |
#} | |
#} | |
# (Removed the commented-out block entirely) |
Copilot uses AI. Check for mistakes.
#kotlin) | ||
# Pin kotlin bottle to 2.1.10 due to an issue with the latest version | ||
# https://youtrack.jetbrains.com/issue/KT-76169/kotlinc-js-version-and-kapt-version-returning-non-zero-status-code-on-v2.1.20 | ||
kotlin_commit="442af88a2925f8c0e079eaf4fa62261133d2d7c4" | ||
kotlin_rb_link="https://raw.githubusercontent.com/Homebrew/homebrew-core/$kotlin_commit/Formula/k/kotlin.rb" | ||
kotlin_rb_path=$(download_with_retry "$kotlin_rb_link") | ||
brew install "$kotlin_rb_path" | ||
;; | ||
#kotlin_commit="442af88a2925f8c0e079eaf4fa62261133d2d7c4" | ||
#kotlin_rb_link="https://raw.githubusercontent.com/Homebrew/homebrew-core/$kotlin_commit/Formula/k/kotlin.rb" | ||
#kotlin_rb_path=$(download_with_retry "$kotlin_rb_link") | ||
#brew install "$kotlin_rb_path" | ||
#;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Instead of commenting out the entire Kotlin case, consider removing these commented lines or adding a note explaining that the default Homebrew install will now be used, to keep the script concise.
Copilot uses AI. Check for mistakes.
Description
Related issue:
Check list