Move S.Buffers and S.IO sources shared with corert into shared folder#9778
Conversation
| /// <summary>Prevents other processes from reading from or writing to the FileStream.</summary> | ||
| /// <param name="position">The beginning of the range to lock.</param> | ||
| /// <param name="length">The range to be locked.</param> | ||
| private void LockInternal(long position, long length) |
There was a problem hiding this comment.
Do we need this back? I though it got stripped because of it was not used anywhere.
There was a problem hiding this comment.
These are in the corert sources. I assume they are still used in corert. If they aren't I will remove.
There was a problem hiding this comment.
Actually, looks like incorrectly resolved conflict with #9769
| /// <summary> | ||
| /// Converts, resetting it, the last Win32 error into a corresponding <see cref="Exception"/> object, optionally | ||
| /// including the specified path in the error message. | ||
| /// </summary> |
| <MscorlibSources Include="$(MSBuildThisFileDirectory)\System\IO\FileStream.cs"/> | ||
| <MscorlibSources Include="$(MSBuildThisFileDirectory)\System\IO\Path.cs"/> | ||
| <MscorlibSources Include="$(MSBuildThisFileDirectory)\System\IO\PathInternal.cs"/> | ||
| <!--<MscorlibSources Include="$(MSBuildThisFileDirectory)\Microsoft\Win32\SafeHandles\SafeThreadPoolIOHandle.cs"/>--> |
There was a problem hiding this comment.
This file should be deleted instead since it is not used in CoreCLR. Looks like it was added to CoreCLR by accident.
| <TargetsOSX Condition="'$(TargetsOSX)' != 'true'">false</TargetsOSX> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <MscorlibSources Include="$(MSBuildThisFileDirectory)\System\Buffers\*.cs"/> |
There was a problem hiding this comment.
It would be nice to keep all files listed explicitly.
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <MscorlibSources Include="$(MSBuildThisFileDirectory)\System\Buffers\*.cs"/> | ||
| <MscorlibSources Include="$(MSBuildThisFileDirectory)\System\IO\Error.cs"/> |
There was a problem hiding this comment.
Can we not call it mscorlibSources because of it is not mscorlib anymore? The regular <Compile Include=... /> maybe best because of it is likely work the best with tooling.
There was a problem hiding this comment.
I was unsure if the MscorlibSources item was treated specially. If that isn't the case then I will just make these Compile items.
| } | ||
|
|
||
| /// <summary> | ||
| /// Returns true if the path is too long |
There was a problem hiding this comment.
I do not think we need any of these changes. They are unused code that was deleted in the CoreCLR version. The cleanup should be propagated to the CoreRT copy instead.
| [Pure] | ||
| internal static class Error | ||
| { | ||
| internal static Exception GetStreamIsClosed() |
There was a problem hiding this comment.
This one is good. It is not used in CoreCLR right now, but it will be later once we get more files in sync.
| /// <summary> | ||
| /// Returns a Win32 error code for the specified HRESULT if it came from FACILITY_WIN32 | ||
| /// If not, returns the HRESULT unchanged | ||
| /// </summary> |
| /// <summary> | ||
| /// Returns true if the given StringBuilder starts with the given value. | ||
| /// </summary> | ||
| /// <param name="value">The string to compare against the start of the StringBuilder.</param> |
There was a problem hiding this comment.
The changes in this file should be also undone.
|
@dotnet-bot test Windows_NT arm Cross Release Build please |
1710620 to
339e3bf
Compare
This is the first set of changes to move common sources shared with corert into a shared folder.