-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update to Kotlin 1.9.24 and related build tool versions #259
Conversation
26ea5fb
to
218ef65
Compare
6e7485f
to
89c2b1c
Compare
6088eec
to
84e43c2
Compare
6f6fcff
to
5f08c02
Compare
fun ProviderFactory.gradlePropertyOrEnvironmentVariable(propertyName: String): Provider<String> { | ||
val envVariableName = CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, propertyName) | ||
return gradleProperty(propertyName) | ||
.forUseAtConfigurationTime() |
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.
forUseAtConfigurationTime()
is no longer necessary with newer gradle versions
actual object Platform { | ||
actual fun stderrPrintln(str: String) { | ||
val strn = str + "\n" | ||
val cstr = strn.cstr | ||
write(2, cstr, cstr.size.toULong()) | ||
} | ||
|
||
private suspend fun stdinReadIntLE() = withContext(Dispatchers.Main) { | ||
private suspend fun stdinReadIntLE() = withContext(Dispatchers.IO) { |
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.
Kotlin/Native now supports Dispatchers.IO
, and Dispatchers.Main
doesn't work correctly now that Dispatchers.IO
is available. This brings Kotlin/Native more in line with how Kotlin/JVM works.
@@ -913,7 +913,6 @@ public final class pbandk/wkt/EnumOptions : pbandk/ExtendableMessage { | |||
public final fun getDeprecated ()Ljava/lang/Boolean; | |||
public fun getDescriptor ()Lpbandk/MessageDescriptor; | |||
public fun getExtension (Lpbandk/FieldDescriptor;)Ljava/lang/Object; | |||
public fun getExtensionFields ()Lpbandk/ExtensionFieldSet; |
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.
These were improperly included in the public API because of limitations in earlier versions of the binary-compatibility-validator
gradle plugin. The updated version of the plugin properly excludes these functions from the public API.
@@ -1,9 +1,3 @@ | |||
package pbandk.internal | |||
|
|||
import platform.posix.* | |||
|
|||
internal class PosixException(val errno: Int) : RuntimeException( |
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.
This class wasn't being used anymore
Kotlin 1.9.24, which necessitated also updating Gradle, Java, Android Gradle Plugin, etc. Notable changes resulting from the version bumps: - Dropped support for the legacy Kotlin/JS compiler. - Minimum JVM version required for building pbandk is now v17 (pbandk still supports JVM 8+ at runtime). - The Kotlin/JS compiler changed how it represents `Long` internally, which required some refactoring of the Kotlin<->JS Long conversion code in `runtime/src/jsMain/kotlin/pbandk/protobufjs/Util.kt`. - Various changes to the gradle configs and other build files to support build-time changes introduced in newer Kotlin versions.
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.
LGTM, is the plan to do a release after this is merged?
Yep. I'm going to make a release after this PR and #268 and #269 are merged. The 3 PRs all go together. And then once Kotlin 2.0.10 is out in the near future and #270 is merged I'll make another release. That way there'll be a recent pbandk release with a Kotlin 1.9 dependency for anyone who isn't ready yet to update to Kotlin 2.0. |
Incorporate Kotlin 1.9 deprecations and new features There have been a bunch of features deprecated between Kotlin 1.5.32 and 1.9.24, as well as new features added. Any breaking changes were handled in #259. This PR updates pbandk to remove non-breaking deprecated features and adopt some of the new features. See individual commits for more details.
Kotlin 1.9.24, which necessitated also updating Gradle, Java, Android Gradle Plugin, etc.
Notable changes resulting from the version bumps:
Long
internally, which required some refactoring of the Kotlin<->JS Long conversion code inruntime/src/jsMain/kotlin/pbandk/protobufjs/Util.kt
.