Add TypeForwards for Xamarin.AndroidX.Collection
.
#863
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.
Fixes: #821
Fixes: #807
In version
1.3.0
, Google moved all the types inXamarin.AndroidX.Collection
toXamarin.AndroidX.Collection.Jvm
. While this is a source compatible change for users, it is not a binary compatible change for users that are relying on NuGets or assemblies that have not been recompiled.These types will continue to work in Debug builds, but the linker and AOT compiler steps run for Release builds are unable to resolve the moved types, causing unfixable errors (other than recompiling all assemblies).
Adding
[TypeForwardedToAttribute]
attributes allows the linker and AOT to succeed without recompiling old assemblies.Note this does not imply that we have tooling that can automatically detect these cases or that we will be proactive about adding type forwards, but we can manually add reported instances that are problematic like this one.