Xamarin-macios: Dependencies on Mono class libraries not present in dotnet/runtime

Created on 17 Feb 2020  路  9Comments  路  Source: xamarin/xamarin-macios

When running on .NET 5 runtime with the new class libraries the following dependencies are currently not available:

Additionally, the version returned by Mono.Runtime.GetDisplayName() may no longer be relevant.

Related to #7528.

enhancement iOS macOS

Most helpful comment

The ThreadPool issue is filed.

SystemDependencyProvider is no longer necessary with the new BCL. The certificate APIs work just fine.

One thing I forgot about is that the HttpClient handlers may behave differently. I only checked it on macOS where the managed code was used by default and worked properly. It may be an issue on iOS though.

All 9 comments

Mostly FYI @rolfbjarne of possible implementation details noted by our community

Some of the previous SetDispatcher discussion is here: https://github.com/mono/mono/pull/17387#issuecomment-545540303

I don't think there's an issue open in dotnet/runtime about bringing (some form of) SetDispatcher back.

I don't think there's an issue open in dotnet/runtime about bringing (some form of) SetDispatcher back.

No issue for that yet. I'll bring it up.

The work to clean up the binding to build against pure netcore API has not been done so the bindings still depend on some APIs not available on netcore

SystemDependencyProvider looks like some indirection that @baulig added to help corlib and System reference each other to get at the system cert store (I think).

So I think there are two possibilities (maybe Martin can correct me if I'm wrong):

  1. This isn't needed in .NET 5 because there's some other mechanism to integrate the system cert store into the runtime
  2. There's no such support in .NET 5 at all and work would need to be done on the .NET 5 libraries side.

The ThreadPool issue is filed.

SystemDependencyProvider is no longer necessary with the new BCL. The certificate APIs work just fine.

One thing I forgot about is that the HttpClient handlers may behave differently. I only checked it on macOS where the managed code was used by default and worked properly. It may be an issue on iOS though.

The work to clean up the binding to build against pure netcore API has not been done so the bindings still depend on some APIs not available on netcore

I am aware of that. I've been building Xamarin myself with the problematic code patched out. I thought it may be useful to open an issue to give a perspective on the scope of the work necessary.

SystemDependencyProvider looks like some indirection that @baulig added to help corlib and System reference each other to get at the system cert store (I think).

The sole purpose of this class is to inject APIs that reside in System.dll into corlib.dll, to allow code in corlib to access some of the crypto and certificate code that resides in System.dll.

I believe that we can simply short-circuit this for .NET 5 - remove that entire class (and it's implementations) completely and use the relevant APIs correctly.

This has been largely addressed by #8070. Remaining pieces are marked as NET_TODO in the source code and/or tracked in individual issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelstonis picture michaelstonis  路  3Comments

wcoder picture wcoder  路  3Comments

therealjohn picture therealjohn  路  3Comments

whitneyschmidt picture whitneyschmidt  路  3Comments

sharmashiv picture sharmashiv  路  4Comments