dotnet/runtime

Facades and NotSupported assemblies are bloated with resources they don't use

Open

#28.888 geöffnet am 6. März 2019

Auf GitHub ansehen
 (9 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)C# (5.445 Forks)batch import
area-Infrastructure-librariesenhancementhelp wanted

Repository-Metriken

Stars
 (17.886 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)

Beschreibung

Often times we have builds that cross-compile and have very different implementations. Our resource conventions don't force folks to think about this, so the resources are often a superset of all configurations.

We should change the defaults so that this isn't the case.

I propose the following:

  1. By default PartialFacades should not include any resources, unless a project opts-in. Folks should discover this relatively easily as SR.Foo will fail to work in the partial source. They can fix it by setting a flag and potentially providing specific resources for that build of the library.
  2. By default NotSupported assemblies require a unique resx. We can change the path convention to something like Resources\NotSupported.resx instead of strings.resx

Across all our builds this will save over a MB of unused resources.

Contributor Guide