dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.27k stars 4.73k forks source link

Review NetCoreAppCurrent libraries configurations which are platform specific #53900

Open ViktorHofer opened 3 years ago

ViktorHofer commented 3 years ago

System.Data.Odbc has a big number of platform specific configurations. As those are now shipping as part of https://github.com/dotnet/runtime/pull/53439, it might make sense to review and see if some of these configurations could be collapsed together.

System.Text.Encodings.Web targets a Browser even though it doesn't use any platform specific APIs. Apparently this is so that the linker can trim out Vector128 on browser-wasm: https://github.com/dotnet/runtime/pull/53439#discussion_r643263009. We should see if there's a better way to make this work without the platform specific configuration.

EDIT: In addition to that, we need to make sure that all dependencies from the platform TFMs are represented in the platform agnostic TFM.

cc @ericstj @eerhardt @MichalStrehovsky @marek-safar @ajcvickers

ghost commented 3 years ago

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer See info in area-owners.md if you want to be subscribed.

Issue Details
System.Data.Odbc has a big number of platform specific configurations. As those are now shipping as part of https://github.com/dotnet/runtime/pull/53439, it might make sense to review and see if some of these configurations could be collapsed together. System.Text.Encodings.Web targets a Browser even though it doesn't use any platform specific APIs. Apparently this is so that the linker can trim out Vector128 on browser-wasm: https://github.com/dotnet/runtime/pull/53439#discussion_r643263009. We should see if there's a better way to make this work without the platform specific configuration. There are probably more of these cases and I will add a list of packages to review at a later point. cc @ericstj @eerhardt @MichalStrehovsky @marek-safar @ajcvickers
Author: ViktorHofer
Assignees: -
Labels: `area-Infrastructure-libraries`
Milestone: 6.0.0
eerhardt commented 3 years ago

cc @GrabYourPitchforks for the System.Text.Encodings.Web part as well.

ViktorHofer commented 1 year ago

Here's a list of projects that are packable and multi-target based on the TargetFramework and TargetPlatform, ordered by the number of assemblies in the correspnding package when we ship .NET 8:

eerhardt commented 1 year ago

One library in the list that surprises me is System.Runtime.Caching. It doesn't seem like it should need to be target platform-specific.