-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove libraries folders that don't have src/*.cs files #78978
Comments
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsBased on a conversation on https://github.com/dotnet/runtime/pull/78935/files#r1035029354. It would be nice if we could remove folders that don't generate implementation assemblies because their types were moved to another assembly for unification. If I browse through Is it possible to remove more folders from libraries in a similar way? In case of being possible we could be able to potentially remove all these folders (at least from the ones owned by my area pod):
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsBased on a conversation on https://github.com/dotnet/runtime/pull/78935/files#r1035029354. It would be nice if we could remove folders that don't generate implementation assemblies because their types were moved to another assembly for unification. If I browse through Is it possible to remove more folders from libraries in a similar way? In case of being possible we could be able to potentially remove all these folders (at least from the ones owned by my area pod):
|
All of these assemblies were collapsed in to |
Yes, I'm asking if there's a better way to make type forwarding and why there's no ref project/source for System.IO.Compression.FileSystem.dll. If there's no other way, we are meant to keep forever folders of old assemblies whose types were shifted. That may not be a bad thing but it will keep piling-up over the time. |
These assemblies are .NETFramework/.NETStandard shims and are still live built but hidden in a subdirectory under src/libraries/shims.
We need to keep both the reference and the source assembly building as the ref is exposed in the targeting pack and the lib is part of the runtime pack / shared framework. Removing either one is a breaking change. In general, it would be possible to move these into a subdirectory to hide them but that would require infrastructure adjustments. |
With c0cca33, it should now be relatively straightforward to move pure facade libraries (typeforwards in both ref and src) under src/libraries/shims. When doing that, the tests should be moved to the location that the type forwards point to. @jozkee feel free to start with https://github.com/dotnet/runtime/tree/main/src/libraries/System.IO.FileSystem.Primitives. For that, you would just need to do the following:
If that works well, we can move the other shim projects into there as well. Please let me know if the steps above work for you. |
This issue has been marked |
This issue has been automatically marked |
This issue will now be closed since it had been marked |
@jozkee @bartonjs @adamsitnik is there anything else that you need from the libraries infrastructure team to make this change? Assuming there isn't any infrastructure work needed, should we break this down into smaller issues for the different area owners? |
Let me reopen the issue as I had some time over the weekend to look into this further. The complete list of full facade assemblies (assemblies that only contain type forwards) is: System.AppContext All of those should be moved into src/libraries/shims. Some of these typeforward to different assemblies between src and ref but for the ones that typeforward to the same assembly, we only need one assembly (means merging ref and src). I started working on this, here's my draft: #89184 |
Fixes #78978 1. Move all full facade assemblies (which only contain type forwards) into src/libraries/shims. 2. Merge assemblies (ref+src) which typeforward to the same destination. 3. They inherently now don't produce a documentation file anymore (as shims only contain type forwards). This minimizes the build graph (makes the libs build faster) and moves the focus away from full facade assemblies that need to be kept for compat reasons.
* Move full facade assemblies into src/libraries/shims Fixes #78978 1. Move all full facade assemblies (which only contain type forwards) into src/libraries/shims. 2. Merge assemblies (ref+src) which typeforward to the same destination. 3. They inherently now don't produce a documentation file anymore (as shims only contain type forwards). This minimizes the build graph (makes the libs build faster) and moves the focus away from full facade assemblies that need to be kept for compat reasons. * Trigger CI for all legs * Remove obsolete slns and undo CI change * PR feedback from Eric * Change System.ValueTuple type fowrard dest * Collapse ref and src shims further As discussed with Eric offline, typeforwarding to System.Runtime and System.Xml.ReaderWriter makes it possible to collapse the following ref and src projects into just src: System.AppContext System.Buffers System.Diagnostics.Debug System.Diagnostics.Tools System.Globalization System.Globalization.Calendars System.IO.UnmanagedMemoryStream System.Reflection System.Resources.ResourceManager System.Runtime.CompilerServices.Unsafe System.Runtime.Extensions System.Security.Principal System.Text.Encoding System.Threading.Timer System.Xml.XmlDocument The destination then handles the type fowarding to the private assembly implementation.
Based on a conversation on https://github.com/dotnet/runtime/pull/78935/files#r1035029354.
It would be nice if we could remove folders that don't generate implementation assemblies because their types were moved to another assembly for unification.
If I browse through
C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.0
I can see that there are assemblies that ship with dotnet and don't have a folder or a csproj in our src\libraries. e.g: System.IO.Compression.FileSystem.dll.Is it possible to remove more folders from libraries in a similar way?
In case is not possible, what makes System.IO.Compression.FileSystem.dll special?
In case of being possible we could be able to potentially remove all these folders (at least from the ones owned by my area pod):
The text was updated successfully, but these errors were encountered: