Skip to content

Commit

Permalink
Initial pass at enabling prebuilt detection (#67645)
Browse files Browse the repository at this point in the history
* Initial pass at enabling prebuilt detection
- Add exclusions for some SBRPs that will be required
- Update sbrp and source-build-externals
- CPD the sourcelink and xliff tasks dependencies to avoid getting out of sync with arcade
- Upgrade a few dependencies from 5.0.0 to 6.0.0/7.0.0 where I felt it may be safe.
- Gate ManagementObject use on IsOSPlatform(Windows)
  • Loading branch information
mmitche committed Apr 21, 2023
1 parent 94abcab commit 7c82cb8
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 15 deletions.
3 changes: 2 additions & 1 deletion NuGet.config
Expand Up @@ -7,8 +7,9 @@
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
<add key="dotnet7-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json" />
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
<add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="nuget-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
Expand Down
17 changes: 16 additions & 1 deletion eng/SourceBuildPrebuiltBaseline.xml
@@ -1,5 +1,20 @@
<UsageData>
<IgnorePatterns>
<UsagePattern IdentityGlob="*/*" />
<UsagePattern IdentityGlob="Microsoft.SourceBuild.Intermediate.*/*" />

<!-- These are cases where the component chooses, when built in isolation, to
remain dependent on stable versions. These versions may not have source build intermediates associated with them.
They cannot be source build reference packages because they actually provide functionality. In full source build, these versions are
overridden by previous repo outputs or come from previously source-built artifacts. -->
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.Analyzers/*" />
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.AnalyzerUtilities/*" />
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.CSharp.CodeStyle/*" />
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.VisualBasic.CodeStyle/*" />
<UsagePattern IdentityGlob="Microsoft.Net.Compilers.Toolset/*" />

<!-- The ref pack versions should be updated to the p3 released versions, along with the SDK. At that
point the 8.0 ref pack prebuilts should go away -->
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/*8.0.0-preview.3.23164.14*" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/*8.0.0-preview.3.23165.3*" />
</IgnorePatterns>
</UsageData>
28 changes: 21 additions & 7 deletions eng/Version.Details.xml
@@ -1,23 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="XliffTasks" Version="1.0.0-beta.21215.1">
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
<Sha>7e80445ee82adbf9a8e6ae601ac5e239d982afaa</Sha>
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="7.0.0-alpha.1.22409.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23203.1">
<Uri>https://github.com/dotnet/source-build-externals</Uri>
<Sha>ee790b0477953dd30ea83e0e47af909a04fd0ca3</Sha>
<Sha>33edde07d61cf7606d76ada765335fb81f1cbb71</Sha>
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23211.4">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>01850f2b7bff23e118d1faecb941d770c8e626f2</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23168.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>b12f035e893c34ec2c965d75f6e21b7a2667e98d</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23165.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
<Sha>b7fb98b199d0b1b6188da4f4bf4f5accddac98d4</Sha>
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.2.0-beta-23165-02" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
<Uri>https://github.com/dotnet/sourcelink</Uri>
<Sha>3f43bf1b2dead2cb51f20dc47f6dfd7981248820</Sha>
<SourceBuild RepoName="sourcelink" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DiaSymReader" Version="1.4.0">
<Uri>https://github.com/dotnet/symreader</Uri>
<Sha>636a10b9d0aa317736c57d95f80e1c0849450715</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.1.0-5.22128.4">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5d10d428050c0d6afef30a072c4ae68776621877</Sha>
Expand Down
7 changes: 3 additions & 4 deletions eng/Versions.props
Expand Up @@ -107,8 +107,8 @@
<MicrosoftDiaSymReaderConverterXmlVersion>1.1.0-beta2-22302-02</MicrosoftDiaSymReaderConverterXmlVersion>
<MicrosoftDiaSymReaderNativeVersion>17.0.0-beta1.21524.1</MicrosoftDiaSymReaderNativeVersion>
<MicrosoftDiaSymReaderPortablePdbVersion>1.7.0-beta-21528-01</MicrosoftDiaSymReaderPortablePdbVersion>
<MicrosoftExtensionsLoggingVersion>5.0.0</MicrosoftExtensionsLoggingVersion>
<MicrosoftExtensionsLoggingConsoleVersion>5.0.0</MicrosoftExtensionsLoggingConsoleVersion>
<MicrosoftExtensionsLoggingVersion>6.0.0</MicrosoftExtensionsLoggingVersion>
<MicrosoftExtensionsLoggingConsoleVersion>6.0.0</MicrosoftExtensionsLoggingConsoleVersion>
<MicrosoftIdentityModelClientsActiveDirectoryVersion>3.13.8</MicrosoftIdentityModelClientsActiveDirectoryVersion>
<MicrosoftInternalPerformanceCodeMarkersDesignTimeVersion>15.8.27812-alpha</MicrosoftInternalPerformanceCodeMarkersDesignTimeVersion>
<MicrosoftInternalVisualStudioInteropVersion>$(MicrosoftVisualStudioShellPackagesVersion)</MicrosoftInternalVisualStudioInteropVersion>
Expand All @@ -117,7 +117,6 @@
<MicrosoftMetadataVisualizerVersion>1.0.0-beta3.21075.2</MicrosoftMetadataVisualizerVersion>
<MicrosoftNETBuildExtensionsVersion>2.2.101</MicrosoftNETBuildExtensionsVersion>
<MicrosoftNETCorePlatformsVersion>5.0.0</MicrosoftNETCorePlatformsVersion>
<MicrosoftNETCoreAppRefVersion>5.0.0</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETFrameworkReferenceAssembliesnet461Version>1.0.0</MicrosoftNETFrameworkReferenceAssembliesnet461Version>
<MicrosoftNETFrameworkReferenceAssembliesnet451Version>1.0.0</MicrosoftNETFrameworkReferenceAssembliesnet451Version>
<MicrosoftNETFrameworkReferenceAssembliesnet40Version>1.0.0</MicrosoftNETFrameworkReferenceAssembliesnet40Version>
Expand Down Expand Up @@ -243,7 +242,7 @@
<SystemIOFileSystemPrimitivesVersion>4.3.0</SystemIOFileSystemPrimitivesVersion>
<SystemIOPipesAccessControlVersion>5.0.0</SystemIOPipesAccessControlVersion>
<SystemIOPipelinesVersion>7.0.0</SystemIOPipelinesVersion>
<SystemManagementVersion>5.0.0-preview.8.20407.11</SystemManagementVersion>
<SystemManagementVersion>7.0.0</SystemManagementVersion>
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
<SystemResourcesExtensionsVersion>7.0.0</SystemResourcesExtensionsVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/Tools/BuildValidator/DemoLogger.cs
Expand Up @@ -39,7 +39,7 @@ public IDisposable BeginScope<TState>(TState state)

public bool IsEnabled(LogLevel logLevel) => true;

public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
=> LogCore(formatter(state, exception));

private void LogCore(string? message)
Expand Down Expand Up @@ -70,7 +70,7 @@ public void Dispose()

public bool IsEnabled(LogLevel logLevel) => false;

public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
{
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/Tools/Source/RunTests/ProcessUtil.cs
Expand Up @@ -17,6 +17,12 @@ internal static class ProcessUtil
{
internal static int? TryGetParentProcessId(Process p)
{
// System.Management is not supported outside of Windows.
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return null;
}

try
{
ManagementObject mo = new ManagementObject("win32_process.handle='" + p.Id + "'");
Expand Down

0 comments on commit 7c82cb8

Please sign in to comment.