Kotlin/Bazel: provide wrapper for managing versions of kotlinc#16208
Merged
redsun82 merged 3 commits intoredsun82/kotlinfrom Apr 15, 2024
Merged
Kotlin/Bazel: provide wrapper for managing versions of kotlinc#16208redsun82 merged 3 commits intoredsun82/kotlinfrom
kotlinc#16208redsun82 merged 3 commits intoredsun82/kotlinfrom
Conversation
By adding `java/kotlinc-extractor/deps/dev` to `PATH`, one gets a `kotlinc` wrapper that takes care of downloading and extracting the desired version of `kotlinc` on demand. The desired version can be selected with `kotlinc --select x.y.z`, or left to the current default of `1.9.0`. Moreover, this default version is integrated with the Bazel build, so that when using this wrapper, changes in the selected version will be picked up to define the default single version kotlin extractor build, without needing to do anything else (like `bazel fetch --force` or similar). Selected and installed version data is stored in `.gitignore`d files in the same directory, and can be cleared with `kotlinc --clear`.
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.
By adding
java/kotlinc-extractor/deps/devtoPATH, one gets akotlincwrapper that takes care of downloading and extracting the desired version ofkotlincon demand. The desired version can be selected withkotlinc --select x.y.z, or left to the current default of1.9.0.Moreover, this requested version is integrated with the Bazel build, so that when using this wrapper, changes in the selected version will be picked up to define the default single version kotlin extractor build, without needing to do anything else (like
bazel fetch --forceor similar).Selected and installed version data is stored in
.gitignored files in the same directory, and can be cleared withkotlinc --clear.