-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Conversation
@jkotas PTAL at 80b0751 If any of you can sanity check the other commits that would be great, too. Thanks! |
If we re-enable this, what is our plan going to be with getting .NET Core API changes through? cc @joshfree |
{ | ||
internal static partial class NameResolutionPal | ||
{ | ||
|
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.
Nit: extra lines
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.
Fixed
return false; | ||
|
||
// We can't just check that 'GetAddrInfoEx' exists, because it existed before supporting overlapped. | ||
// The existance of 'GetAddrInfoExCancel' indicates that overlapped is supported. |
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.
nit: typo existance
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.
Fixed
{ | ||
internal static partial class NameResolutionPal | ||
{ | ||
|
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.
nit: extra line
/// Adds the extended path prefix (\\?\) if not already a device path, IF the path is not relative, | ||
/// AND the path is more than 259 characters. (> MAX_PATH + null) | ||
/// </summary> | ||
internal static string EnsureExtendedPrefixOverMaxPath(string path) |
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.
cc @JeremyKuhne, PTAL
/// Adds the extended path prefix (\\?\) if not already a device path, IF the path is not relative, | ||
/// AND the path is more than 259 characters. (> MAX_PATH + null) | ||
/// </summary> | ||
internal static string EnsureExtendedPrefixOverMaxPath(string path) |
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.
What API did this get added for? I specifically updated to do this below to put the prefix on with trailing spaces & periods to fix handling those paths.
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.
C:\git\corefx\src\Common\src\Interop\Windows\kernel32\Interop.CreateFile2.cs(95,39): error CS0117: 'PathInternal' does not contain a definition for 'EnsureExtendedPrefixOverMaxPath' [C:\git\corefx\src\System.IO.FileSystem.Watcher\src\System.IO.FileSystem.Watcher.csproj]
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.
Thanks- please change that to the method below and remove this method.
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.
@JeremyKuhne Ok, so to confirm, I'll replace the call to EnsureExtendedPrefixOverMaxPath
in Interop.CreateFile2.cs with a call to EnsureExtendedPrefixIfNeeded
?
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.
Need to know what the EnsureExtendedPrefixOverMaxPath got added for to make sure we're not regressing a fix.
@@ -54,6 +54,8 @@ | |||
</ItemGroup> | |||
<ItemGroup Condition=" '$(TargetsWindows)' == 'true'"> | |||
<Compile Include="System\Net\NameResolutionPal.Windows.cs" /> | |||
<Compile Include="System\Net\NameResolutionPal.Windows.NetCoreApp.cs" Condition="'$(TargetGroup)' != 'uap'"/> |
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.
We typically use Win32.cs suffix for these.
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.
So .Win32.cs and .Uap.cs suffixes then?
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.
I think so. Here is example of prior art:
ProcessStartInfo.Uap.cs
ProcessStartInfo.Unix.cs
ProcessStartInfo.Win32.cs
ProcessStartInfo.Windows.cs
@@ -132,7 +134,7 @@ | |||
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.GetProcAddress.cs"> |
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.
Exclude this one for Uap as well?
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.
Done
@@ -54,6 +54,8 @@ | |||
</ItemGroup> | |||
<ItemGroup Condition=" '$(TargetsWindows)' == 'true'"> | |||
<Compile Include="System\Net\NameResolutionPal.Windows.cs" /> | |||
<Compile Include="System\Net\NameResolutionPal.Windows.Win32.cs" Condition="'$(TargetGroup)' != 'uap'"/> |
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.
Nit: There is no file with Windows.Win32.cs
suffix today. Everything is using just .Win32.cs
.
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.
Fixed
@@ -0,0 +1,96 @@ | |||
// Licensed to the .NET Foundation under one or more agreements. | |||
// The .NET Foundation licenses this file to you under the MIT license. | |||
// See the LICENSE file in the project root for more information. |
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.
Can we just add this to API compat baseline instead of adding the whole implementation back?
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.
This failure is in GenFacades, not APICompat. So I believe not?
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.
<GenFacadesIgnoreMissingTypes Condition="'$(TargetGroup)'=='uapaot'">true</GenFacadesIgnoreMissingTypes>
Used in number of places already.
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.
Perfect - thanks!
@@ -23,7 +23,11 @@ public static partial class ThreadPool | |||
public static void GetMinThreads(out int workerThreads, out int completionPortThreads) { throw null; } | |||
public static bool QueueUserWorkItem(System.Threading.WaitCallback callBack) { throw null; } | |||
public static bool QueueUserWorkItem(System.Threading.WaitCallback callBack, object state) { throw null; } | |||
#if uap |
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.
Just add it to the API compat baseline instead of adding ifdefs?
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.
Yep that worked great.
@@ -10,6 +10,7 @@ | |||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Release|AnyCPU'" /> | |||
<ItemGroup> | |||
<Compile Include="System.Net.Http.cs" /> | |||
<Compile Include="System.Net.Http.Win32.cs" Condition="'$(TargetGroup)' != 'uap'" /> |
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.
This is not Win32.cs
specific. It is for both Windows and Unix. I think the original name would be fine. Or ifdef in the ref file would be fine too, I think. We have multiple other places with itdefs in ref files.
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.
I'll switch this to be #if uap
@@ -214,6 +215,7 @@ | |||
</PropertyGroup> | |||
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' "> | |||
<Compile Include="System\Net\Http\HttpClientHandler.Core.cs" /> | |||
<Compile Include="System\Net\Http\HttpClientHandler.Win32.cs" /> |
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.
It looks weird to be including Win32.cs file for Unix...
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.
Ok I'm going to just go with .NetCoreApp.cs for this. We already have .Unix, .Windows, .Core.
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.
Nit: It should be all lowercase netcoreapp.cs to match the convention
{ | ||
internal static partial class NameResolutionPal | ||
{ | ||
private static bool GetAddrInfoExSupportsOverlapped() => false; |
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.
GetAddrInfoEx and GetAddrInfoExCancel are available in UAP no? LoadLibraryEx was used to test for unsupported windows version, but this may not be needed for UAP and it could return true.
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis
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.
Yeah I think you're right. Once I get this checked in I'll verify and flip to true.
Do you plan to do a private Helix run to look at test failures? We were nearly clean on CLR based UWP runs. ProjectN ones had a bunch of brokenness, but it might be worth checking how much it got worse while we were dark. |
Yes, Jose is helping me get one kicked off so we can see what state UAP tests are in. Once the CI is green I hope to merge this since branch churn is busting this a couple times a day this week. |
@@ -129,10 +131,10 @@ | |||
<Compile Include="$(CommonPath)\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs"> |
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.
Should this be under Condition="'$(TargetGroup)' != 'uap'"
as well?
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.
Yes, that doesn't break the build.
<Link>Common\System\Net\ByteOrder.cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' "> | ||
<Compile Include="..\..\src\System\Net\NameResolutionPal.Windows.cs"> | ||
<Link>ProductionCode\System\Net\NameResolutionPal.Windows.cs</Link> | ||
</Compile> | ||
<Compile Include="..\..\src\System\Net\NameResolutionPal.Windows.Uap.cs" Condition="'$(TargetGroup)' == 'uap'"> |
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.
Nit: I think this should be just NameResolutionPal.Uap.cs
to follow the convention
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.
Fixed
With `Vector<T>` now residing in System.Private.CoreLib, directly reference System.Private.Corelib instead of contracts just like netcoreapp does. Add uapaot flavor since System.Private.CoreLib has a different strong name key on that platform.
Add the helper method `System.IO.PathInternal.EnsureExtendedPrefixOverMaxPath` to Common\src\System\IO\PathInternal.Windows.cs. It was previously not visible to UAP since Common\src\CoreLib\System\IO\PathInternal.Windows.cs is not included in UAP compilation.
SocketsHttpHandler is not supported in uap and is currently leaking into UAP builds since they've been disabled for a few weeks. Adjust the contract so it's not available to UAP, and clean the implementation assembly so SocketsHttpHandler internals don't leak out into HttpClientHandler.Core.cs.
`System.Net.NameResolutionPal.GetAddrInfoExSupportsOverlapped` uses LoadLibraryExW which is not compatible with UAP (which only supports LoadLibrary of DLLs within a container). Refactor the helper so UAP returns false.
This reverts commit 120dce4.
This reverts commit 2202b4f.
This reverts commit ef79caf.
- Refactor to remove code duplication in HttpClientHandler.Win32.cs - Suffix non-UAP source files with.Win32.cs instead of NetCoreApp.cs to follow branch convention - Fix spacing
- Baseline the ApiCompat and GenFacades failures in System.Runtime.Extensions and System.Threading.ThreadPool. - Adjust naming of files to match branch conventions
Fix up some configuration issues with uap packaging. The CoreFX.Private.TestUtilities packaging needs updated build tools which can map between uwp6.0 and netstandard2.0. #ifdef out Thread.GetCurrentProcessorId until we get a new System.Private.CoreLib.
- Fix a couple Nits - Fix recent commit breaking UAP
I have a change that was already checked into coreclr that alters some core methods. Does this change mean we now need to wait for a new net native build with those changes before we can update corefx? coreclr and corefx will be inconsistent until that's merged. |
Changes to System.Private.CoreLib? You should be able to baseline / if-def around them (or just disable building the assembly for UAP if it's not easily scoped out) until the same change flows in from net native. |
Yes, in particular to a signature of a virtual method on Stream. |
This change would be really ugly to ifdef. My recommendation would be to disable building of as many projects as necessary to get your change through. |
@@ -27,8 +27,8 @@ def configurations = [ | |||
['TGroup':"netcoreapp", 'Pipeline':osxPipeline, 'Name':'OSX', 'ForPR':"Debug-x64", 'Arch':['x64']], | |||
['TGroup':"netcoreapp", 'Pipeline':winPipeline, 'Name':'Windows' , 'ForPR':"Debug-x64|Release-x86"], | |||
['TGroup':"netfx", 'Pipeline':winPipeline, 'Name':'NETFX', 'ForPR':"Release-x86"], | |||
// ['TGroup':"uap", 'Pipeline':winPipeline, 'Name':'UWP CoreCLR', 'ForPR':"Debug-x64"], | |||
// ['TGroup':"uapaot", 'Pipeline':winPipeline, 'Name':'UWP NETNative', 'ForPR':"Release-x86"], | |||
['TGroup':"uap", 'Pipeline':winPipeline, 'Name':'UWP CoreCLR', 'ForPR':"Debug-x64"], |
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.
We might want to consider not running tests on this leg either, since we know a few will be broken. If we don't do that, we'll have to basically ignore this leg if it fails on a PR.
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.
Right, that's what I have done in #27640
@@ -6,7 +6,7 @@ | |||
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired> | |||
<AllowReferenceFromRuntime>true</AllowReferenceFromRuntime> | |||
<RuntimeProjectFile>$(ProjectDir)\external\test-runtime\XUnit.Runtime.depproj</RuntimeProjectFile> | |||
<PackageTargetFramework>netstandard2.0</PackageTargetFramework> | |||
<PackageTargetFramework>netstandard2.0;$(UAPvNextTFM)</PackageTargetFramework> |
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.
This should get undone before merging to release/2.1 since they are already using the new nuget mappings. I will try to fix this before the merge.
@@ -9,6 +9,7 @@ | |||
<BuildConfigurations> | |||
netcoreapp; | |||
uap; | |||
uapaot; |
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.
This is wrong, why do we want a new configuration if uap and uapaot produce the exact same dll?
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.
Yes, you are right.
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.
Deleted in #27663
@@ -7,7 +7,7 @@ | |||
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile> | |||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||
<IsTargetingNetFx Condition="'$(TargetGroup)'=='netfx' OR '$(TargetGroup)'=='net46'">true</IsTargetingNetFx> | |||
<IsTargetingNetCoreApp Condition="'$(TargetGroup)'=='netcoreapp'">true</IsTargetingNetCoreApp> | |||
<IsTargetingNetCoreApp Condition="'$(TargetGroup)'=='netcoreapp' OR '$(TargetGroup)'=='uap' OR '$(TargetGroup)'=='uapaot'">true</IsTargetingNetCoreApp> |
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.
This doesn't look right. We probably need to change property name.
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.
We use netcoreapp to netcoreapp+uap+uapaot in many places. Yes, it is confusing, but one more place does not really make a difference.
@@ -7,6 +7,7 @@ | |||
net46; | |||
</PackageConfigurations> | |||
<BuildConfigurations> | |||
uapaot-Windows_NT; |
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.
This is wrong I believe, we don't need a uapaot config since the uap config seems to be equivalent.
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.
It is not equivalent.
* Build uapaot System.Numerics.Vectors With `Vector<T>` now residing in System.Private.CoreLib, directly reference System.Private.Corelib instead of contracts just like netcoreapp does. Add uapaot flavor since System.Private.CoreLib has a different strong name key on that platform. * Make EnsureExtendedPrefixOverMaxPath available to UAP Add the helper method `System.IO.PathInternal.EnsureExtendedPrefixOverMaxPath` to Common\src\System\IO\PathInternal.Windows.cs. It was previously not visible to UAP since Common\src\CoreLib\System\IO\PathInternal.Windows.cs is not included in UAP compilation. * Keep SocketsHttpHandler out of UAP builds SocketsHttpHandler is not supported in uap and is currently leaking into UAP builds since they've been disabled for a few weeks. Adjust the contract so it's not available to UAP, and clean the implementation assembly so SocketsHttpHandler internals don't leak out into HttpClientHandler.Core.cs. * Fix GetAddrInfoExSupportsOverlapped UAP build break `System.Net.NameResolutionPal.GetAddrInfoExSupportsOverlapped` uses LoadLibraryExW which is not compatible with UAP (which only supports LoadLibrary of DLLs within a container). Refactor the helper so UAP returns false. * Revert "Disable UAP legs per dotnet/corefx#26802 (dotnet/corefx#26822)" This reverts commit dotnet/corefx@120dce4. * Revert "Disable UAP configurations in all configurations build" This reverts commit dotnet/corefx@2202b4f. * Revert "Disable UAP official builds (dotnet/corefx#26871)" This reverts commit dotnet/corefx@ef79caf. - Baseline the ApiCompat and GenFacades failures in System.Runtime.Extensions and System.Threading.ThreadPool. - Adjust naming of files to match branch conventions - Fix up some configuration issues with uap packaging. The CoreFX.Private.TestUtilities packaging needs updated build tools which can map between uwp6.0 and netstandard2.0. - ifdef out Thread.GetCurrentProcessorId until we get a new System.Private.CoreLib. Commit migrated from dotnet/corefx@c9cdfba
Fixes https://github.com/dotnet/corefx/issues/26802