-
Notifications
You must be signed in to change notification settings - Fork 64
Weekly Stable Updates 20211202 #436
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
Conversation
|
Hello @moljac i see that some checks have failed due to Do you have idea when this PR will be merged? |
|
After this one is approved/merged and packages published I can continue with updates and this PR should be 1st |
config.json
Outdated
| "version": "1.0.0", | ||
| "nugetVersion": "1.0.0", | ||
| "nugetId": "Xamarin.AndroidX.Emoji2", | ||
| "excludedRuntimeDependencies": "androidx.lifecycle.lifecycle-process", |
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 seems to be an actual needed runtime dependency. Removing it will likely cause this package to not work:
<dependency>
<groupId>androidx.lifecycle</groupId>
<artifactId>lifecycle-process</artifactId>
<version>2.4.0</version>
<scope>runtime</scope>
<type>aar</type>
</dependency>
config.json
Outdated
| "artifactId": "kotlin-stdlib", | ||
| "version": "1.5.31", | ||
| "nugetVersion": "1.5.31.3", | ||
| "version": "1.6.0", |
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.
I think we need to hold off on updating Kotlin to 1.6.0. Looking at the diffs makes me think they may have changed how they are encoding their "unsigned" types, and we may need a fix there or else all of our Kotlin support around them will be incorrect.
Example: these changed from uint to int for a type called UIntArray:
Type Changed: Kotlin.UIntArray
Removed methods:
public static uint Get (int[] _this, int index);
public static void Set (int[] _this, int index, uint value);Added methods:
public static int Get (int[] arg0, int index);
public static void Set (int[] arg0, int index, int value);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.
Seems like API was changed:
Type Changed: Kotlin.UByteArray
Removed methods:
public static byte Get (byte[] _this, int index);
public static void Set (byte[] _this, int index, byte value);
public virtual int Size ();Decompiled:
public final class UByteArray implements Collection<UByte>, KMappedMarker
{
// removed
public static final byte get-w2LRezQ(final byte[] arg0, final int index) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
return UByte.constructor-impl(arg0[index]);
}
public static final void set-VurrAj0(final byte[] arg0, final int index, final byte value) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
arg0[index] = value;
}
public static int getSize-impl(final byte[] arg0) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
return arg0.length;
}
public int getSize() {
return getSize-impl(this.storage);
}
// removed
}Type Changed: Kotlin.UIntArray
Removed interfaces:
Java.Lang.IIterable
Java.Util.ICollectionRemoved methods:
public static uint Get (int[] _this, int index);
public static void Set (int[] _this, int index, uint value);
public virtual int Size ();Decompiled:
public final class UIntArray implements Collection<UInt>, KMappedMarker
{
// removed
public static final int get-pVg5ArA(final int[] arg0, final int index) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
return UInt.constructor-impl(arg0[index]);
}
public static final void set-VXSXFK8(final int[] arg0, final int index, final int value) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
arg0[index] = value;
}
// removed
}Type Changed: Kotlin.ULongArray
Removed methods:
public static ulong Get (long[] _this, int index);
public static void Set (long[] _this, int index, ulong value);
public virtual int Size ();Decompiled:
public final class ULongArray implements Collection<ULong>, KMappedMarker
{
// removed
public static final long get-s-VKNKU(final long[] arg0, final int index) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
return ULong.constructor-impl(arg0[index]);
}
public static final void set-k8EXiF4(final long[] arg0, final int index, final long value) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
arg0[index] = value;
}
public static int getSize-impl(final long[] arg0) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
return arg0.length;
}
public int getSize() {
return getSize-impl(this.storage);
}
// removed
}Type Changed: Kotlin.UShortArray
Removed methods:
public static ushort Get (short[] _this, int index);
public static void Set (short[] _this, int index, ushort value);
public virtual int Size ();Decompiled:
public final class UShortArray implements Collection<UShort>, KMappedMarker
{
// removed
public static final short get-Mh2AYeg(final short[] arg0, final int index) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
return UShort.constructor-impl(arg0[index]);
}
public static final void set-01HTLdE(final short[] arg0, final int index, final short value) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
arg0[index] = value;
}
public static int getSize-impl(final short[] arg0) {
Intrinsics.checkNotNullParameter(arg0, "arg0");
return arg0.length;
}
public int getSize() {
return getSize-impl(this.storage);
}
// removed
}
config.json
Outdated
| "artifactId": "activity", | ||
| "version": "1.3.1", | ||
| "nugetVersion": "1.3.1.2", | ||
| "nugetVersion": "1.3.1.3", |
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.
There's about 20 artifacts that are bumping the nugetVersion but are not bumping the artifact version, What is this for?
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.
I don't remember. It was begining of December. I might have rebased/merged some change from other PRs
Fixes: #945 Context: dotnet/android-libraries#436 (comment) Consider the following Kotlin function: fun get (index: Int) : UInt { … } When `get` is compiled with Kotlin 1.5, `class-parse` would emit: <method abstract="false" final="true" name="get-pVg5ArA" return="uint" jni-return="I" static="true" visibility="public" jni-signature="([II)I"> <parameter name="$this" type="int[]" jni-type="[I" /> <parameter name="index" type="int" jni-type="I" /> </method> However, when `get` is compiled with Kotlin 1.6, `class-parse` sees: <method abstract="false" final="true" name="get-pVg5ArA" return="int" jni-return="I" static="true" visibility="public" jni-signature="([II)I"> <parameter name="arg0" type="int[]" jni-type="[I" /> <parameter name="index" type="int" jni-type="I" /> </method> Note that the name of the first `int[]` parameter changes from `$this` to `arg0`, and the return type changed from `uint` to `int`. The parameter name change is annoying; the return type change is an ABI break, and makes many package updates impossible. What happened? Recall commit 71afce5: Kotlin-compiled `.class` files contain a `kotlin.Metadata` type-level annotation blob, which contains a Protobuf stream containing Kotlin metadata for the type. The `kotlin.Metadata` annotation contains information about Kotlin functions, and `class-parse` needs to associate the information about the Kotlin functions to Java methods. This can be tricky because there is not an explicit way to do this, and one must rely on trying to match function names and parameter types. Previously, this was accomplished by looping through the parameters and comparing types. However, the `kotlin.Metadata` annotation only includes "user created" method parameters, while the Java method may include "compiler created" method parameters. We attempted to skip these by ignoring Java parameters whose names begin with a dollar sign (ex `$this`). This "worked" most of the time. This broke in Kotlin 1.6, as the compiler generated method parameters stopped using `$` for compiler-generated parameter names. algorithm. We need something better. The `kKotlin.Metadata` annotation provides a `JvmSignature` property -- which matches the `JvmName` property which we already use -- which sounds promising. However, `JvmSignature` is sometimes `null`, and sometimes it doesn't actually match. But it's closer. So now we try to match with signatures. * If `JvmSignature` matches the Java signature we use that. * If `JvmSignature` is `null`, calculate it from the Kotlin parameters and try to match with that. * Note it wants unsigned types as `Lkotlin/UInt;` and not the primitive encoding (`I`). * If Kotlin metadata defines a `ReceiverType`, add that as the first parameter to the signature. Using `kotlin-stdlib-1.5.31.jar` as a baseline, we get much better results: | Version | Matched Functions | Unmatched Functions | | --------------- | ----------------: | --------------------: | | main @ 32635fd | 946 | 154 | | This PR | 1100 | 0 | Now that we can match Kotlin functions to Java methods, we still have to match up the parameters so we can apply parameter-level transforms. Do this by removing Java method parameters from the front and back of the list to account for cases where the compiler adds "hidden" parameters: * Remove Kotlin `ReceiverType` from beginning of list. * Remove Kotlin `Lkotlin/coroutines/Continuation;` from end of list. * Note this _could_ be a legitimate user supplied parameter so we try to restrict it to "unnamed" parameters. * Remove the `this` parameter added to `static` functions. Note: the test classes `DeepRecursiveKt.class`, `DeepRecursiveScope.class`, and `UByteArray.class` are pulled from [`kotlin-stdlib-1.5.31.jar`][0]. [0]: https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib/1.5.31
Updated aritfact bindings
androidx.annotation:annotation - 1.2.0 -> 1.3.0
Xamarin.AndroidX.Annotation
androidx.collection:collection - 1.1.0 -> 1.2.0
Xamarin.AndroidX.Collection
androidx.collection:collection-ktx - 1.1.0 -> 1.2.0
Xamarin.AndroidX.Collection.Ktx
diff.md
breaking.md
androidx.compose.animation:animation - 1.0.0 -> 1.0.5
androidx.compose.animation:animation-core - 1.0.0 -> 1.0.5
androidx.compose.foundation:foundation - 1.0.0 -> 1.0.5
androidx.compose.foundation:foundation-layout - 1.0.0 -> 1.0.5
androidx.compose.material:material - 1.0.0 -> 1.0.5
androidx.compose.material:material-icons-core - 1.0.0 -> 1.0.5
androidx.compose.material:material-icons-extended - 1.0.0 -> 1.0.5
androidx.compose.material:material-ripple - 1.0.0 -> 1.0.5
androidx.compose.runtime:runtime - 1.0.0 -> 1.0.5
androidx.compose.runtime:runtime-livedata - 1.0.0 -> 1.0.5
androidx.compose.runtime:runtime-rxjava2 - 1.0.0 -> 1.0.5
androidx.compose.runtime:runtime-saveable - 1.0.0 -> 1.0.5
androidx.compose.ui:ui - 1.0.0 -> 1.0.5
androidx.compose.ui:ui-geometry - 1.0.0 -> 1.0.5
androidx.compose.ui:ui-graphics - 1.0.0 -> 1.0.5
androidx.compose.ui:ui-text - 1.0.0 -> 1.0.5
androidx.compose.ui:ui-unit - 1.0.0 -> 1.0.5
androidx.compose.ui:ui-util - 1.0.0 -> 1.0.5
androidx.compose.ui:ui-viewbinding - 1.0.0 -> 1.0.5
androidx.constraintlayout:constraintlayout - 2.1.1 -> 2.1.2
Xamarin.AndroidX.ConstraintLayout
diff.md
breaking.md
androidx.constraintlayout:constraintlayout-core - 1.0.1 -> 1.0.2
androidx.emoji2:emoji2 - -> 1.0.0
androidx.emoji2.emoji2
Xamarin.AndroidX.Emoji2
diff.md
breaking.md
androidx.emoji2:emoji2-views-helper - -> 1.0.0
Xamarin.AndroidX.Emoji2.ViewsHelper
diff.md
breaking.md
androidx.resourceinspection:resource-inspection-annotation - -> 1.0.0
androidx.lifecycle:lifecycle-common - 2.3.1 -> 2.4.0
Xamarin.AndroidX.Lifecycle.Common
androidx.lifecycle:lifecycle-common-java8 - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-livedata - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-livedata-core - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-livedata-core-ktx - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-livedata-ktx - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-process - 2.3.1 -> 2.4.0
Xamarin.AndroidX.Lifecycle.Process
diff.md
breaking.md
androidx.lifecycle:lifecycle-reactivestreams - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-reactivestreams-ktx - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-runtime - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-runtime-ktx - 2.3.1 -> 2.4.0
androidx.lifecycle.lifecycle-runtime-ktx
Xamarin.AndroidX.Lifecycle.Runtime.Ktx
androidx.lifecycle:lifecycle-service - 2.3.1 -> 2.4.0
androidx.lifecycle:lifecycle-viewmodel - 2.3.1 -> 2.4.0
androidx.lifecycle.lifecycle-viewmodel
Xamarin.AndroidX.Lifecycle.ViewModel
diff.md
breaking.md
androidx.lifecycle:lifecycle-viewmodel-ktx - 2.3.1 -> 2.4.0
Xamarin.AndroidX.Lifecycle.ViewModel.Ktx
diff.md
breaking.md
androidx.lifecycle:lifecycle-viewmodel-savedstate - 2.3.1 -> 2.4.0
androidx.lifecycle.lifecycle-viewmodel-savedstate
Xamarin.AndroidX.Lifecycle.ViewModelSavedState
androidx.paging:paging-common - 3.0.1 -> 3.1.0
Xamarin.AndroidX.Paging.Common
diff.md
breaking.md
androidx.paging:paging-common-ktx - 3.0.1 -> 3.1.0
androidx.paging:paging-runtime - 3.0.1 -> 3.1.0
androidx.paging.paging-runtime
Xamarin.AndroidX.Paging.Runtime
androidx.paging:paging-runtime-ktx - 3.0.1 -> 3.1.0
androidx.paging:paging-rxjava2 - 3.0.1 -> 3.1.0
androidx.paging:paging-rxjava2-ktx - 3.0.1 -> 3.1.0
androidx.profileinstaller:profileinstaller - 1.0.0 -> 1.0.4
androidx.profileinstaller.profileinstaller
Xamarin.AndroidX.ProfileInstaller.ProfileInstaller
diff.md
breaking.md
androidx.work:work-runtime - 2.7.0 -> 2.7.1
Xamarin.AndroidX.Work.Runtime
androidx.work:work-runtime-ktx - 2.7.0 -> 2.7.1
io.reactivex.rxjava3:rxjava - 3.1.2 -> 3.1.3
org.jetbrains:annotations - 22.0.0 -> 23.0.0
Xamarin.Jetbrains.Annotations
Changed but not updated
androidx.appcompat.appcompat
Xamarin.AndroidX.AppCompat
diff.md
breaking.md
androidx.biometric.biometric
Xamarin.AndroidX.Biometric
androidx.core.core
Xamarin.AndroidX.Core
androidx.leanback.leanback
Xamarin.AndroidX.Leanback
diff.md
breaking.md
androidx.recyclerview.recyclerview
Xamarin.AndroidX.RecyclerView
androidx.resourceinspection.resourceinspection-annotation
Xamarin.AndroidX.ResourceInspection.Annotation
diff.md
breaking.md
androidx.security.security-crypto
Xamarin.AndroidX.Security.SecurityCrypto
diff.md
breaking.md
androidx.webkit.webkit
Xamarin.AndroidX.WebKit
androidx.window.window
Xamarin.AndroidX.Window
diff.md
breaking.md
androidx.window.window-java
Xamarin.AndroidX.Window.WindowJava
diff.md
breaking.md
com.google.android.material.material
Xamarin.Google.Android.Material
diff.md
breaking.md
com.google.code.gson.gson
GoogleGson
com.google.crypto.tink.tink-android
Xamarin.Google.Crypto.Tink.Android
diff.md
breaking.md
io.reactivex.rxjava2.rxjava
Xamarin.Android.ReactiveX.RxJava
diff.md
breaking.md
org.jetbrains.kotlin.kotlin-stdlib
Xamarin.Kotlin.StdLib
diff.md
breaking.md
org.reactivestreams.reactive-streams
Xamarin.Android.ReactiveStreams