Skip to content

Commit 7c82cb8

Browse files
authored
Initial pass at enabling prebuilt detection (#67645)
* 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)
1 parent 94abcab commit 7c82cb8

6 files changed

Lines changed: 50 additions & 15 deletions

File tree

NuGet.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
88
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
99
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
10-
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
1110
<add key="dotnet7-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json" />
11+
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
12+
<add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" />
1213
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
1314
<add key="nuget-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/nuget-build/nuget/v3/index.json" />
1415
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
<UsageData>
22
<IgnorePatterns>
3-
<UsagePattern IdentityGlob="*/*" />
3+
<UsagePattern IdentityGlob="Microsoft.SourceBuild.Intermediate.*/*" />
4+
5+
<!-- These are cases where the component chooses, when built in isolation, to
6+
remain dependent on stable versions. These versions may not have source build intermediates associated with them.
7+
They cannot be source build reference packages because they actually provide functionality. In full source build, these versions are
8+
overridden by previous repo outputs or come from previously source-built artifacts. -->
9+
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.Analyzers/*" />
10+
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.AnalyzerUtilities/*" />
11+
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.CSharp.CodeStyle/*" />
12+
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.VisualBasic.CodeStyle/*" />
13+
<UsagePattern IdentityGlob="Microsoft.Net.Compilers.Toolset/*" />
14+
15+
<!-- The ref pack versions should be updated to the p3 released versions, along with the SDK. At that
16+
point the 8.0 ref pack prebuilts should go away -->
17+
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/*8.0.0-preview.3.23164.14*" />
18+
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/*8.0.0-preview.3.23165.3*" />
419
</IgnorePatterns>
520
</UsageData>

eng/Version.Details.xml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ProductDependencies>
4-
<Dependency Name="XliffTasks" Version="1.0.0-beta.21215.1">
5-
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
6-
<Sha>7e80445ee82adbf9a8e6ae601ac5e239d982afaa</Sha>
7-
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
8-
</Dependency>
9-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="7.0.0-alpha.1.22409.1">
4+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="8.0.0-alpha.1.23203.1">
105
<Uri>https://github.com/dotnet/source-build-externals</Uri>
11-
<Sha>ee790b0477953dd30ea83e0e47af909a04fd0ca3</Sha>
6+
<Sha>33edde07d61cf7606d76ada765335fb81f1cbb71</Sha>
127
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
138
</Dependency>
9+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23211.4">
10+
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
11+
<Sha>01850f2b7bff23e118d1faecb941d770c8e626f2</Sha>
12+
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
13+
</Dependency>
1414
</ProductDependencies>
1515
<ToolsetDependencies>
1616
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23168.1">
1717
<Uri>https://github.com/dotnet/arcade</Uri>
1818
<Sha>b12f035e893c34ec2c965d75f6e21b7a2667e98d</Sha>
1919
<SourceBuild RepoName="arcade" ManagedOnly="true" />
2020
</Dependency>
21+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23165.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
22+
<Uri>https://github.com/dotnet/xliff-tasks</Uri>
23+
<Sha>b7fb98b199d0b1b6188da4f4bf4f5accddac98d4</Sha>
24+
<SourceBuild RepoName="xliff-tasks" ManagedOnly="true" />
25+
</Dependency>
26+
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.2.0-beta-23165-02" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
27+
<Uri>https://github.com/dotnet/sourcelink</Uri>
28+
<Sha>3f43bf1b2dead2cb51f20dc47f6dfd7981248820</Sha>
29+
<SourceBuild RepoName="sourcelink" ManagedOnly="true" />
30+
</Dependency>
31+
<Dependency Name="Microsoft.DiaSymReader" Version="1.4.0">
32+
<Uri>https://github.com/dotnet/symreader</Uri>
33+
<Sha>636a10b9d0aa317736c57d95f80e1c0849450715</Sha>
34+
</Dependency>
2135
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.1.0-5.22128.4">
2236
<Uri>https://github.com/dotnet/roslyn</Uri>
2337
<Sha>5d10d428050c0d6afef30a072c4ae68776621877</Sha>

eng/Versions.props

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
<MicrosoftDiaSymReaderConverterXmlVersion>1.1.0-beta2-22302-02</MicrosoftDiaSymReaderConverterXmlVersion>
108108
<MicrosoftDiaSymReaderNativeVersion>17.0.0-beta1.21524.1</MicrosoftDiaSymReaderNativeVersion>
109109
<MicrosoftDiaSymReaderPortablePdbVersion>1.7.0-beta-21528-01</MicrosoftDiaSymReaderPortablePdbVersion>
110-
<MicrosoftExtensionsLoggingVersion>5.0.0</MicrosoftExtensionsLoggingVersion>
111-
<MicrosoftExtensionsLoggingConsoleVersion>5.0.0</MicrosoftExtensionsLoggingConsoleVersion>
110+
<MicrosoftExtensionsLoggingVersion>6.0.0</MicrosoftExtensionsLoggingVersion>
111+
<MicrosoftExtensionsLoggingConsoleVersion>6.0.0</MicrosoftExtensionsLoggingConsoleVersion>
112112
<MicrosoftIdentityModelClientsActiveDirectoryVersion>3.13.8</MicrosoftIdentityModelClientsActiveDirectoryVersion>
113113
<MicrosoftInternalPerformanceCodeMarkersDesignTimeVersion>15.8.27812-alpha</MicrosoftInternalPerformanceCodeMarkersDesignTimeVersion>
114114
<MicrosoftInternalVisualStudioInteropVersion>$(MicrosoftVisualStudioShellPackagesVersion)</MicrosoftInternalVisualStudioInteropVersion>
@@ -117,7 +117,6 @@
117117
<MicrosoftMetadataVisualizerVersion>1.0.0-beta3.21075.2</MicrosoftMetadataVisualizerVersion>
118118
<MicrosoftNETBuildExtensionsVersion>2.2.101</MicrosoftNETBuildExtensionsVersion>
119119
<MicrosoftNETCorePlatformsVersion>5.0.0</MicrosoftNETCorePlatformsVersion>
120-
<MicrosoftNETCoreAppRefVersion>5.0.0</MicrosoftNETCoreAppRefVersion>
121120
<MicrosoftNETFrameworkReferenceAssembliesnet461Version>1.0.0</MicrosoftNETFrameworkReferenceAssembliesnet461Version>
122121
<MicrosoftNETFrameworkReferenceAssembliesnet451Version>1.0.0</MicrosoftNETFrameworkReferenceAssembliesnet451Version>
123122
<MicrosoftNETFrameworkReferenceAssembliesnet40Version>1.0.0</MicrosoftNETFrameworkReferenceAssembliesnet40Version>
@@ -243,7 +242,7 @@
243242
<SystemIOFileSystemPrimitivesVersion>4.3.0</SystemIOFileSystemPrimitivesVersion>
244243
<SystemIOPipesAccessControlVersion>5.0.0</SystemIOPipesAccessControlVersion>
245244
<SystemIOPipelinesVersion>7.0.0</SystemIOPipelinesVersion>
246-
<SystemManagementVersion>5.0.0-preview.8.20407.11</SystemManagementVersion>
245+
<SystemManagementVersion>7.0.0</SystemManagementVersion>
247246
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
248247
<SystemResourcesExtensionsVersion>7.0.0</SystemResourcesExtensionsVersion>
249248
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>

src/Tools/BuildValidator/DemoLogger.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public IDisposable BeginScope<TState>(TState state)
3939

4040
public bool IsEnabled(LogLevel logLevel) => true;
4141

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

4545
private void LogCore(string? message)
@@ -70,7 +70,7 @@ public void Dispose()
7070

7171
public bool IsEnabled(LogLevel logLevel) => false;
7272

73-
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
73+
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
7474
{
7575
}
7676
}

src/Tools/Source/RunTests/ProcessUtil.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ internal static class ProcessUtil
1717
{
1818
internal static int? TryGetParentProcessId(Process p)
1919
{
20+
// System.Management is not supported outside of Windows.
21+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
22+
{
23+
return null;
24+
}
25+
2026
try
2127
{
2228
ManagementObject mo = new ManagementObject("win32_process.handle='" + p.Id + "'");

0 commit comments

Comments
 (0)