-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fold System.IO.FileSystem into CoreLib #53231
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @carlossanlop Issue Details
|
@jkotas I followed the pattern that you have used for
@jkotas is there any chance that you could take a look at my changes and see what I am doing wrong? |
The difference between Stack and List is miniscule. Both are growable arrays, with just slightly different methods exposed. The use of I think it is ok to move the Queue over. |
I do not know what can be causing this error. It looks like a bug in the GenerateRuntimeGraph msbuild task to me. It shoud be using the live-built assets, but it is using cached assets instead. You may want to do a clean build to make sure that it is a real problem. |
@ViktorHofer @Anipik In this PR I am trying to move
I've verified @jkotas suggestion using a clean build:
and it's true that the msbuild task is using the wrong assets. In my case it's using @ViktorHofer @Anipik do you have any suggestions about how this could be solved (or worked around)? |
src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.cs
Outdated
Show resolved
Hide resolved
@ericstj was the one who brought the task over from arcade into dotnet/runtime so he's the right person to provide an answer. But to give you some more data meanwhile, the failing task isn't expected to run against the live shared framework as it contributes to the build itself. This is similar to msbuild and other tools that we use to build the repository which also run on a last-known-good shipped version of the shared framework (currently 6.0 Preview 3). |
That means these tools should build against the last-known-good shipped references, and not against the live references. |
Exactly. That needs to be fixed as the project currently targets the live references. |
Curious, what's the benefit of moving System.IO.FileSystem down into CoreLib? And more generally asking what are your thoughts about which types belong into CoreLib and which don't? With time, will more and more types move down into CoreLib? I think that has already been happening over the last years? |
Discussed at #53168 (comment)
I think the generalized rule is - when other types in CoreLib need to depend on the type, the type has to be in CoreLib. |
Doesn't that also mean that we will move more and more types down into CoreLib and it becomes an ever growing assembly? Should all low level APIs like FileSystem belong into CoreLib? |
CoreLib is evergrowing assembly because of we have a lot of people adding new APIs to it. I would say that the CoreLib growth from adding new APIs and feature is much higher than the growth from moving things around like in this PR. We have half of the file I/O in CoreLib already, so it does not sound too concerning to move the other half of file I/O there too, especially since it reduces duplication. If we started to move e.g. the networking stack (that is also low-level API for some definition of low-level) to CoreLib, I would be more concerned. |
src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Unix.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise. Thanks!
Given that System.IO.FileSystem only contains type forwards now, should we also remove the references to it in projects that target BTW is it actually expected that the typedefs moved from System.IO.FileSystem to System.Runtime and that the former now only contains type forwards? I'm seeing issues when referencing both assemblies at the same time as the types are overlapping. |
cc @ericstj |
We cannot. It would break references to existing packages that still reference System.IO.FileSystem. (Note that we have quite refererence .dlls in netcoreapp that only contain forwarders.)
If you are seeing conflicting types, I think you are using inconsistent set of references - some are from live netcoreapp6 and some are from older netcoreapp. |
This was because of a non clean build 🤦 - sorry. |
Contributes to #2138