Skip to content

Conversation

@jonpryor
Copy link
Contributor

Context: dotnet/android#3393
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3247796&view=ms.vss-test-web.build-test-results-tab&runId=9790200&resultId=100160&paneView=debug

In attempting to get Xamarin.Android to run the full compliement of
Java.Interop unit tests, there is one set of tests which are still
failing: the JavaPrimitiveArrayContract.Constructor_Exceptions()
tests fail because the linker is executed, and the linker is
removing the constructors which Constructor_Exceptions() relies on.

Make JavaPrimitiveArrayContract linker-safe, and instead of using
System.Type.GetConstructor() to get the constructor, introduce new
abstract methods on JavaPrimitiveArrayContract.CreateCollection()
which create instances of the appropriate type, using the appropriate
constructor.

This is more "linker friendly", as the linker can "see" that the
constructors are used, which in turn should allow the tests to pass.

Context: dotnet/android#3393
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3247796&view=ms.vss-test-web.build-test-results-tab&runId=9790200&resultId=100160&paneView=debug

In attempting to get Xamarin.Android to run the full compliement of
Java.Interop unit tests, there is one set of tests which are still
failing: the `JavaPrimitiveArrayContract.Constructor_Exceptions()`
tests fail because the *linker* is executed, and the linker is
removing the constructors which `Constructor_Exceptions()` relies on.

Make `JavaPrimitiveArrayContract` linker-safe, and instead of using
`System.Type.GetConstructor()` to get the constructor, introduce new
`abstract` methods on `JavaPrimitiveArrayContract.CreateCollection()`
which create instances of the appropriate type, using the appropriate
constructor.

This is more "linker friendly", as the linker can "see" that the
constructors are used, which in turn should allow the tests to pass.
@jpobst jpobst merged commit 166a6c9 into dotnet:master Nov 19, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants