-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Move FileStream into System.Runtime #18951
Comments
Ouch. There's no way around that? |
I'm open to ideas but right now there are reflection APIs that have direct dependencies on FileStream as well as plenty of things in CoreLib that need to read files so no matter what we will have a copy of some amount of it in there. |
My comment from other thread: Pretty much any core runtime implementation I can think of needs to access files. I do not think we are getting a lot of positive value by keeping it up stack (except for WinRT - but that can be dealt with in isolation) - if the FileStream is upstack, the core runtime needs to have its own LowLevelFileStream sort of type anyway. Some thoughts on implementation:
|
Of course. And we have the FileStream in coreclr that we use for that purpose, so certainly it'd be nice to consolidate down to a single one. A few concerns:
|
This makes sense to me. The .NET Core stack is likely going to be using ArrayPool more heavily - having it in corelib makes it easier to have private interface with the GC and optimize the pooling strategy. |
Due to various dependencies we need to move FileStream into System.Runtime as well as the implementation into System.Private.CoreLib.
See discussion at dotnet/standard#52
I've started created a proof-of-concept branch that moves just the APIs in the contracts here
weshaggard/corefx@e77e2b3, but the primary work is in the implementation.
cc @ianhays @ericstj @jkotas @stephentoub
The text was updated successfully, but these errors were encountered: