From dd841725e546c2e67422895649bdd04cac367f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristijan=20=C5=A0imi=C4=87?= <1250428+Kr1sso@users.noreply.github.com> Date: Tue, 14 May 2019 16:54:06 +0200 Subject: [PATCH] Transition to .NETCore 3.0 for BuildXL (#298) * Switch to .NetCoreApp3.0 as main .NETCore build target --- .../Public/Managed/Frameworks/frameworks.dsc | 2 + .../Sdk/Public/Managed/Frameworks/helpers.dsc | 56 +++++++++++++ .../Managed/Frameworks/module.config.dsc | 3 +- .../netcoreapp2.2/netcoreapp2.2.dsc | 64 ++------------- .../netcoreapp3.0/module.config.dsc | 10 +++ .../netcoreapp3.0/netcoreapp3.0.dsc | 73 +++++++++++++++++ Public/Sdk/Public/Managed/Shared/factory.dsc | 2 +- .../Sdk/Public/Managed/Shared/frameworks.dsc | 8 +- Public/Sdk/Public/Managed/Shared/types.dsc | 11 ++- .../Public/Managed/Testing/XUnit/xunit.dsc | 14 ++-- .../Managed/Testing/XUnit/xunitframework.dsc | 8 +- .../AppHostPatcher/AppHostPatcher.csproj | 2 +- Public/Sdk/Public/Managed/Tools/Csc/csc.dsc | 23 +++--- .../Public/Managed/Tools/ILCompiler/ilc.dsc | 4 +- .../Tools/ResGen.Lite/SourceCodeWriter.cs | 8 +- Public/Sdk/Public/Managed/helpers.dsc | 45 ++++++++++- Public/Sdk/Public/Managed/managedSdk.dsc | 33 ++++---- .../BuildXL/BuildXLReferenceWorkarounds.dsc | 14 +--- Public/Sdk/SelfHost/BuildXL/BuildXLSdk.dsc | 12 +-- Public/Sdk/SelfHost/BuildXL/Qualifiers.dsc | 12 +-- .../BuildXL/StandaloneTest/StandaloneTest.dsc | 16 ++-- .../Tools/LogGenerator/LogGenerator.dsc | 2 +- .../Libraries/RocksDbSharp/rocksDbSharp.dsc | 8 +- .../Sdk/SelfHost/Libraries/Sqlite/sqlite.dsc | 4 +- .../RuntimeContracts/RuntimeContracts.dsc | 2 +- .../package.dsc | 4 +- Public/Src/App/Bxl/MachineInfo.cs | 11 ++- .../IntegrationTest.BuildXL.Executable.dsc | 2 +- .../Distributed/NuCache/LocalLocationStore.cs | 8 +- ...calLocationStoreDistributedContentTests.cs | 4 +- .../BuildXL.Cache.ContentStore.Grpc.Test.dsc | 20 ++--- .../BuildXL.Cache.ContentStore.Interfaces.dsc | 6 +- .../Extensions/AsyncEnumerableExtensions.cs | 7 +- .../FileSystem/AbsFileSystemTests.cs | 2 + .../Sessions/ContentSessionTests.cs | 4 +- .../Library/Extensions/StreamExtensions.cs | 2 + .../Test/Sessions/ContentPerformanceTests.cs | 10 ++- .../ReadOnlyDistributedCacheSession.cs | 4 +- .../Distributed/Stores/DistributedCache.cs | 4 +- .../Interfaces/Caches/ICache.cs | 4 +- .../Sessions/IReadOnlyMemoizationSession.cs | 4 +- .../ReadOnlyMemoizationSessionExtensions.cs | 10 ++- .../Sessions/ReadOnlyOneLevelCacheSession.cs | 8 +- .../Interfaces/Stores/IMemoizationStore.cs | 4 +- .../Results/ThrowingCacheSession.cs | 4 +- .../Library/Service/ServiceClientCache.cs | 4 +- .../Service/ServiceClientCacheSession.cs | 4 +- .../Library/Sessions/OneLevelCache.cs | 4 +- .../ReadOnlyMemoryMemoizationSession.cs | 4 +- .../ReadOnlySQLiteMemoizationSession.cs | 4 +- .../Library/Stores/MemoryMemoizationStore.cs | 8 +- .../Library/Stores/SQLiteMemoizationStore.cs | 6 +- .../BuildXL.Cache.MemoizationStore.Test.dsc | 3 +- .../Test/Sessions/LocalCacheTests.cs | 4 +- .../Sessions/MemoizationPerformanceTests.cs | 4 +- .../Test/Sessions/OneLevelCacheTests.Mocks.cs | 8 +- .../TestInProcessServiceClientCache.cs | 4 +- .../MemoizationStore/Vsts/BuildCacheCache.cs | 6 +- .../Vsts/BuildCacheReadOnlySession.cs | 4 +- .../VersionUpdater.runtimeconfig.json | 4 +- .../VerticalStore/Analyzer/Extensions.cs | 3 + Public/Src/Demos/Deployment.dsc | 2 +- Public/Src/Deployment/Ide.dsc | 2 +- Public/Src/Deployment/NugetPackages.dsc | 8 +- Public/Src/Deployment/Tests.Osx/tests.osx.dsc | 4 +- Public/Src/Deployment/buildXL.dsc | 8 +- Public/Src/Deployment/cache.NugetPackages.dsc | 4 +- Public/Src/Deployment/tools.dsc | 2 +- .../Processes/SandboxedProcessPipExecutor.cs | 12 +-- .../Scheduler/Artifacts/FileContentManager.cs | 49 +++++------ .../Server/BuildXL.Explorer.Server.dsc | 4 +- .../Linter/Rules/EnforceNumberLiteralRule.cs | 6 +- .../Sdk/SimpleFrontEndEngineAbstraction.cs | 7 +- .../Helper/TestEngineAbstraction.cs | 2 + ....FrontEnd.Script.Testing.TestGenerator.dsc | 2 +- .../FrontEnd/Utilities/FrontEndUtilities.cs | 17 ++-- Public/Src/IDE/Debugger/RemoteDebugger.cs | 2 + .../Utilities/DiagnosticsExtensions.cs | 3 +- .../Utilities/PositionExtensions.cs | 1 + .../Tool.CreateZipPackage.dsc | 2 +- .../Tools/Orchestrator/Orchestrator.csproj | 2 +- .../Test.BuildXL.Executables.TestProcess.dsc | 2 +- .../UnitTests/Ipc/MultiplexingServerTests.cs | 2 + Shared/Scripts/BuildDistributedTest.cmd | 2 +- config.dsc | 81 ++++++++++++------- config.microsoftInternal.dsc | 4 +- 86 files changed, 558 insertions(+), 304 deletions(-) create mode 100644 Public/Sdk/Public/Managed/Frameworks/helpers.dsc create mode 100644 Public/Sdk/Public/Managed/Frameworks/netcoreapp3.0/module.config.dsc create mode 100644 Public/Sdk/Public/Managed/Frameworks/netcoreapp3.0/netcoreapp3.0.dsc diff --git a/Public/Sdk/Public/Managed/Frameworks/frameworks.dsc b/Public/Sdk/Public/Managed/Frameworks/frameworks.dsc index 03381172c..787c0185e 100644 --- a/Public/Sdk/Public/Managed/Frameworks/frameworks.dsc +++ b/Public/Sdk/Public/Managed/Frameworks/frameworks.dsc @@ -17,6 +17,8 @@ export const framework : Shared.Framework = (() => { return importFrom("Sdk.Managed.Frameworks.Net472").framework; case "netcoreapp2.2": return importFrom("Sdk.Managed.Frameworks.NetCoreApp2.2").framework; + case "netcoreapp3.0": + return importFrom("Sdk.Managed.Frameworks.NetCoreApp3.0").framework; case "netstandard2.0": return importFrom("Sdk.Managed.Frameworks.NetStandard2.0").framework; default: diff --git a/Public/Sdk/Public/Managed/Frameworks/helpers.dsc b/Public/Sdk/Public/Managed/Frameworks/helpers.dsc new file mode 100644 index 000000000..94d9c585f --- /dev/null +++ b/Public/Sdk/Public/Managed/Frameworks/helpers.dsc @@ -0,0 +1,56 @@ +import {Artifact, Cmd, Transformer} from "Sdk.Transformers"; + +namespace Helpers +{ + export declare const qualifier : {}; + + function getToolTemplate() : Transformer.ExecuteArgumentsComposible { + const host = Context.getCurrentHost(); + + Contract.assert(host.cpuArchitecture === "x64", "The current DotNetCore Runtime package only has x64 version of Node. Ensure this runs on a 64-bit OS -or- update PowerShell.Core package to have other architectures embedded and fix this logic"); + + let executable : RelativePath = undefined; + let pkgContents : StaticDirectory = undefined; + + switch (host.os) { + case "win": + pkgContents = importFrom("DotNet-Runtime.win-x64").extracted; + executable = r`dotnet.exe`; + break; + case "macOS": + pkgContents = importFrom("DotNet-Runtime.osx-x64").extracted; + executable = r`dotnet`; + break; + case "unix": + pkgContents = importFrom("DotNet-Runtime.linux-x64").extracted; + executable = r`dotnet`; + break; + default: + Contract.fail(`The current DotNetCore Runtime package doesn't support the current target runtime: ${host.os}. Esure you run on a supported OS -or- update the DotNet-Runtime package to have the version embdded.`); + } + + return { + tool: { + exe: pkgContents.getFile(executable), + dependsOnCurrentHostOSDirectories: true, + }, + dependencies: [ + pkgContents, + ] + }; + } + + const toolTemplate = getToolTemplate(); + + @@public + export function wrapInDotNetExeForCurrentOs(args: Transformer.ExecuteArguments) : Transformer.ExecuteArguments { + return Object.merge( + args, + toolTemplate, + { + arguments: [ + Cmd.argument(Artifact.input(args.tool.exe)) + ].prependWhenMerged() + }); + } +} \ No newline at end of file diff --git a/Public/Sdk/Public/Managed/Frameworks/module.config.dsc b/Public/Sdk/Public/Managed/Frameworks/module.config.dsc index 4e1186eea..bd49e95f4 100644 --- a/Public/Sdk/Public/Managed/Frameworks/module.config.dsc +++ b/Public/Sdk/Public/Managed/Frameworks/module.config.dsc @@ -5,6 +5,7 @@ module({ name: "Sdk.Managed.Frameworks", nameResolutionSemantics: NameResolutionSemantics.implicitProjectReferences, projects: [ - f`frameworks.dsc` + f`frameworks.dsc`, + f`helpers.dsc` ] }); diff --git a/Public/Sdk/Public/Managed/Frameworks/netcoreapp2.2/netcoreapp2.2.dsc b/Public/Sdk/Public/Managed/Frameworks/netcoreapp2.2/netcoreapp2.2.dsc index 8f57a1493..6464f6c6e 100644 --- a/Public/Sdk/Public/Managed/Frameworks/netcoreapp2.2/netcoreapp2.2.dsc +++ b/Public/Sdk/Public/Managed/Frameworks/netcoreapp2.2/netcoreapp2.2.dsc @@ -21,15 +21,15 @@ function ignoredAssembly(file: File): boolean { } const windowsRuntimeFiles = [ - ...importFrom("runtime.win-x64.Microsoft.NETCore.App").Contents.all.getContent().filter(f => f.extension === a`.dll` && !ignoredAssembly(f)), - ...importFrom("runtime.win-x64.Microsoft.NETCore.DotNetHostResolver").Contents.all.getContent().filter(f => f.extension === a`.dll`), - ...importFrom("runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy").Contents.all.getContent().filter(f => f.extension === a`.dll`), + ...importFrom("runtime.win-x64.Microsoft.NETCore.App.220").Contents.all.getContent().filter(f => f.extension === a`.dll` && !ignoredAssembly(f)), + ...importFrom("runtime.win-x64.Microsoft.NETCore.DotNetHostResolver.220").Contents.all.getContent().filter(f => f.extension === a`.dll`), + ...importFrom("runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy.220").Contents.all.getContent().filter(f => f.extension === a`.dll`), ]; const osxRuntimeFiles = [ - ...importFrom("runtime.osx-x64.Microsoft.NETCore.App").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f) && !ignoredAssembly(f)), - ...importFrom("runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f)), - ...importFrom("runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f)), + ...importFrom("runtime.osx-x64.Microsoft.NETCore.App.220").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f) && !ignoredAssembly(f)), + ...importFrom("runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver.220").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f)), + ...importFrom("runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy.220").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f)), ]; @@public @@ -66,58 +66,8 @@ export const framework : Shared.Framework = { }; function createDefaultAssemblies() : Shared.Assembly[] { - const pkgContents = importFrom("Microsoft.NETCore.App").withQualifier({targetFramework: "netcoreapp2.2"}).Contents.all; + const pkgContents = importFrom("Microsoft.NETCore.App.211").withQualifier({targetFramework: "netcoreapp2.2"}).Contents.all; const netcoreAppPackageContents = pkgContents.contents; const dlls = netcoreAppPackageContents.filter(file => file.hasExtension && file.extension === a`.dll`); return dlls.map(file => Shared.Factory.createAssembly(pkgContents, file, "netcoreapp2.2", [], true)); } - -function getToolTemplate() : Transformer.ExecuteArgumentsComposible { - const host = Context.getCurrentHost(); - - Contract.assert(host.cpuArchitecture === "x64", "The current DotNetCore Runtime package only has x64 version of Node. Ensure this runs on a 64-bit OS -or- update PowerShell.Core package to have other architectures embedded and fix this logic"); - - let executable : RelativePath = undefined; - let pkgContents : StaticDirectory = undefined; - - switch (host.os) { - case "win": - pkgContents = importFrom("DotNet-Runtime.win-x64").extracted; - executable = r`dotnet.exe`; - break; - case "macOS": - pkgContents = importFrom("DotNet-Runtime.osx-x64").extracted; - executable = r`dotnet`; - break; - case "unix": - pkgContents = importFrom("DotNet-Runtime.linux-x64").extracted; - executable = r`dotnet`; - break; - default: - Contract.fail(`The current DotNetCore Runtime package doesn't support the current target runtime: ${host.os}. Esure you run on a supported OS -or- update the DotNet-Runtime package to have the version embdded.`); - } - - return { - tool: { - exe: pkgContents.getFile(executable), - dependsOnCurrentHostOSDirectories: true, - }, - dependencies: [ - pkgContents, - ] - }; -} - -const toolTemplate = getToolTemplate(); - -@@public -export function wrapInDotNetExeForCurrentOs(args: Transformer.ExecuteArguments) : Transformer.ExecuteArguments { - return Object.merge( - args, - toolTemplate, - { - arguments: [ - Cmd.argument(Artifact.input(args.tool.exe)) - ].prependWhenMerged() - }); -} diff --git a/Public/Sdk/Public/Managed/Frameworks/netcoreapp3.0/module.config.dsc b/Public/Sdk/Public/Managed/Frameworks/netcoreapp3.0/module.config.dsc new file mode 100644 index 000000000..118d2c033 --- /dev/null +++ b/Public/Sdk/Public/Managed/Frameworks/netcoreapp3.0/module.config.dsc @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +module({ + name: "Sdk.Managed.Frameworks.NetCoreApp3.0", + nameResolutionSemantics: NameResolutionSemantics.implicitProjectReferences, + projects: [ + f`netcoreapp3.0.dsc`, + ] +}); diff --git a/Public/Sdk/Public/Managed/Frameworks/netcoreapp3.0/netcoreapp3.0.dsc b/Public/Sdk/Public/Managed/Frameworks/netcoreapp3.0/netcoreapp3.0.dsc new file mode 100644 index 000000000..9aef9d6a1 --- /dev/null +++ b/Public/Sdk/Public/Managed/Frameworks/netcoreapp3.0/netcoreapp3.0.dsc @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +import {Artifact, Cmd, Transformer} from "Sdk.Transformers"; +import * as Shared from "Sdk.Managed.Shared"; +import * as Deployment from "Sdk.Deployment"; +import * as MacOS from "Sdk.MacOS"; + +export declare const qualifier: {targetFramework: "netcoreapp3.0"}; + +const defaultAssemblies: Shared.Assembly[] = createDefaultAssemblies(); + +function macOSRuntimeExtensions(file: File): boolean { + return file.extension === a`.dylib` || file.extension === a`.a` || file.extension === a`.dll`; +} + +function ignoredAssembly(file: File): boolean { + // We skip deploying those files from the .NET Core package as we need those very assemblies from their dedicated package + // to compile our platform abstraction layer, which depends on datatypes present only in the dedicated packages + return file.name === a`System.Security.AccessControl.dll` || file.name === a`System.Security.Principal.Windows.dll`; +} + +const windowsRuntimeFiles = [ + ...importFrom("runtime.win-x64.Microsoft.NETCore.App").Contents.all.getContent().filter(f => f.extension === a`.dll` && !ignoredAssembly(f)), + ...importFrom("runtime.win-x64.Microsoft.NETCore.DotNetHostResolver").Contents.all.getContent().filter(f => f.extension === a`.dll`), + ...importFrom("runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy").Contents.all.getContent().filter(f => f.extension === a`.dll`), +]; + +const osxRuntimeFiles = [ + ...importFrom("runtime.osx-x64.Microsoft.NETCore.App").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f) && !ignoredAssembly(f)), + ...importFrom("runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f)), + ...importFrom("runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy").Contents.all.getContent().filter(f => macOSRuntimeExtensions(f)), +]; + +@@public +export function runtimeContentProvider(runtimeVersion: Shared.RuntimeVersion): File[] { + switch (runtimeVersion) + { + case "osx-x64": + return osxRuntimeFiles; + case "win-x64": + default: + return windowsRuntimeFiles; + } +} + +@@public +export const framework : Shared.Framework = { + targetFramework: qualifier.targetFramework, + + supportedRuntimeVersion: "v3.0", + assemblyInfoTargetFramework: ".NETCoreApp,Version=v3.0", + assemblyInfoFrameworkDisplayName: ".NET Core App", + + standardReferences: defaultAssemblies, + + requiresPortablePdb: true, + + runtimeConfigStyle: "runtimeJson", + runtimeFrameworkName: "Microsoft.NETCore.App", + runtimeConfigVersion: "3.0.0-preview5-27626-15", + + // Deployment style for .NET Core applications currently defaults to self-contained + applicationDeploymentStyle: "selfContained", + runtimeContentProvider: runtimeContentProvider, +}; + +function createDefaultAssemblies() : Shared.Assembly[] { + const pkgContents = importFrom("Microsoft.NETCore.App").withQualifier({targetFramework: "netcoreapp3.0"}).Contents.all; + const netcoreAppPackageContents = pkgContents.contents; + const dlls = netcoreAppPackageContents.filter(file => file.hasExtension && file.extension === a`.dll`); + return dlls.map(file => Shared.Factory.createAssembly(pkgContents, file, "netcoreapp3.0", [], true)); +} diff --git a/Public/Sdk/Public/Managed/Shared/factory.dsc b/Public/Sdk/Public/Managed/Shared/factory.dsc index 7577285bc..4f69e1545 100644 --- a/Public/Sdk/Public/Managed/Shared/factory.dsc +++ b/Public/Sdk/Public/Managed/Shared/factory.dsc @@ -27,7 +27,7 @@ namespace Factory { const xmlPath = binaryPath.changeExtension(".xml"); return { - binary: contents.getFile(binaryPath), + binary: contents.getFile(binaryPath), pdb: contents.hasFile(pdbPath) ? contents.getFile(pdbPath) : undefined, documentation: contents.hasFile(xmlPath) ? contents.getFile(xmlPath) : undefined, deploy: Deployment.flattenBinary, diff --git a/Public/Sdk/Public/Managed/Shared/frameworks.dsc b/Public/Sdk/Public/Managed/Shared/frameworks.dsc index d01df9b1a..7fcd188d6 100644 --- a/Public/Sdk/Public/Managed/Shared/frameworks.dsc +++ b/Public/Sdk/Public/Managed/Shared/frameworks.dsc @@ -5,7 +5,7 @@ import * as Deployment from "Sdk.Deployment"; @@public export interface Framework { - /** + /** * The minimum rumtime version supported. * See: https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/startup/supportedruntime-element */ @@ -55,7 +55,7 @@ namespace TargetFrameworks { export type DesktopTargetFrameworks = "net451" | "net461" | "net472"; @@public - export type CoreClrTargetFrameworks = "netcoreapp2.2"; + export type CoreClrTargetFrameworks = "netcoreapp2.2" | "netcoreapp3.0"; @@public export type StandardTargetFrameworks = "netstandard2.0"; @@ -85,14 +85,14 @@ namespace TargetFrameworks { export interface CurrentMachineQualifier extends Qualifier { configuration: "debug" | "release"; // TODO: Netstandard should handle its application deploy in the framework itself and not rely on BuildXLSdk specifics - targetFramework: "net472" | "netcoreapp2.2", + targetFramework: "net472" | "netcoreapp3.0", targetRuntime: "win-x64" | "osx-x64", } @@public export const currentMachineQualifier : CurrentMachineQualifier = { configuration: "release", - targetFramework: Context.getCurrentHost().os === "win" ? "net472" : "netcoreapp2.2", + targetFramework: Context.getCurrentHost().os === "win" ? "net472" : "netcoreapp3.0", targetRuntime: Context.getCurrentHost().os === "win" ? "win-x64" : "osx-x64", }; } diff --git a/Public/Sdk/Public/Managed/Shared/types.dsc b/Public/Sdk/Public/Managed/Shared/types.dsc index 672f0f750..7eecaa673 100644 --- a/Public/Sdk/Public/Managed/Shared/types.dsc +++ b/Public/Sdk/Public/Managed/Shared/types.dsc @@ -136,13 +136,16 @@ export function isBinary(item: Reference) : item is Binary { @@public export function isAssembly(item: Reference) : item is Assembly { return item["name"] !== undefined && - (item["compile"] !== undefined || item["runtime"] !== undefined) && - item["contents"] === undefined; // Exclude nuget packages + (item["compile"] !== undefined || item["runtime"] !== undefined) && + item["contents"] === undefined; // Exclude nuget packages } @@public -export function isManagedPackage(item: NugetPackage) : item is ManagedNugetPackage { - return item["compile"] !== undefined || item["runtime"] !== undefined || item["runtimeContent"] !== undefined || item["analyzers"] !== undefined; +export function isManagedPackage(item: any) : item is ManagedNugetPackage { + return item["compile"] !== undefined || + item["runtime"] !== undefined || + item["runtimeContent"] !== undefined || + item["analyzers"] !== undefined; } @@public diff --git a/Public/Sdk/Public/Managed/Testing/XUnit/xunit.dsc b/Public/Sdk/Public/Managed/Testing/XUnit/xunit.dsc index 78949efe2..f9c61b034 100644 --- a/Public/Sdk/Public/Managed/Testing/XUnit/xunit.dsc +++ b/Public/Sdk/Public/Managed/Testing/XUnit/xunit.dsc @@ -24,7 +24,7 @@ export function runConsoleTest(args: TestRunArguments): Result { let testDeployment = args.testDeployment; const tool : Transformer.ToolDefinition = Managed.Factory.createTool({ - exe: qualifier.targetFramework === "netcoreapp2.2" + exe: qualifier.targetFramework === "netcoreapp3.0" ? testDeployment.contents.getFile(r`xunit.console.dll`) // Using xunit executable from different folders depending on the target framework. // This allow us to actually to run tests targeting different frameworks. @@ -38,7 +38,7 @@ export function runConsoleTest(args: TestRunArguments): Result { const testClass = args.className || Environment.getStringValue("[UnitTest]Filter.testClass"); let arguments : Argument[] = CreateCommandLineArgument(testDeployment.primaryFile, args, testClass, testMethod); - + let execArguments : Transformer.ExecuteArguments = { tool: args.tool || tool, tags: args.tags, @@ -46,20 +46,20 @@ export function runConsoleTest(args: TestRunArguments): Result { dependencies: [ testDeployment.contents, ], - warningRegex: "^(?=a)b", // This is a never matching warning regex. StartOfLine followed by the next char must be 'a' (look ahead), and the next char must be a 'b'. + warningRegex: "^(?=a)b", // This is a never matching warning regex. StartOfLine followed by the next char must be 'a' (look ahead), and the next char must be a 'b'. workingDirectory: testDeployment.contents.root, retryExitCodes: Environment.getFlag("RetryXunitTests") ? [1] : [], unsafe: args.untrackTestDirectory ? {untrackedScopes: [testDeployment.contents.root]} : undefined, }; - if (qualifier.targetFramework === "netcoreapp2.2") { - execArguments = importFrom("Sdk.Managed.Frameworks.NetCoreApp2.2").wrapInDotNetExeForCurrentOs(execArguments); + if (qualifier.targetFramework === "netcoreapp3.0") { + execArguments = importFrom("Sdk.Managed.Frameworks").Helpers.wrapInDotNetExeForCurrentOs(execArguments); } execArguments = Managed.TestHelpers.applyTestRunExecutionArgs(execArguments, args); const result = Transformer.execute(execArguments); - + return { xmlFile: args.xmlFile && result.getOutputFile(args.xmlFile), xmlV1File: args.xmlV1File && result.getOutputFile(args.xmlV1File), @@ -81,7 +81,7 @@ function runMultipleConsoleTests(args: TestRunArguments) : Result runConsoleTest(args.override({ // disable breaking down in groups again parallelGroups: undefined, - + // Avoid double-writes xmlFile: renameOutputFile(testGroup, args.xmlFile), xmlV1File: renameOutputFile(testGroup, args.xmlV1File), diff --git a/Public/Sdk/Public/Managed/Testing/XUnit/xunitframework.dsc b/Public/Sdk/Public/Managed/Testing/XUnit/xunitframework.dsc index 88707f75b..2c6fd4ed4 100644 --- a/Public/Sdk/Public/Managed/Testing/XUnit/xunitframework.dsc +++ b/Public/Sdk/Public/Managed/Testing/XUnit/xunitframework.dsc @@ -16,10 +16,8 @@ export const framework : Managed.TestFramework = { name: "XUnit", }; - const xunitNet451Qualifier: {targetFramework: "net451"} = {targetFramework: "net451"}; - @@public -export const xunitReferences : Managed.Reference[] = qualifier.targetFramework === "netcoreapp2.2" +export const xunitReferences : Managed.Reference[] = qualifier.targetFramework === "netcoreapp3.0" ? [ importFrom("xunit.assert").pkg, importFrom("xunit.abstractions").pkg, @@ -42,7 +40,7 @@ function processArguments(args: Managed.TestArguments): Managed.TestArguments { args); } -const netStandardFramework = importFrom("Sdk.Managed.Frameworks.NetCoreApp2.2").withQualifier({targetFramework: "netcoreapp2.2"}).framework; +const netStandardFramework = importFrom("Sdk.Managed.Frameworks.NetCoreApp3.0").withQualifier({targetFramework: "netcoreapp3.0"}).framework; const xunitNetStandardRuntimeConfigFiles: File[] = Managed.RuntimeConfigFiles.createFiles( netStandardFramework, "xunit.console", @@ -53,7 +51,7 @@ const xunitNetStandardRuntimeConfigFiles: File[] = Managed.RuntimeConfigFiles.cr // For the DotNetCore run we need to copy a bunch more files: function additionalRuntimeContent(args: Managed.TestArguments) : Deployment.DeployableItem[] { - return qualifier.targetFramework !== "netcoreapp2.2" ? [] : [ + return qualifier.targetFramework !== "netcoreapp3.0" ? [] : [ // Unfortunately xUnit console runner comes as a precompiled assembly for .NET Core, we could either go and pacakge it // into a self-contained deployment or treat it as a framework-dependent deployment as intended, let's do the latter ...(args.framework === netStandardFramework diff --git a/Public/Sdk/Public/Managed/Tools/AppHostPatcher/AppHostPatcher.csproj b/Public/Sdk/Public/Managed/Tools/AppHostPatcher/AppHostPatcher.csproj index 3bbe7636b..53d963d7d 100644 --- a/Public/Sdk/Public/Managed/Tools/AppHostPatcher/AppHostPatcher.csproj +++ b/Public/Sdk/Public/Managed/Tools/AppHostPatcher/AppHostPatcher.csproj @@ -2,6 +2,6 @@ Exe x64 - netcoreapp2.2 + netcoreapp3.0 diff --git a/Public/Sdk/Public/Managed/Tools/Csc/csc.dsc b/Public/Sdk/Public/Managed/Tools/Csc/csc.dsc index 6c9421865..ca05efd24 100644 --- a/Public/Sdk/Public/Managed/Tools/Csc/csc.dsc +++ b/Public/Sdk/Public/Managed/Tools/Csc/csc.dsc @@ -4,11 +4,11 @@ import {Artifact, Cmd, Tool, Transformer} from "Sdk.Transformers"; import * as Shared from "Sdk.Managed.Shared"; -const pkgContents = Context.getCurrentHost().os === "win" +const pkgContents = Context.getCurrentHost().os === "win" ? importFrom("Microsoft.Net.Compilers").Contents.all : importFrom("Microsoft.NETCore.Compilers").Contents.all; -const cscTool = Context.getCurrentHost().os === "win" +const cscTool = Context.getCurrentHost().os === "win" ? r`tools/csc.exe` : r`tools/bincore/csc.dll`; @@ -55,8 +55,8 @@ export function compile(inputArgs: Arguments) : Result { const outputDirectory = Context.getNewOutputDirectory(args.out + "-csc"); const outputBinPath = outputDirectory.combine(args.out); - const outputPdbPath = (args.debugType || args.emitDebugInformation) - ? (args.pdb ? p`${outputDirectory}/${args.pdb}` : outputBinPath.changeExtension(".pdb")) + const outputPdbPath = (args.debugType || args.emitDebugInformation) + ? (args.pdb ? p`${outputDirectory}/${args.pdb}` : outputBinPath.changeExtension(".pdb")) : undefined; const outputDocPath = args.doc && p`${outputDirectory}/${args.doc}`; const outputRefPath = args.emitReferenceAssembly ? p`${outputDirectory}/ref/${args.out}` : undefined; @@ -77,7 +77,7 @@ export function compile(inputArgs: Arguments) : Result { Cmd.option("/langversion:", args.languageVersion), // TODO: uncoment the following line and delete the line after it once a new LKG is published - // Cmd.option("/define:", args.defines ? args.defines.join(";") : undefined), + // Cmd.option("/define:", args.defines ? args.defines.join(";") : undefined), ...addIf((args.defines || []).length > 0, Cmd.rawArgument(`/define:"${args.defines.join(';')}"`)), Cmd.option("/nowarn:", args.noWarnings ? args.noWarnings.map(n => n.toString()).join(",") : undefined), @@ -111,7 +111,7 @@ export function compile(inputArgs: Arguments) : Result { Cmd.option("/test:", args.moduleName ? ("moduleName=" + args.moduleName) : undefined), Cmd.option("/errorreport:", args.errorReport ? args.errorReport.toString() : undefined), Cmd.flag("/deterministic", args.deterministic), - ...(args.pathMap || []).map(entry => + ...(args.pathMap || []).map(entry => Cmd.option("/pathMap:", Cmd.join("", [Artifact.none(entry.key), "=", entry.value]))), Cmd.option("/keyfile:", Artifact.input(args.keyFile)), @@ -127,6 +127,9 @@ export function compile(inputArgs: Arguments) : Result { Cmd.options("/link:", Artifact.inputs(args.link)), Cmd.options("/r:", Artifact.inputs(args.references && args.references.map(r => r.binary))), + ...(args.aliasedReferences || []).map(r => + Cmd.option(`/r:${r.alias}=`, Artifact.input(r.assembly.binary))), + Cmd.options("/lib:", Artifact.inputs(args.lib)), Cmd.options("/analyzer:", Artifact.inputs(args.analyzers && args.analyzers.map(a => a.binary))), Cmd.options("/additionalfile:", Artifact.inputs(args.additionalFiles || [])), @@ -157,7 +160,7 @@ export function compile(inputArgs: Arguments) : Result { }; if (Context.getCurrentHost().os !== "win") { - cscExecuteArgs = importFrom("Sdk.Managed.Frameworks.NetCoreApp2.2").withQualifier({targetFramework: "netcoreapp2.2"}).wrapInDotNetExeForCurrentOs(cscExecuteArgs); + cscExecuteArgs = importFrom("Sdk.Managed.Frameworks").Helpers.wrapInDotNetExeForCurrentOs(cscExecuteArgs); } let executeResult = Transformer.execute(cscExecuteArgs); @@ -168,8 +171,8 @@ export function compile(inputArgs: Arguments) : Result { outputDocPath && executeResult.getOutputFile(outputDocPath) ); - const referenceBinary = outputRefPath - ? Shared.Factory.createBinaryFromFiles(executeResult.getOutputFile(outputRefPath)) + const referenceBinary = outputRefPath + ? Shared.Factory.createBinaryFromFiles(executeResult.getOutputFile(outputRefPath)) : undefined; return { @@ -379,6 +382,6 @@ function toWarningLevelNumber(warningLevel: WarningLevel): number { case "level 2": return 2; case "level 3": return 3; case "level 4": return 4; - default: return Contract.fail("Unexpected WarningLevel '" + warningLevel + "'."); + default: return Contract.fail("Unexpected WarningLevel '" + warningLevel + "'."); } } diff --git a/Public/Sdk/Public/Managed/Tools/ILCompiler/ilc.dsc b/Public/Sdk/Public/Managed/Tools/ILCompiler/ilc.dsc index 28d942823..fefabe30b 100644 --- a/Public/Sdk/Public/Managed/Tools/ILCompiler/ilc.dsc +++ b/Public/Sdk/Public/Managed/Tools/ILCompiler/ilc.dsc @@ -45,8 +45,8 @@ export const linkTimeLibraries: File[] = export const compileTimeReferences: File[] = [ ...pkgContents.contents.filter(f => f.name.extension === a`.dll` && f.path.parent.name !== a`tools`), ...(isMacOS ? netcoreAppPkgContents.getFiles([ - r`runtimes/osx-x64/lib/netcoreapp2.2/SOS.NETCore.dll`, - r`runtimes/osx-x64/lib/netcoreapp2.2/System.Runtime.InteropServices.WindowsRuntime.dll` + r`runtimes/osx-x64/lib/netcoreapp3.0/SOS.NETCore.dll`, + r`runtimes/osx-x64/lib/netcoreapp3.0/System.Runtime.InteropServices.WindowsRuntime.dll` ]) : [ // TODO: references for Windows ]) diff --git a/Public/Sdk/Public/Managed/Tools/ResGen.Lite/SourceCodeWriter.cs b/Public/Sdk/Public/Managed/Tools/ResGen.Lite/SourceCodeWriter.cs index e2de68de8..d39c90650 100644 --- a/Public/Sdk/Public/Managed/Tools/ResGen.Lite/SourceCodeWriter.cs +++ b/Public/Sdk/Public/Managed/Tools/ResGen.Lite/SourceCodeWriter.cs @@ -22,7 +22,7 @@ namespace ResGen.Lite private static readonly AssemblyName s_toolAssemblyName = typeof(SourceCodeWriter).GetTypeInfo().Assembly.GetName(); /// - /// Writes a strongly typed helper class for the + /// Writes a strongly typed helper class for the /// public static void Write(string filePath, ResourceData data, string namespaceName, string className, bool isPublic, string languageName) { @@ -30,7 +30,7 @@ namespace ResGen.Lite try { - // TextWriter from System.IO has problems unifying versions from nuget and BCL between net461, net472 and netcoreapp2.2. + // TextWriter from System.IO has problems unifying versions from nuget and BCL between net461, net472 and netcoreapp3.0. // So using ToFullString instead of WriteTo. var sourceFileText = sourceFile.NormalizeWhitespace().ToFullString(); File.WriteAllText(filePath, sourceFileText, Encoding.UTF8); @@ -181,8 +181,8 @@ namespace ResGen.Lite generatedClass ) : generator.CompilationUnit( - generator.NamespaceDeclaration(namespaceName, - generator.NamespaceImportDeclaration("System"), + generator.NamespaceDeclaration(namespaceName, + generator.NamespaceImportDeclaration("System"), generatedClass) ); diff --git a/Public/Sdk/Public/Managed/helpers.dsc b/Public/Sdk/Public/Managed/helpers.dsc index 21b946508..bb4ba47d5 100644 --- a/Public/Sdk/Public/Managed/helpers.dsc +++ b/Public/Sdk/Public/Managed/helpers.dsc @@ -2,8 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. import * as Shared from "Sdk.Managed.Shared"; +import * as Csc from "Sdk.Managed.Tools.Csc"; namespace Helpers { + + export declare const qualifier : Shared.TargetFrameworks.All; + /** * Helper method that computes the compile closure based on a set of references. * This helper is for tools that gets a set of managed referneces and need to have the list of binaries that are used for compile. @@ -77,7 +81,7 @@ namespace Helpers { return results.toArray(); } - function computeTransitiveReferenceClosureHelper(ref: Shared.Reference, results: MutableSet, visitedReferences: MutableSet, compile?: boolean) { + function computeTransitiveReferenceClosureHelper(ref: Shared.Reference, results: MutableSet, visitedReferences: MutableSet, compile?: boolean) { if (visitedReferences.contains(ref)) { return; @@ -132,4 +136,43 @@ namespace Helpers { return results.toArray(); }; + + /** TODO: Unofortunately the System.Interactive.Async package exposes IAsyncEnumerable in its own System.Generic.Collection namespace, + /* colliding with .NETCore 3.0 implementation of the same name. For the time being (hopefully once the package maintainers updated their deps), + /* we explicitly create an aliased reference for the code that depends on this. + **/ + + @@public + export function patchReferencesForSystemInteractiveAsync(references: Shared.Reference[]) : Csc.Arguments { + const needsSystemInteractiveAsync = references.some(ref => + Shared.isManagedPackage(ref) && !Shared.isAssembly(ref) && ref.name.contains("System.Interactive.Async")); + + if (needsSystemInteractiveAsync) { + return { + aliasedReferences: [{ + alias: "Async", + assembly: Shared.Factory.createBinary( + importFrom("System.Interactive.Async").pkg.contents, + r`lib/${tfmTargetForSystemInteractiveAsyncPackage()}/System.Interactive.Async.dll` + ) + }] + }; + } + + return {}; + } + + function tfmTargetForSystemInteractiveAsyncPackage() : string { + switch (qualifier.targetFramework) { + case "net451": + return "net45"; + case "net461": + case "net472": + return"net46"; + case "netcoreapp3.0": + case "netstandard2.0": + default: + return "netstandard1.3"; + } + } } diff --git a/Public/Sdk/Public/Managed/managedSdk.dsc b/Public/Sdk/Public/Managed/managedSdk.dsc index ad9168ded..4f1534fd1 100644 --- a/Public/Sdk/Public/Managed/managedSdk.dsc +++ b/Public/Sdk/Public/Managed/managedSdk.dsc @@ -113,7 +113,7 @@ export function assembly(args: Arguments, targetType: Csc.TargetType) : Result { let appConfig = args.appConfig; if (args.assemblyBindingRedirects) { - let bindigRedirectElements = args.assemblyBindingRedirects.map(bindingRedirect => + let bindigRedirectElements = args.assemblyBindingRedirects.map(bindingRedirect => Xml.elem("dependentAssembly", Xml.elem("assemblyIdentity", Xml.attr("name", bindingRedirect.name), @@ -127,7 +127,7 @@ export function assembly(args: Arguments, targetType: Csc.TargetType) : Result { )); // TODO: Figure out how to fail with good error if appConfig is not a sourcefile. - let configuration = appConfig + let configuration = appConfig ? Xml.read(f`${appConfig}`).nodes.filter(n => Xml.isElement(n) && Xml.nameEquals(n.name, "configuration"))[0] as Xml.Element : Xml.elem("configuration", Xml.elem("startup", @@ -139,16 +139,16 @@ export function assembly(args: Arguments, targetType: Csc.TargetType) : Result { ); let patchedConfiguration = Xml.updateOrAddChildElement( - configuration, - "runtime", + configuration, + "runtime", runtime => Xml.updateOrAddChildElement( - runtime, - Xml.name("assemblyBinding", "urn:schemas-microsoft-com:asm.v1"), - assemblyBinding => + runtime, + Xml.name("assemblyBinding", "urn:schemas-microsoft-com:asm.v1"), + assemblyBinding => Xml.addNodes(assemblyBinding, bindigRedirectElements) ) ); - + let updatedAppConfigPath = p`${Context.getNewOutputDirectory("assemblyBindingRedirects")}/app.config`; appConfig = Xml.write(updatedAppConfigPath, Xml.doc(patchedConfiguration)); } @@ -186,16 +186,19 @@ export function assembly(args: Arguments, targetType: Csc.TargetType) : Result { ...(qualifier.targetFramework !== "net451" ? ["NET461Plus"] : []), ] }; + + const references = [ + ...(args.references || []), + ...framework.standardReferences, + ]; + if (args.tools && args.tools.csc) { cscArgs = Object.merge(args.tools.csc, cscArgs); } - let cscResult = Csc.compile(cscArgs); + cscArgs = Object.merge(Helpers.patchReferencesForSystemInteractiveAsync(references), cscArgs); - let references = [ - ...(args.references || []), - ...framework.standardReferences, - ]; + let cscResult = Csc.compile(cscArgs); let runtimeConfigFiles = undefined; let runtimeContent = args.runtimeContent; @@ -392,7 +395,7 @@ export interface AssemblyBindingRedirect { */ name: string, - /** + /** * The public key if the assembly to redirect is signed */ publicKeyToken?: string, @@ -401,7 +404,7 @@ export interface AssemblyBindingRedirect { * The culture of the assembly to redirect. Typically this is 'neutral'. */ culture?: string, - + /** * The old version. This can be a range i.e. '0.0.0.0-1.3.0.0' */ diff --git a/Public/Sdk/SelfHost/BuildXL/BuildXLReferenceWorkarounds.dsc b/Public/Sdk/SelfHost/BuildXL/BuildXLReferenceWorkarounds.dsc index 144eec6bb..288ae1981 100644 --- a/Public/Sdk/SelfHost/BuildXL/BuildXLReferenceWorkarounds.dsc +++ b/Public/Sdk/SelfHost/BuildXL/BuildXLReferenceWorkarounds.dsc @@ -3,19 +3,11 @@ @@public export const tplPackages = isDotNetCoreBuild ? [] : [importFrom("System.Threading.Tasks.Extensions").pkg]; - -/** - * Our nuget ingegration generates the wrong code for netcoreapp2.2 for System.Configuration.ConfigurationManager - * It should have added the netstandard2.0 version of the library for netcoreapp2.2 but because the config has - * a seperate group for netcoreapp2.2 our current logic mistakenly thinks there are no references to add for netcoreapp2.2 - * We therefore temporary expose this assembly manually until we fix the nuget generation - **/ - - @@public -export const fluentAssertionsWorkaround = isDotNetCoreBuild +@@public +export const fluentAssertionsWorkaround = isDotNetCoreBuild ? [ importFrom("FluentAssertions").pkg, importFrom("System.Configuration.ConfigurationManager").withQualifier({targetFramework: "netstandard2.0"}).pkg, ] : [ importFrom("FluentAssertions").pkg, - ]; + ]; \ No newline at end of file diff --git a/Public/Sdk/SelfHost/BuildXL/BuildXLSdk.dsc b/Public/Sdk/SelfHost/BuildXL/BuildXLSdk.dsc index 1f1dd9e8f..1a5e547d3 100644 --- a/Public/Sdk/SelfHost/BuildXL/BuildXLSdk.dsc +++ b/Public/Sdk/SelfHost/BuildXL/BuildXLSdk.dsc @@ -97,7 +97,7 @@ export interface TestResult extends Managed.TestResult { * Returns if the current qualifier is targeting .NET Core */ @@public -export const isDotNetCoreBuild : boolean = qualifier.targetFramework === "netcoreapp2.2" || qualifier.targetFramework === "netstandard2.0"; +export const isDotNetCoreBuild : boolean = qualifier.targetFramework === "netcoreapp3.0" || qualifier.targetFramework === "netstandard2.0"; @@public export const isFullFramework : boolean = qualifier.targetFramework === "net451" || qualifier.targetFramework === "net461" || qualifier.targetFramework === "net472"; @@ -134,8 +134,8 @@ namespace Flags { @@public export const isQTestEnabled = isMicrosoftInternal && Environment.getFlag("[Sdk.BuildXL]useQTest"); - /** - * Whether we are generating VS solution. + /** + * Whether we are generating VS solution. * We are using this flag to filter out some deployment items that can cause race in the generated VS project files. */ @@public @@ -149,7 +149,7 @@ export const devKey = f`BuildXL.DevKey.snk`; export const cacheRuleSet = f`BuildXl.Cache.ruleset`; @@public -export const dotNetFramework = qualifier.targetFramework === "netcoreapp2.2" +export const dotNetFramework = isDotNetCoreBuild ? qualifier.targetRuntime : qualifier.targetFramework; @@ -165,7 +165,7 @@ export function library(args: Arguments): Managed.Assembly { { csFiles = args.cacheOldNames.map(cacheOldName => Transformer.writeAllLines({ - outputPath: p`${Context.getNewOutputDirectory("oldcache")}/cache.g.cs`, + outputPath: p`${Context.getNewOutputDirectory("oldcache")}/cache.g.cs`, lines: [ `namespace Cache.${cacheOldName.namespace}`, `{`, @@ -533,7 +533,7 @@ function processTestArguments(args: Managed.TestArguments) : Managed.TestArgumen args = processArguments(args, "library"); let xunitSemaphoreLimit = Environment.hasVariable(envVarNamePrefix + "xunitSemaphoreCount") ? Environment.getNumberValue(envVarNamePrefix + "xunitSemaphoreCount") : 8; - let useQTest = Flags.isQTestEnabled && qualifier.targetFramework !== "netcoreapp2.2"; + let useQTest = Flags.isQTestEnabled && qualifier.targetFramework !== "netcoreapp3.0"; let testFramework = args.testFramework || (useQTest ? QTest.getFramework(XUnit.framework) : XUnit.framework); args = Object.merge({ diff --git a/Public/Sdk/SelfHost/BuildXL/Qualifiers.dsc b/Public/Sdk/SelfHost/BuildXL/Qualifiers.dsc index 6ab33b4d3..a4ccfc7aa 100644 --- a/Public/Sdk/SelfHost/BuildXL/Qualifiers.dsc +++ b/Public/Sdk/SelfHost/BuildXL/Qualifiers.dsc @@ -19,7 +19,7 @@ export interface FullFrameworkQualifier extends Qualifier { @@public export interface DefaultQualifier extends Qualifier { configuration: "debug" | "release"; - targetFramework: "net472" | "netcoreapp2.2"; + targetFramework: "net472" | "netcoreapp3.0"; targetRuntime: "win-x64" | "osx-x64"; } @@ -29,7 +29,7 @@ export interface DefaultQualifier extends Qualifier { @@public export interface DefaultQualifierWithNet451 extends Qualifier { configuration: "debug" | "release"; - targetFramework: "net451" | "net461" | "net472" | "netcoreapp2.2"; + targetFramework: "net451" | "net461" | "net472" | "netcoreapp3.0"; targetRuntime: "win-x64" | "osx-x64"; } @@ -40,7 +40,7 @@ export interface DefaultQualifierWithNet451 extends Qualifier { @@public export interface DefaultQualifierWithNet461 extends Qualifier { configuration: "debug" | "release"; - targetFramework: "net461" | "net472" | "netcoreapp2.2"; + targetFramework: "net461" | "net472" | "netcoreapp3.0"; targetRuntime: "win-x64" | "osx-x64"; } @@ -50,13 +50,13 @@ export interface DefaultQualifierWithNet461 extends Qualifier { @@public export interface DefaultQualifierWithNet451AndNetStandard20 extends Qualifier { configuration: "debug" | "release"; - targetFramework: "net451" | "net461" | "net472" | "netcoreapp2.2" | "netstandard2.0"; + targetFramework: "net451" | "net461" | "net472" | "netcoreapp3.0" | "netstandard2.0"; targetRuntime: "win-x64" | "osx-x64"; } export interface AllSupportedQualifiers extends Qualifier { configuration: "debug" | "release"; - targetFramework: "net451" | "net461" | "net472" | "netcoreapp2.2" | "netstandard2.0"; + targetFramework: "net451" | "net461" | "net472" | "netcoreapp3.0" | "netstandard2.0"; targetRuntime: "win-x64" | "osx-x64"; } @@ -72,7 +72,7 @@ export interface PlatformDependentQualifier extends Qualifier { @@public export interface NetCoreAppQualifier extends Qualifier { configuration: "debug" | "release"; - targetFramework: "netcoreapp2.2"; + targetFramework: "netcoreapp3.0"; targetRuntime: "win-x64" | "osx-x64"; } diff --git a/Public/Sdk/SelfHost/BuildXL/StandaloneTest/StandaloneTest.dsc b/Public/Sdk/SelfHost/BuildXL/StandaloneTest/StandaloneTest.dsc index fec3e5f61..946c7c1a9 100644 --- a/Public/Sdk/SelfHost/BuildXL/StandaloneTest/StandaloneTest.dsc +++ b/Public/Sdk/SelfHost/BuildXL/StandaloneTest/StandaloneTest.dsc @@ -62,7 +62,7 @@ namespace StandaloneTest { ` description: "${assemblyName} [${qualifier.configuration}, ${dotNetFramework}]",`, ` testAssembly: f\`${def.assembly.name}\`,`, ` untracked: ${def.untracked},`, - ` wrapInDotNet: ${qualifier.targetFramework === "netcoreapp2.2"},`, + ` wrapInDotNet: ${$.isDotNetCoreBuild},`, ` untrackTestDirectory: ${def.untrackTestDirectory},`, StandaloneTestUtils.generateArrayProperty("parallelCategories", def.parallelCategories, indent, StandaloneTestUtils.quoteString), StandaloneTestUtils.generateArrayProperty("limitCategories", def.limitCategories, indent, StandaloneTestUtils.quoteString), @@ -83,7 +83,7 @@ namespace StandaloneTest { /** * Deployment layout: - * + * * tests/standaloneTest/unittests/[Configuration]/[Framework] * [TestDlls]/ * ... Dlls ... @@ -95,14 +95,14 @@ namespace StandaloneTest { const mainSpecName = "runUnitTest.dsc"; return { contents: [ - { + { subfolder: testDefinition.subfolder, contents: [ StandaloneTestUtils.writeFile(a`${mainSpecName}`, createSpecFile(testDefinition)), StandaloneTestUtils.writeFile( - a`module.config.dsc`, + a`module.config.dsc`, StandaloneTestUtils.createModuleConfig( - `${assemblyName}__${qualifier.configuration}__${dotNetFramework}`, + `${assemblyName}__${qualifier.configuration}__${dotNetFramework}`, [mainSpecName])), ] }, @@ -122,8 +122,8 @@ namespace StandaloneTest { @@public export function deploy( - testDeployment: Deployment.OnDiskDeployment, - testFramework: Managed.TestFramework, + testDeployment: Deployment.OnDiskDeployment, + testFramework: Managed.TestFramework, deploymentOptions?: Deployment.DeploymentOptions, subfolder?: PathAtom, parallelCategories?: string[], @@ -131,7 +131,7 @@ namespace StandaloneTest { skipCategories?: string[], untrackTestDirectory?: boolean, testClasses?: string[]) { - + if (!StandaloneTestUtils.shouldDeployStandaloneTest) return undefined; return deployTestDefinition(createTestDeploymentDefinition( testDeployment, diff --git a/Public/Sdk/SelfHost/BuildXL/Tools/LogGenerator/LogGenerator.dsc b/Public/Sdk/SelfHost/BuildXL/Tools/LogGenerator/LogGenerator.dsc index 47ce20f80..f6dc60d91 100644 --- a/Public/Sdk/SelfHost/BuildXL/Tools/LogGenerator/LogGenerator.dsc +++ b/Public/Sdk/SelfHost/BuildXL/Tools/LogGenerator/LogGenerator.dsc @@ -40,7 +40,7 @@ export const defaultArgs: Arguments = { outputFile: undefined, references: [], sources: [], - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "win-x64", }; diff --git a/Public/Sdk/SelfHost/Libraries/RocksDbSharp/rocksDbSharp.dsc b/Public/Sdk/SelfHost/Libraries/RocksDbSharp/rocksDbSharp.dsc index ad305f9d8..1d462386d 100644 --- a/Public/Sdk/SelfHost/Libraries/RocksDbSharp/rocksDbSharp.dsc +++ b/Public/Sdk/SelfHost/Libraries/RocksDbSharp/rocksDbSharp.dsc @@ -4,7 +4,7 @@ import * as Managed from "Sdk.Managed"; import * as Deployment from "Sdk.Deployment"; -export declare const qualifier: {targetFramework: "netcoreapp2.2" | "netstandard1.6" | "net472" | "net461" | "net451" | "net45" }; +export declare const qualifier: {targetFramework: "netcoreapp3.0" | "netstandard1.6" | "net472" | "net461" | "net451" | "net45" }; const nativePackage = importFrom("RocksDbNative").pkg; const managedPackage = importFrom("RocksDbSharpSigned").withQualifier({targetFramework: "net451"}).pkg; @@ -13,10 +13,10 @@ const managedPackage = importFrom("RocksDbSharpSigned").withQualifier({targetFra export const pkg = managedPackage.override({ name: "RocksDbSharp", version: nativePackage.version, - runtimeContent: { - contents: [ { + runtimeContent: { + contents: [ { subfolder: r`native`, contents: [ Deployment.createFromFilteredStaticDirectory(nativePackage.contents, r`build/native`) ] } - ] + ] }, }); diff --git a/Public/Sdk/SelfHost/Libraries/Sqlite/sqlite.dsc b/Public/Sdk/SelfHost/Libraries/Sqlite/sqlite.dsc index f54ed8081..5199f778c 100644 --- a/Public/Sdk/SelfHost/Libraries/Sqlite/sqlite.dsc +++ b/Public/Sdk/SelfHost/Libraries/Sqlite/sqlite.dsc @@ -4,7 +4,7 @@ import * as Deployment from "Sdk.Deployment"; export declare const qualifier : { - targetFramework: "netcoreapp2.2" | "net472" | "net461" | "net451", + targetFramework: "netcoreapp3.0" | "net472" | "net461" | "net451", targetRuntime: "osx-x64" | "win-x64" }; @@ -14,7 +14,7 @@ const SQLiteCorePackageContents = importFrom("System.Data.SQLite.Core").Contents function getInteropFile() : File { switch (qualifier.targetFramework) { - case "netcoreapp2.2": + case "netcoreapp3.0": return SQLiteCorePackageContents.getFile(r`runtimes/${qualifier.targetRuntime}/native/netstandard2.0/SQLite.Interop.dll`); case "net472": return SQLiteCorePackageContents.getFile("build/net46/x64/SQLite.Interop.dll"); diff --git a/Public/Sdk/SelfHost/RuntimeContracts/RuntimeContracts.dsc b/Public/Sdk/SelfHost/RuntimeContracts/RuntimeContracts.dsc index 1cafce771..b8d7356b5 100644 --- a/Public/Sdk/SelfHost/RuntimeContracts/RuntimeContracts.dsc +++ b/Public/Sdk/SelfHost/RuntimeContracts/RuntimeContracts.dsc @@ -5,7 +5,7 @@ import * as Managed from "Sdk.Managed"; export declare const qualifier: { configuration: "debug" | "release"; - targetFramework: "netcoreapp2.2" | "netstandard2.0" | "netstandard1.1" | "net472" | "net462" | "net461" | "net46" | "net452" | "net451" | "net45"; + targetFramework: "netcoreapp3.0" | "netstandard2.0" | "netstandard1.1" | "net472" | "net462" | "net461" | "net46" | "net452" | "net451" | "net45"; }; /** Configures which asserts should be checked at runtime. */ diff --git a/Public/Sdk/SelfHost/VisualStudio/VisualStudio.LanguageServer.Protocol/package.dsc b/Public/Sdk/SelfHost/VisualStudio/VisualStudio.LanguageServer.Protocol/package.dsc index f20006c13..84be8b1d0 100644 --- a/Public/Sdk/SelfHost/VisualStudio/VisualStudio.LanguageServer.Protocol/package.dsc +++ b/Public/Sdk/SelfHost/VisualStudio/VisualStudio.LanguageServer.Protocol/package.dsc @@ -1,7 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -export declare const qualifier: { targetFramework: "netcoreapp2.2" | "netstandard2.0" | "net451" | "net461" | "net472"}; +export declare const qualifier: { targetFramework: "netcoreapp3.0" | "netstandard2.0" | "net451" | "net461" | "net472"}; import * as Managed from "Sdk.Managed"; @@ -13,7 +13,7 @@ const package = importFrom("Microsoft.VisualStudio.LanguageServer.Protocol").wit @@public export const pkg: Managed.ManagedNugetPackage = (() => { switch (qualifier.targetFramework) { - case "netcoreapp2.2": + case "netcoreapp3.0": case "netstandard2.0": case "net451": case "net461": diff --git a/Public/Src/App/Bxl/MachineInfo.cs b/Public/Src/App/Bxl/MachineInfo.cs index 696b30604..3a7e2d0bd 100644 --- a/Public/Src/App/Bxl/MachineInfo.cs +++ b/Public/Src/App/Bxl/MachineInfo.cs @@ -68,7 +68,16 @@ namespace BuildXL mi.OsVersion = OperatingSystemHelper.GetOSVersion(); mi.ProcessorName = OperatingSystemHelper.GetProcessorName(); mi.ProcessorIdentifier = OperatingSystemHelper.GetProcessorIdentifier(); - mi.EnvironmentVersion = Environment.Version.ToString(4); + + try { + mi.EnvironmentVersion = Environment.Version.ToString(4); + } + catch (ArgumentException) + { + // Fallback for .NETCore3.0, which currently reports "3.0.0" only + mi.EnvironmentVersion = Environment.Version.ToString(); + } + mi.InstalledMemoryMB = OperatingSystemHelper.GetPhysicalMemorySize().MB; char currentDrive = Environment.CurrentDirectory[0]; diff --git a/Public/Src/App/UnitTests/IntegrationTest.BuildXL.Executable/IntegrationTest.BuildXL.Executable.dsc b/Public/Src/App/UnitTests/IntegrationTest.BuildXL.Executable/IntegrationTest.BuildXL.Executable.dsc index 66cf1e103..83670470e 100644 --- a/Public/Src/App/UnitTests/IntegrationTest.BuildXL.Executable/IntegrationTest.BuildXL.Executable.dsc +++ b/Public/Src/App/UnitTests/IntegrationTest.BuildXL.Executable/IntegrationTest.BuildXL.Executable.dsc @@ -11,7 +11,7 @@ namespace IntegrationTest.BuildXL.Executable { export declare const qualifier : { configuration: "debug" | "release", - targetFramework: "net461" | "net472" | "netcoreapp2.2" | "netstandard2.0", + targetFramework: "net461" | "net472" | "netcoreapp3.0" | "netstandard2.0", targetRuntime: "win-x64" }; diff --git a/Public/Src/Cache/ContentStore/Distributed/NuCache/LocalLocationStore.cs b/Public/Src/Cache/ContentStore/Distributed/NuCache/LocalLocationStore.cs index bd6700b25..88cd355b2 100644 --- a/Public/Src/Cache/ContentStore/Distributed/NuCache/LocalLocationStore.cs +++ b/Public/Src/Cache/ContentStore/Distributed/NuCache/LocalLocationStore.cs @@ -330,7 +330,9 @@ namespace BuildXL.Cache.ContentStore.Distributed.NuCache } } +#pragma warning disable AsyncFixer02 _heartbeatTimer?.Dispose(); +#pragma warning restore AsyncFixer02 if (EventStore != null) { @@ -429,7 +431,7 @@ namespace BuildXL.Cache.ContentStore.Distributed.NuCache } else { - // Stop receiving events. + // Stop receiving events. result = EventStore.SuspendProcessing(context); } @@ -440,7 +442,7 @@ namespace BuildXL.Cache.ContentStore.Distributed.NuCache if (newRole == Role.Master) { - // Only create a checkpoint if the machine is currently a master machine and was a master machine + // Only create a checkpoint if the machine is currently a master machine and was a master machine if (ShouldSchedule(_configuration.Checkpoint.CreateCheckpointInterval, _lastCheckpointTime)) { result = await CreateCheckpointAsync(context); @@ -453,7 +455,7 @@ namespace BuildXL.Cache.ContentStore.Distributed.NuCache } } - // Successfully, applied changes for role. Set it as the current role. + // Successfully, applied changes for role. Set it as the current role. CurrentRole = newRole; return result; diff --git a/Public/Src/Cache/ContentStore/DistributedTest/ContentLocation/LocalLocationStoreDistributedContentTests.cs b/Public/Src/Cache/ContentStore/DistributedTest/ContentLocation/LocalLocationStoreDistributedContentTests.cs index c578ab6d2..d5289408f 100644 --- a/Public/Src/Cache/ContentStore/DistributedTest/ContentLocation/LocalLocationStoreDistributedContentTests.cs +++ b/Public/Src/Cache/ContentStore/DistributedTest/ContentLocation/LocalLocationStoreDistributedContentTests.cs @@ -895,7 +895,9 @@ namespace ContentStoreTest.Distributed.Sessions contentHash, Token).ShouldBeSuccess(); +#pragma warning disable AsyncFixer02 openStreamResult.Stream.Dispose(); +#pragma warning restore AsyncFixer02 }); } @@ -1172,7 +1174,7 @@ namespace ContentStoreTest.Distributed.Sessions // Increment the time to ensure master lease expires // then heartbeat worker first to ensure it steals the lease // Master heartbeat trigger it to become a worker since the other - // machine will + // machine will TestClock.UtcNow += masterLeaseExpiryTime; TestClock.UtcNow += TimeSpan.FromMinutes(masterLeaseExpiryTime.TotalMinutes * 2); await workerRedisStore.LocalLocationStore.HeartbeatAsync(context).ShouldBeSuccess(); diff --git a/Public/Src/Cache/ContentStore/GrpcTest/BuildXL.Cache.ContentStore.Grpc.Test.dsc b/Public/Src/Cache/ContentStore/GrpcTest/BuildXL.Cache.ContentStore.Grpc.Test.dsc index f788732d9..5c7e619dd 100644 --- a/Public/Src/Cache/ContentStore/GrpcTest/BuildXL.Cache.ContentStore.Grpc.Test.dsc +++ b/Public/Src/Cache/ContentStore/GrpcTest/BuildXL.Cache.ContentStore.Grpc.Test.dsc @@ -11,26 +11,28 @@ namespace GrpcTest { }, skipTestRun: BuildXLSdk.restrictTestRunToDebugNet461OnWindows, references: [ + App.exe, // Tests launch the server, so this needs to be deployed. + Grpc.dll, + Test.dll, + Hashing.dll, + Library.dll, + Interfaces.dll, + UtilitiesCore.dll, + InterfacesTest.dll, + ...addIf(BuildXLSdk.isFullFramework, NetFx.System.Xml.dll, NetFx.System.Xml.Linq.dll ), + ...(BuildXLSdk.isDotNetCoreBuild // TODO: This is to get a .Net Core build, but it may not pass tests ? [importFrom("System.Data.SQLite").withQualifier({targetFramework: "net461"}).pkg] : [importFrom("System.Data.SQLite").pkg] ), + importFrom("Grpc.Core").pkg, importFrom("Google.Protobuf").pkg, - - Grpc.dll, - Interfaces.dll, - Hashing.dll, - UtilitiesCore.dll, - InterfacesTest.dll, - Library.dll, - Test.dll, - App.exe, // Tests launch the server, so this needs to be deployed. ...BuildXLSdk.fluentAssertionsWorkaround, ], runtimeContent: [ diff --git a/Public/Src/Cache/ContentStore/Interfaces/BuildXL.Cache.ContentStore.Interfaces.dsc b/Public/Src/Cache/ContentStore/Interfaces/BuildXL.Cache.ContentStore.Interfaces.dsc index 1a3a79d6d..7158ba648 100644 --- a/Public/Src/Cache/ContentStore/Interfaces/BuildXL.Cache.ContentStore.Interfaces.dsc +++ b/Public/Src/Cache/ContentStore/Interfaces/BuildXL.Cache.ContentStore.Interfaces.dsc @@ -4,6 +4,7 @@ import * as Deployment from "Sdk.Deployment"; import * as ILRepack from "Sdk.Managed.Tools.ILRepack"; import * as Shared from "Sdk.Managed.Shared"; +import * as NetCoreApp from "Sdk.Managed.Frameworks.NetCoreApp3.0"; namespace Interfaces { export declare const qualifier : BuildXLSdk.DefaultQualifierWithNet451AndNetStandard20; @@ -13,9 +14,8 @@ namespace Interfaces { assemblyName: "BuildXL.Cache.ContentStore.Interfaces", sources: globR(d`.`, "*.cs"), references: [ - UtilitiesCore.dll, Hashing.dll, - + UtilitiesCore.dll, ...addIfLazy(BuildXLSdk.isFullFramework, () => [ NetFx.System.Runtime.Serialization.dll, NetFx.System.Xml.dll, @@ -31,6 +31,6 @@ namespace Interfaces { "BuildXL.Cache.ContentStore", "BuildXL.Cache.ContentStore.Distributed", "BuildXL.Cache.ContentStore.Interfaces.Test", - ], + ] }); } diff --git a/Public/Src/Cache/ContentStore/Interfaces/Extensions/AsyncEnumerableExtensions.cs b/Public/Src/Cache/ContentStore/Interfaces/Extensions/AsyncEnumerableExtensions.cs index b51f64c65..a191df8f9 100644 --- a/Public/Src/Cache/ContentStore/Interfaces/Extensions/AsyncEnumerableExtensions.cs +++ b/Public/Src/Cache/ContentStore/Interfaces/Extensions/AsyncEnumerableExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Linq; @@ -9,6 +11,7 @@ using BuildXL.Cache.ContentStore.Interfaces.Results; namespace BuildXL.Cache.ContentStore.Interfaces.Extensions { + /// /// Extension methods for Async Enumerables. /// @@ -19,7 +22,7 @@ namespace BuildXL.Cache.ContentStore.Interfaces.Extensions /// when there's a single call that produces the enumerable asynchronously followed by the items being enumerated. /// The type is a resultbase to guarantee that the producer task will not throw. /// - public static IAsyncEnumerable CreateSingleProducerTaskAsyncEnumerable( + public static Async::System.Collections.Generic.IAsyncEnumerable CreateSingleProducerTaskAsyncEnumerable( Func>> producerTaskFunc) where T : ResultBase { @@ -43,7 +46,7 @@ namespace BuildXL.Cache.ContentStore.Interfaces.Extensions /// /// Converts an enumerable of tasks to an async enumerable of task results /// - public static IAsyncEnumerable ToResultsAsyncEnumerable(this IEnumerable> tasks) + public static Async::System.Collections.Generic.IAsyncEnumerable ToResultsAsyncEnumerable(this IEnumerable> tasks) { return AsyncEnumerable.CreateEnumerable( () => diff --git a/Public/Src/Cache/ContentStore/InterfacesTest/FileSystem/AbsFileSystemTests.cs b/Public/Src/Cache/ContentStore/InterfacesTest/FileSystem/AbsFileSystemTests.cs index f161c034b..7e070fc60 100644 --- a/Public/Src/Cache/ContentStore/InterfacesTest/FileSystem/AbsFileSystemTests.cs +++ b/Public/Src/Cache/ContentStore/InterfacesTest/FileSystem/AbsFileSystemTests.cs @@ -1054,7 +1054,9 @@ namespace BuildXL.Cache.ContentStore.InterfacesTest.FileSystem using (var stream = await FileSystem.OpenAsync( source, FileAccess.Write, FileMode.CreateNew, ShareDelete)) { +#pragma warning disable AsyncFixer02 stream.Dispose(); +#pragma warning restore AsyncFixer02 } } } diff --git a/Public/Src/Cache/ContentStore/InterfacesTest/Sessions/ContentSessionTests.cs b/Public/Src/Cache/ContentStore/InterfacesTest/Sessions/ContentSessionTests.cs index fb7483086..faf0cab1c 100644 --- a/Public/Src/Cache/ContentStore/InterfacesTest/Sessions/ContentSessionTests.cs +++ b/Public/Src/Cache/ContentStore/InterfacesTest/Sessions/ContentSessionTests.cs @@ -39,7 +39,7 @@ namespace BuildXL.Cache.ContentStore.InterfacesTest.Sessions protected readonly ILogger Logger; private readonly bool _canHibernate; - + private bool _disposed; /// @@ -276,7 +276,9 @@ namespace BuildXL.Cache.ContentStore.InterfacesTest.Sessions { // Open should not pin this content, allowing eviction on the next put. var r = await session.OpenStreamAsync(context, contentHash, Token).ShouldBeSuccess(); +#pragma warning disable AsyncFixer02 r.Stream.Dispose(); +#pragma warning restore AsyncFixer02 // This put should succeed after the first content is evicted. await session.PutRandomAsync(context, ContentHashType, false, MaxSize, Token).ShouldBeSuccess(); diff --git a/Public/Src/Cache/ContentStore/Library/Extensions/StreamExtensions.cs b/Public/Src/Cache/ContentStore/Library/Extensions/StreamExtensions.cs index 3be4b8355..67e130682 100644 --- a/Public/Src/Cache/ContentStore/Library/Extensions/StreamExtensions.cs +++ b/Public/Src/Cache/ContentStore/Library/Extensions/StreamExtensions.cs @@ -28,7 +28,9 @@ namespace BuildXL.Cache.ContentStore.Extensions if (dispose) { +#pragma warning disable AsyncFixer02 stream.Dispose(); +#pragma warning restore AsyncFixer02 } return content.ToArray(); diff --git a/Public/Src/Cache/ContentStore/Test/Sessions/ContentPerformanceTests.cs b/Public/Src/Cache/ContentStore/Test/Sessions/ContentPerformanceTests.cs index 5353f086f..c24e535f2 100644 --- a/Public/Src/Cache/ContentStore/Test/Sessions/ContentPerformanceTests.cs +++ b/Public/Src/Cache/ContentStore/Test/Sessions/ContentPerformanceTests.cs @@ -158,7 +158,10 @@ namespace ContentStoreTest.Performance.Sessions results.All(r => r.Succeeded).Should().BeTrue(); results.All(r => r.Stream != null).Should().BeTrue(); - results.ForEach(r => r.Stream.Dispose()); + results.ForEach(r => +#pragma warning disable AsyncFixer02 + r.Stream.Dispose()); +#pragma warning restore AsyncFixer02 } private async Task OpenStreamAsync( @@ -251,7 +254,10 @@ namespace ContentStoreTest.Performance.Sessions session => Task.FromResult(0), session => PutStreamAsync(session, streams, results)); - streams.ForEach(s => s.Dispose()); + streams.ForEach(s => +#pragma warning disable AsyncFixer02 + s.Dispose()); +#pragma warning restore AsyncFixer02 results.All(r => r.Succeeded).Should().BeTrue(); } diff --git a/Public/Src/Cache/MemoizationStore/Distributed/Sessions/ReadOnlyDistributedCacheSession.cs b/Public/Src/Cache/MemoizationStore/Distributed/Sessions/ReadOnlyDistributedCacheSession.cs index dac79fbd4..0aa48d223 100644 --- a/Public/Src/Cache/MemoizationStore/Distributed/Sessions/ReadOnlyDistributedCacheSession.cs +++ b/Public/Src/Cache/MemoizationStore/Distributed/Sessions/ReadOnlyDistributedCacheSession.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Diagnostics.ContractsLight; @@ -97,7 +99,7 @@ namespace BuildXL.Cache.MemoizationStore.Distributed.Sessions } /// - public IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) + public Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { return this.GetSelectorsAsAsyncEnumerable(context, weakFingerprint, cts, urgencyHint); } diff --git a/Public/Src/Cache/MemoizationStore/Distributed/Stores/DistributedCache.cs b/Public/Src/Cache/MemoizationStore/Distributed/Stores/DistributedCache.cs index eaddd7123..640468e09 100644 --- a/Public/Src/Cache/MemoizationStore/Distributed/Stores/DistributedCache.cs +++ b/Public/Src/Cache/MemoizationStore/Distributed/Stores/DistributedCache.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; @@ -236,7 +238,7 @@ namespace BuildXL.Cache.MemoizationStore.Distributed.Stores } /// - public IAsyncEnumerable> EnumerateStrongFingerprints(Context context) + public Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context) { return _innerICache.EnumerateStrongFingerprints(context); } diff --git a/Public/Src/Cache/MemoizationStore/Interfaces/Caches/ICache.cs b/Public/Src/Cache/MemoizationStore/Interfaces/Caches/ICache.cs index 6a48b17e8..8c9a30762 100644 --- a/Public/Src/Cache/MemoizationStore/Interfaces/Caches/ICache.cs +++ b/Public/Src/Cache/MemoizationStore/Interfaces/Caches/ICache.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Threading.Tasks; @@ -43,6 +45,6 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Caches /// /// Asynchronously enumerates the known strong fingerprints. /// - IAsyncEnumerable> EnumerateStrongFingerprints(Context context); + Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context); } } diff --git a/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/IReadOnlyMemoizationSession.cs b/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/IReadOnlyMemoizationSession.cs index 565730cbe..16249a24c 100644 --- a/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/IReadOnlyMemoizationSession.cs +++ b/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/IReadOnlyMemoizationSession.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -20,7 +22,7 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Sessions /// /// Gets known selectors for a given weak fingerprint. /// - IAsyncEnumerable GetSelectors( + Async::System.Collections.Generic.IAsyncEnumerable GetSelectors( Context context, Fingerprint weakFingerprint, CancellationToken cts, diff --git a/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/ReadOnlyMemoizationSessionExtensions.cs b/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/ReadOnlyMemoizationSessionExtensions.cs index 1c6a0a513..665cce6fc 100644 --- a/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/ReadOnlyMemoizationSessionExtensions.cs +++ b/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/ReadOnlyMemoizationSessionExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Linq; @@ -54,7 +56,7 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Sessions /// /// Enumerate known selectors for a given weak fingerprint. /// - public static IAsyncEnumerable GetSelectorsAsAsyncEnumerable( + public static Async::System.Collections.Generic.IAsyncEnumerable GetSelectorsAsAsyncEnumerable( this IReadOnlyMemoizationSessionWithLevelSelectors session, Context context, Fingerprint weakFingerprint, @@ -71,7 +73,7 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Sessions /// /// Enumerates a given until the predicate returns true. /// - private static IAsyncEnumerable StopAfter(this IAsyncEnumerable enumerable, Func predicate) + private static Async::System.Collections.Generic.IAsyncEnumerable StopAfter(this Async::System.Collections.Generic.IAsyncEnumerable enumerable, Func predicate) { return AsyncEnumerable.CreateEnumerable( () => @@ -103,7 +105,7 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Sessions }); } - private static IAsyncEnumerable ToSelectorResults(Result levelResult) + private static Async::System.Collections.Generic.IAsyncEnumerable ToSelectorResults(Result levelResult) { IEnumerable selectorResults; if (!levelResult) @@ -118,7 +120,7 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Sessions return selectorResults.ToAsyncEnumerable(); } - private static IAsyncEnumerable> GetLevelSelectorsEnumerableAsync( + private static Async::System.Collections.Generic.IAsyncEnumerable> GetLevelSelectorsEnumerableAsync( this IReadOnlyMemoizationSessionWithLevelSelectors session, Context context, Fingerprint weakFingerprint, diff --git a/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/ReadOnlyOneLevelCacheSession.cs b/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/ReadOnlyOneLevelCacheSession.cs index 2a243d78a..28bde2795 100644 --- a/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/ReadOnlyOneLevelCacheSession.cs +++ b/Public/Src/Cache/MemoizationStore/Interfaces/Sessions/ReadOnlyOneLevelCacheSession.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Diagnostics.ContractsLight; @@ -85,14 +87,14 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Sessions public virtual async Task StartupAsync(Context context) { StartupStarted = true; - + var startupContentResult = await _contentReadOnlySession.StartupAsync(context).ConfigureAwait(false); if (!startupContentResult.Succeeded) { StartupCompleted = true; return new BoolResult(startupContentResult, "Content session startup failed"); } - + var startupMemoizationResult = await _memoizationReadOnlySession.StartupAsync(context).ConfigureAwait(false); if (!startupMemoizationResult.Succeeded) { @@ -180,7 +182,7 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Sessions /// - public IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) + public Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { return this.GetSelectorsAsAsyncEnumerable(context, weakFingerprint, cts, urgencyHint); } diff --git a/Public/Src/Cache/MemoizationStore/Interfaces/Stores/IMemoizationStore.cs b/Public/Src/Cache/MemoizationStore/Interfaces/Stores/IMemoizationStore.cs index 6a361182b..f7032fda6 100644 --- a/Public/Src/Cache/MemoizationStore/Interfaces/Stores/IMemoizationStore.cs +++ b/Public/Src/Cache/MemoizationStore/Interfaces/Stores/IMemoizationStore.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System.Collections.Generic; using System.Threading.Tasks; using BuildXL.Cache.ContentStore.Interfaces.Results; @@ -49,6 +51,6 @@ namespace BuildXL.Cache.MemoizationStore.Interfaces.Stores /// /// Asynchronously enumerates the known strong fingerprints. /// - IAsyncEnumerable> EnumerateStrongFingerprints(Context context); + Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context); } } diff --git a/Public/Src/Cache/MemoizationStore/InterfacesTest/Results/ThrowingCacheSession.cs b/Public/Src/Cache/MemoizationStore/InterfacesTest/Results/ThrowingCacheSession.cs index 2571cb56a..0ac6cb26d 100644 --- a/Public/Src/Cache/MemoizationStore/InterfacesTest/Results/ThrowingCacheSession.cs +++ b/Public/Src/Cache/MemoizationStore/InterfacesTest/Results/ThrowingCacheSession.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System.Collections.Generic; using System.IO; using System.Threading; @@ -55,7 +57,7 @@ namespace BuildXL.Cache.MemoizationStore.InterfacesTest.Results } /// - public IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) + public Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { throw new System.NotImplementedException(); } diff --git a/Public/Src/Cache/MemoizationStore/Library/Service/ServiceClientCache.cs b/Public/Src/Cache/MemoizationStore/Library/Service/ServiceClientCache.cs index 896f76b64..9897efde1 100644 --- a/Public/Src/Cache/MemoizationStore/Library/Service/ServiceClientCache.cs +++ b/Public/Src/Cache/MemoizationStore/Library/Service/ServiceClientCache.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Linq; @@ -63,7 +65,7 @@ namespace BuildXL.Cache.MemoizationStore.Service } /// - public IAsyncEnumerable> EnumerateStrongFingerprints(Context context) + public Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context) { return AsyncEnumerable.Empty>(); } diff --git a/Public/Src/Cache/MemoizationStore/Library/Service/ServiceClientCacheSession.cs b/Public/Src/Cache/MemoizationStore/Library/Service/ServiceClientCacheSession.cs index c1ccdff28..beaf647ff 100644 --- a/Public/Src/Cache/MemoizationStore/Library/Service/ServiceClientCacheSession.cs +++ b/Public/Src/Cache/MemoizationStore/Library/Service/ServiceClientCacheSession.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Runtime.CompilerServices; @@ -81,7 +83,7 @@ namespace BuildXL.Cache.MemoizationStore.Service } /// - public IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) + public Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { return this.GetSelectorsAsAsyncEnumerable(context, weakFingerprint, cts, urgencyHint); } diff --git a/Public/Src/Cache/MemoizationStore/Library/Sessions/OneLevelCache.cs b/Public/Src/Cache/MemoizationStore/Library/Sessions/OneLevelCache.cs index 1b28df9bc..d7364c10c 100644 --- a/Public/Src/Cache/MemoizationStore/Library/Sessions/OneLevelCache.cs +++ b/Public/Src/Cache/MemoizationStore/Library/Sessions/OneLevelCache.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Diagnostics.ContractsLight; @@ -311,7 +313,7 @@ namespace BuildXL.Cache.MemoizationStore.Sessions } /// - public IAsyncEnumerable> EnumerateStrongFingerprints(Context context) + public Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context) { return MemoizationStore.EnumerateStrongFingerprints(context); } diff --git a/Public/Src/Cache/MemoizationStore/Library/Sessions/ReadOnlyMemoryMemoizationSession.cs b/Public/Src/Cache/MemoizationStore/Library/Sessions/ReadOnlyMemoryMemoizationSession.cs index f7828413e..9141c63bf 100644 --- a/Public/Src/Cache/MemoizationStore/Library/Sessions/ReadOnlyMemoryMemoizationSession.cs +++ b/Public/Src/Cache/MemoizationStore/Library/Sessions/ReadOnlyMemoryMemoizationSession.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System.Collections.Generic; using System.Diagnostics.ContractsLight; using System.Threading; @@ -42,7 +44,7 @@ namespace BuildXL.Cache.MemoizationStore.Sessions public string Name { get; } /// - public IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) + public Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { return this.GetSelectorsAsAsyncEnumerable(context, weakFingerprint, cts, urgencyHint); } diff --git a/Public/Src/Cache/MemoizationStore/Library/Sessions/ReadOnlySQLiteMemoizationSession.cs b/Public/Src/Cache/MemoizationStore/Library/Sessions/ReadOnlySQLiteMemoizationSession.cs index 222b79a10..471e27e0e 100644 --- a/Public/Src/Cache/MemoizationStore/Library/Sessions/ReadOnlySQLiteMemoizationSession.cs +++ b/Public/Src/Cache/MemoizationStore/Library/Sessions/ReadOnlySQLiteMemoizationSession.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System.Collections.Generic; using System.Diagnostics.ContractsLight; using System.Threading; @@ -42,7 +44,7 @@ namespace BuildXL.Cache.MemoizationStore.Sessions public string Name { get; } /// - public IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) + public Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { return this.GetSelectorsAsAsyncEnumerable(context, weakFingerprint, cts, urgencyHint); } diff --git a/Public/Src/Cache/MemoizationStore/Library/Stores/MemoryMemoizationStore.cs b/Public/Src/Cache/MemoizationStore/Library/Stores/MemoryMemoizationStore.cs index 67057827f..95ed4656a 100644 --- a/Public/Src/Cache/MemoizationStore/Library/Stores/MemoryMemoizationStore.cs +++ b/Public/Src/Cache/MemoizationStore/Library/Stores/MemoryMemoizationStore.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Diagnostics; @@ -91,7 +93,7 @@ namespace BuildXL.Cache.MemoizationStore.Stores /// /// Enumerate known selectors for a given weak fingerprint. /// - internal IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts) + internal Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts) { var result = GetSelectorsCore(context, weakFingerprint, cts); if (result) @@ -164,7 +166,7 @@ namespace BuildXL.Cache.MemoizationStore.Stores CancellationToken cts) { using (var cancellableContext = TrackShutdown(context, cts)) - { + { return await AddOrGetContentHashListCall.RunAsync(_tracer, cancellableContext, strongFingerprint, async () => { using (await _lockSet.AcquireAsync(strongFingerprint.WeakFingerprint).ConfigureAwait(false)) @@ -220,7 +222,7 @@ namespace BuildXL.Cache.MemoizationStore.Stores } /// - public IAsyncEnumerable> EnumerateStrongFingerprints(Context context) + public Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context) { return _records.Select(record => new StructResult(record.StrongFingerprint)).ToAsyncEnumerable(); } diff --git a/Public/Src/Cache/MemoizationStore/Library/Stores/SQLiteMemoizationStore.cs b/Public/Src/Cache/MemoizationStore/Library/Stores/SQLiteMemoizationStore.cs index 8dad8b2cd..e84026fbf 100644 --- a/Public/Src/Cache/MemoizationStore/Library/Stores/SQLiteMemoizationStore.cs +++ b/Public/Src/Cache/MemoizationStore/Library/Stores/SQLiteMemoizationStore.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Data.SQLite; @@ -321,7 +323,7 @@ namespace BuildXL.Cache.MemoizationStore.Stores } /// - public IAsyncEnumerable> EnumerateStrongFingerprints(Context context) + public Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context) { context.Debug($"{nameof(SQLiteMemoizationStore)}.{nameof(EnumerateStrongFingerprints)}({context.Id})"); return AsyncEnumerable.CreateEnumerable( @@ -389,7 +391,7 @@ namespace BuildXL.Cache.MemoizationStore.Stores /// /// Enumerate known selectors for a given weak fingerprint. /// - internal IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts) + internal Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts) { return AsyncEnumerableExtensions.CreateSingleProducerTaskAsyncEnumerable(() => getSelectorsCore()); diff --git a/Public/Src/Cache/MemoizationStore/Test/BuildXL.Cache.MemoizationStore.Test.dsc b/Public/Src/Cache/MemoizationStore/Test/BuildXL.Cache.MemoizationStore.Test.dsc index a71d78f94..0c7da36f8 100644 --- a/Public/Src/Cache/MemoizationStore/Test/BuildXL.Cache.MemoizationStore.Test.dsc +++ b/Public/Src/Cache/MemoizationStore/Test/BuildXL.Cache.MemoizationStore.Test.dsc @@ -20,7 +20,7 @@ namespace Test { ...(BuildXLSdk.isDotNetCoreBuild // TODO: This is to get a .Net Core build, but it may not pass tests ? [importFrom("System.Data.SQLite.Core").withQualifier({targetFramework: "net461"}).pkg] - // Gets around issue of 461 needed netstandard 2.0 lib + // Gets around issue of 461 needed netstandard 2.0 lib : [importFrom("System.Data.SQLite.Core").pkg] ), ContentStore.Hashing.dll, @@ -35,7 +35,6 @@ namespace Test { Library.dll, importFrom("BuildXL.Utilities").dll, - importFrom("System.Interactive.Async").pkg, ...BuildXLSdk.fluentAssertionsWorkaround, ], diff --git a/Public/Src/Cache/MemoizationStore/Test/Sessions/LocalCacheTests.cs b/Public/Src/Cache/MemoizationStore/Test/Sessions/LocalCacheTests.cs index 93e259b6c..148f3d198 100644 --- a/Public/Src/Cache/MemoizationStore/Test/Sessions/LocalCacheTests.cs +++ b/Public/Src/Cache/MemoizationStore/Test/Sessions/LocalCacheTests.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.IO; @@ -181,7 +183,7 @@ namespace BuildXL.Cache.MemoizationStore.Test.Sessions { return RunCacheAndSessionTestAsync(async (cache, session, context) => { - IAsyncEnumerable enumerator = session.GetSelectors(context, Fingerprint.Random(), Token); + Async::System.Collections.Generic.IAsyncEnumerable enumerator = session.GetSelectors(context, Fingerprint.Random(), Token); await enumerator.ToList(CancellationToken.None); long counter = await GetCounterValue("GetSelectorsCall", cache, context); counter.Should().Be(1); diff --git a/Public/Src/Cache/MemoizationStore/Test/Sessions/MemoizationPerformanceTests.cs b/Public/Src/Cache/MemoizationStore/Test/Sessions/MemoizationPerformanceTests.cs index c9220d824..ad5938bcd 100644 --- a/Public/Src/Cache/MemoizationStore/Test/Sessions/MemoizationPerformanceTests.cs +++ b/Public/Src/Cache/MemoizationStore/Test/Sessions/MemoizationPerformanceTests.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Diagnostics; @@ -295,7 +297,7 @@ namespace BuildXL.Cache.MemoizationStore.Test.Performance.Sessions foreach (var weakFingerprint in weakFingerprints) { var getSelectorsEnumerator = session.GetSelectors(context, weakFingerprint, Token); - IAsyncEnumerator enumerator = getSelectorsEnumerator.GetEnumerator(); + Async::System.Collections.Generic.IAsyncEnumerator enumerator = getSelectorsEnumerator.GetEnumerator(); while (await enumerator.MoveNext(CancellationToken.None)) { GetSelectorResult result = enumerator.Current; diff --git a/Public/Src/Cache/MemoizationStore/Test/Sessions/OneLevelCacheTests.Mocks.cs b/Public/Src/Cache/MemoizationStore/Test/Sessions/OneLevelCacheTests.Mocks.cs index 55454ec54..c86db82b8 100644 --- a/Public/Src/Cache/MemoizationStore/Test/Sessions/OneLevelCacheTests.Mocks.cs +++ b/Public/Src/Cache/MemoizationStore/Test/Sessions/OneLevelCacheTests.Mocks.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.IO; @@ -190,7 +192,7 @@ namespace BuildXL.Cache.MemoizationStore.Test.Sessions { } - public IAsyncEnumerable> EnumerateStrongFingerprints(Context context) + public Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context) { throw new NotImplementedException(); } @@ -245,7 +247,7 @@ namespace BuildXL.Cache.MemoizationStore.Test.Sessions } /// - public IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) + public Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { return this.GetSelectorsAsAsyncEnumerable(context, weakFingerprint, cts, urgencyHint); } @@ -256,7 +258,7 @@ namespace BuildXL.Cache.MemoizationStore.Test.Sessions GetSelectorsParams.Add(weakFingerprint); return Task.FromResult(Result.Success(new LevelSelectors(new Selector[0], hasMore: false))); } - + public Task IncorporateStrongFingerprintsAsync(Context context, IEnumerable> strongFingerprints, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { IncorporateStringFingerprintsAsyncParams.Add(strongFingerprints); diff --git a/Public/Src/Cache/MemoizationStore/Test/Sessions/TestInProcessServiceClientCache.cs b/Public/Src/Cache/MemoizationStore/Test/Sessions/TestInProcessServiceClientCache.cs index 98473cdd3..38dac2efb 100644 --- a/Public/Src/Cache/MemoizationStore/Test/Sessions/TestInProcessServiceClientCache.cs +++ b/Public/Src/Cache/MemoizationStore/Test/Sessions/TestInProcessServiceClientCache.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Threading; @@ -94,7 +96,7 @@ namespace BuildXL.Cache.MemoizationStore.Test.Sessions public Task GetStatsAsync(Context context) => _client.GetStatsAsync(context); /// - public IAsyncEnumerable> EnumerateStrongFingerprints(Context context) => _client.EnumerateStrongFingerprints(context); + public Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context) => _client.EnumerateStrongFingerprints(context); private static void SetThreadPoolSizes() { diff --git a/Public/Src/Cache/MemoizationStore/Vsts/BuildCacheCache.cs b/Public/Src/Cache/MemoizationStore/Vsts/BuildCacheCache.cs index 478e00cd4..f2541f213 100644 --- a/Public/Src/Cache/MemoizationStore/Vsts/BuildCacheCache.cs +++ b/Public/Src/Cache/MemoizationStore/Vsts/BuildCacheCache.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; @@ -95,7 +97,7 @@ namespace BuildXL.Cache.MemoizationStore.Vsts _cacheNamespace = cacheNamespace; _buildCacheHttpClientFactory = buildCacheHttpClientFactory; _tracer = new BuildCacheCacheTracer(logger, nameof(BuildCacheCache)); - + _backingContentStore = new BackingContentStore( fileSystem, backingContentStoreHttpClientFactory, timeToKeepUnreferencedContent, _tracer.ContentSessionTracer, downloadBlobsThroughBlobStore, useDedupStore); @@ -402,7 +404,7 @@ namespace BuildXL.Cache.MemoizationStore.Vsts public Guid Id { get; private set; } /// - public IAsyncEnumerable> EnumerateStrongFingerprints(Context context) + public Async::System.Collections.Generic.IAsyncEnumerable> EnumerateStrongFingerprints(Context context) { return AsyncEnumerable.Empty>(); } diff --git a/Public/Src/Cache/MemoizationStore/Vsts/BuildCacheReadOnlySession.cs b/Public/Src/Cache/MemoizationStore/Vsts/BuildCacheReadOnlySession.cs index 7c0de0c80..ccff10e65 100644 --- a/Public/Src/Cache/MemoizationStore/Vsts/BuildCacheReadOnlySession.cs +++ b/Public/Src/Cache/MemoizationStore/Vsts/BuildCacheReadOnlySession.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +extern alias Async; + using System; using System.Collections.Generic; using System.Diagnostics; @@ -380,7 +382,7 @@ namespace BuildXL.Cache.MemoizationStore.Vsts public bool ShutdownStarted { get; private set; } /// - public IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) + public Async::System.Collections.Generic.IAsyncEnumerable GetSelectors(Context context, Fingerprint weakFingerprint, CancellationToken cts, UrgencyHint urgencyHint = UrgencyHint.Nominal) { return this.GetSelectorsAsAsyncEnumerable(context, weakFingerprint, cts, urgencyHint); } diff --git a/Public/Src/Cache/Script/NetCore/VersionUpdater/VersionUpdater.runtimeconfig.json b/Public/Src/Cache/Script/NetCore/VersionUpdater/VersionUpdater.runtimeconfig.json index 12473a57e..ab4f8eb95 100644 --- a/Public/Src/Cache/Script/NetCore/VersionUpdater/VersionUpdater.runtimeconfig.json +++ b/Public/Src/Cache/Script/NetCore/VersionUpdater/VersionUpdater.runtimeconfig.json @@ -1,9 +1,9 @@ { "runtimeOptions": { - "tfm": "netcoreapp2.0", + "tfm": "netcoreapp3.0", "framework": { "name": "Microsoft.NETCore.App", - "version": "2.0.0" + "version": "3.0.0-preview5-27626-15" } } } \ No newline at end of file diff --git a/Public/Src/Cache/VerticalStore/Analyzer/Extensions.cs b/Public/Src/Cache/VerticalStore/Analyzer/Extensions.cs index 7716e9dd0..8d2b13eb5 100644 --- a/Public/Src/Cache/VerticalStore/Analyzer/Extensions.cs +++ b/Public/Src/Cache/VerticalStore/Analyzer/Extensions.cs @@ -105,7 +105,10 @@ namespace BuildXL.Cache.Analyzer } long length = possibleStream.Result.Length; +#pragma warning disable AsyncFixer02 possibleStream.Result.Dispose(); +#pragma warning restore AsyncFixer02 + return new Tuple(casHash, length); } diff --git a/Public/Src/Demos/Deployment.dsc b/Public/Src/Demos/Deployment.dsc index af87fad49..a28e6feb6 100644 --- a/Public/Src/Demos/Deployment.dsc +++ b/Public/Src/Demos/Deployment.dsc @@ -14,7 +14,7 @@ namespace Deployment { ] }; - const frameworkSpecificPart = qualifier.targetFramework === "netcoreapp2.2" + const frameworkSpecificPart = BuildXLSdk.isDotNetCoreBuild ? qualifier.targetRuntime : qualifier.targetFramework; diff --git a/Public/Src/Deployment/Ide.dsc b/Public/Src/Deployment/Ide.dsc index a6f3fd776..5d84d9241 100644 --- a/Public/Src/Deployment/Ide.dsc +++ b/Public/Src/Deployment/Ide.dsc @@ -29,7 +29,7 @@ namespace Ide { { file: importFrom("BuildXL.Ide").withQualifier({ configuration: qualifier.configuration, - targetFramework:"netcoreapp2.2", + targetFramework:"netcoreapp3.0", targetRuntime: "osx-x64"} ).LanguageService.Server.vsix, targetFileName: a`BuildXL.vscode.osx.vsix`, diff --git a/Public/Src/Deployment/NugetPackages.dsc b/Public/Src/Deployment/NugetPackages.dsc index 185a1e2a4..6f9bcb1f9 100644 --- a/Public/Src/Deployment/NugetPackages.dsc +++ b/Public/Src/Deployment/NugetPackages.dsc @@ -33,7 +33,7 @@ namespace NugetPackages { id: `${packageNamePrefix}.win-x64`, deployment: BuildXL.withQualifier({ configuration: qualifier.configuration, - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "win-x64" }).deployment, }); @@ -42,7 +42,7 @@ namespace NugetPackages { id: `${packageNamePrefix}.osx-x64`, deployment: BuildXL.withQualifier({ configuration: qualifier.configuration, - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "osx-x64" }).deployment, }); @@ -93,7 +93,7 @@ namespace NugetPackages { id: `${packageNamePrefix}.Tools.SandboxExec.osx-x64`, deployment: Tools.SandboxExec.withQualifier({ configuration: qualifier.configuration, - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "osx-x64" }).deployment }); @@ -103,7 +103,7 @@ namespace NugetPackages { id: `${packageNamePrefix}.Tools.Orchestrator.osx-x64`, deployment: Tools.Orchestrator.withQualifier({ configuration: qualifier.configuration, - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "osx-x64" }).deployment }); diff --git a/Public/Src/Deployment/Tests.Osx/tests.osx.dsc b/Public/Src/Deployment/Tests.Osx/tests.osx.dsc index c7f7379f9..62e88192f 100644 --- a/Public/Src/Deployment/Tests.Osx/tests.osx.dsc +++ b/Public/Src/Deployment/Tests.Osx/tests.osx.dsc @@ -6,7 +6,7 @@ import * as Deployment from "Sdk.Deployment"; import * as BuildXLSdk from "Sdk.BuildXL"; namespace Tests.Osx { - export declare const qualifier : {configuration: "debug" | "release", targetFramework: "netcoreapp2.2", targetRuntime: "osx-x64"}; + export declare const qualifier : {configuration: "debug" | "release", targetFramework: "netcoreapp3.0", targetRuntime: "osx-x64"}; const sharedBinFolderName = a`shared_bin`; @@ -225,7 +225,7 @@ namespace Tests.Osx { function writeFile(fileName: PathAtom, content: string): DerivedFile { return Transformer.writeAllText({ - outputPath: p`${Context.getNewOutputDirectory("mac-tests")}/${fileName}`, + outputPath: p`${Context.getNewOutputDirectory("mac-tests")}/${fileName}`, text: content }); } diff --git a/Public/Src/Deployment/buildXL.dsc b/Public/Src/Deployment/buildXL.dsc index 7ef5d377c..3f7ed7341 100644 --- a/Public/Src/Deployment/buildXL.dsc +++ b/Public/Src/Deployment/buildXL.dsc @@ -20,7 +20,7 @@ namespace BuildXL { ...(qualifier.targetFramework !== "net472" ? [] : [ importFrom("BuildXL.Cache.ContentStore").VfsApplication.exe, ]), - + // analyzers importFrom("BuildXL.Tools").Execution.Analyzer.exe, importFrom("BuildXL.Tools").BxlScriptAnalyzer.exe, @@ -42,13 +42,13 @@ namespace BuildXL { subfolder: r`bxp-server`, contents: [ importFrom("BuildXL.Explorer").Server.withQualifier( - Object.merge(qualifier, {targetFramework: "netcoreapp2.2"}) + Object.merge(qualifier, {targetFramework: "netcoreapp3.0"}) ).exe ] } ] ), { subfolder: r`MsBuildGraphBuilder`, - contents: qualifier.targetFramework === "netcoreapp2.2" ? [] : [ + contents: BuildXLSdk.isDotNetCoreBuild ? [] : [ // If the current qualifier is full framework, this tool has to be built with 472 importFrom("BuildXL.Tools").MsBuildGraphBuilder.withQualifier( Object.merge<(typeof qualifier) & {targetFramework: "net472"}>(qualifier, {targetFramework: "net472"})).exe @@ -86,7 +86,7 @@ namespace BuildXL { ] }; - const frameworkSpecificPart = qualifier.targetFramework === "netcoreapp2.2" + const frameworkSpecificPart = BuildXLSdk.isDotNetCoreBuild ? qualifier.targetRuntime : qualifier.targetFramework; diff --git a/Public/Src/Deployment/cache.NugetPackages.dsc b/Public/Src/Deployment/cache.NugetPackages.dsc index b574094e7..d9d31c56b 100644 --- a/Public/Src/Deployment/cache.NugetPackages.dsc +++ b/Public/Src/Deployment/cache.NugetPackages.dsc @@ -11,12 +11,12 @@ namespace Cache.NugetPackages { const Net451ContentStore = importFrom("BuildXL.Cache.ContentStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "net451", targetRuntime: "win-x64" }); const Net461ContentStore = importFrom("BuildXL.Cache.ContentStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "net461", targetRuntime: "win-x64" }); const Net472ContentStore = importFrom("BuildXL.Cache.ContentStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "net472", targetRuntime: "win-x64" }); - const WinX64ContentStore = importFrom("BuildXL.Cache.ContentStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "netcoreapp2.2", targetRuntime: "win-x64" }); + const WinX64ContentStore = importFrom("BuildXL.Cache.ContentStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "netcoreapp3.0", targetRuntime: "win-x64" }); const Net451MemoizationStore = importFrom("BuildXL.Cache.MemoizationStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "net451", targetRuntime: "win-x64" }); const Net461MemoizationStore = importFrom("BuildXL.Cache.MemoizationStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "net461", targetRuntime: "win-x64" }); const Net472MemoizationStore = importFrom("BuildXL.Cache.MemoizationStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "net472", targetRuntime: "win-x64" }); - const WinX64MemoizationStore = importFrom("BuildXL.Cache.MemoizationStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "netcoreapp2.2", targetRuntime: "win-x64" }); + const WinX64MemoizationStore = importFrom("BuildXL.Cache.MemoizationStore").withQualifier({ configuration: qualifier.configuration, targetFramework: "netcoreapp3.0", targetRuntime: "win-x64" }); const Net461DistributedCacheHost = importFrom("BuildXL.Cache.DistributedCache.Host").withQualifier({ configuration: qualifier.configuration, targetFramework: "net461", targetRuntime: "win-x64" }); diff --git a/Public/Src/Deployment/tools.dsc b/Public/Src/Deployment/tools.dsc index 59ddeeaa9..9cd1da2db 100644 --- a/Public/Src/Deployment/tools.dsc +++ b/Public/Src/Deployment/tools.dsc @@ -42,7 +42,7 @@ namespace Tools { contents: [ importFrom("BuildXL.Tools").withQualifier({ configuration: qualifier.configuration, - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: qualifier.targetRuntime }).Orchestrator.exe ], diff --git a/Public/Src/Engine/Processes/SandboxedProcessPipExecutor.cs b/Public/Src/Engine/Processes/SandboxedProcessPipExecutor.cs index 10f115bfb..d38c95a2d 100644 --- a/Public/Src/Engine/Processes/SandboxedProcessPipExecutor.cs +++ b/Public/Src/Engine/Processes/SandboxedProcessPipExecutor.cs @@ -840,7 +840,7 @@ namespace BuildXL.Processes Tracing.Logger.Log.PipProcessStartExternalTool(m_loggingContext, m_pip.SemiStableHash, m_pip.GetDescription(m_context), externalSandboxedProcessExecutor.ExecutablePath); process = await ExternalSandboxedProcess.StartAsync( - info, + info, spi => new ExternalToolSandboxedProcess(spi, externalSandboxedProcessExecutor)); } else @@ -925,7 +925,9 @@ namespace BuildXL.Processes finally { m_activeProcess = null; +#pragma warning disable AsyncFixer02 cancellationTokenRegistration.Dispose(); +#pragma warning restore AsyncFixer02 process.Dispose(); } @@ -950,7 +952,7 @@ namespace BuildXL.Processes /// These various validations that the detours communication channel /// private SandboxedProcessPipExecutionResult ValidateDetoursCommunication( - SandboxedProcessPipExecutionResult result, + SandboxedProcessPipExecutionResult result, int lastMessageCount, bool isMessageSemaphoreCountCreated) { @@ -1557,8 +1559,8 @@ namespace BuildXL.Processes } // TODO: named semaphores are not supported in NetStandard2.0 - if (m_sandboxConfig.AdminRequiredProcessExecutionMode == AdminRequiredProcessExecutionMode.Internal - && checkMessageCount + if (m_sandboxConfig.AdminRequiredProcessExecutionMode == AdminRequiredProcessExecutionMode.Internal + && checkMessageCount && !OperatingSystemHelper.IsUnixOS) { // Semaphore names don't allow '\\' chars. @@ -3123,7 +3125,7 @@ namespace BuildXL.Processes var maybeResult = FileUtilities.TryProbePathExistence(path, followSymlink: false); var existsAsFile = maybeResult.Succeeded && maybeResult.Result == PathExistence.ExistsAsFile; - // If file outputs are not redirected, this is simply file existence. Otherwise, we have + // If file outputs are not redirected, this is simply file existence. Otherwise, we have // to check that the file is not a WCI tombstone, since this means the file is not really there. return existsAsFile && !(fileOutputsAreRedirected && FileUtilities.IsWciTombstoneFile(path)); } diff --git a/Public/Src/Engine/Scheduler/Artifacts/FileContentManager.cs b/Public/Src/Engine/Scheduler/Artifacts/FileContentManager.cs index 903b9f1dd..922b59b2a 100644 --- a/Public/Src/Engine/Scheduler/Artifacts/FileContentManager.cs +++ b/Public/Src/Engine/Scheduler/Artifacts/FileContentManager.cs @@ -913,7 +913,7 @@ namespace BuildXL.Scheduler.Artifacts public async Task TryQuerySealedOrUndeclaredInputContentAsync(AbsolutePath path, string consumerDescription, bool allowUndeclaredSourceReads) { FileOrDirectoryArtifact declaredArtifact; - + var isDynamicallyObservedSource = false; if (!m_sealedFiles.TryGetValue(path, out FileArtifact sealedFile)) @@ -927,7 +927,7 @@ namespace BuildXL.Scheduler.Artifacts // No source seal directory found return null; } - else + else { // If undeclared source reads is enabled but the path does not exist, then we can just shortcut // the query here. This matches the declared case when no static artifact is found that contains @@ -1247,7 +1247,7 @@ namespace BuildXL.Scheduler.Artifacts string.Join(Environment.NewLine, unsealedFiles.Select(f => "\t" + f))); } - } + } else if (sealDirectoryKind.IsSourceSeal()) { m_sealedSourceDirectories.TryAdd(directory.Path, directory); @@ -1321,8 +1321,8 @@ namespace BuildXL.Scheduler.Artifacts // Directory artifact contents are not hashed since they will be hashed dynamically // if the pip accesses them, so the file is the declared artifact state.HashTasks.Add(TryQueryContentAsync( - file, - operationContext, + file, + operationContext, declaredArtifact: file, allowUndeclaredSourceReads)); } @@ -1715,10 +1715,10 @@ namespace BuildXL.Scheduler.Artifacts /// the index of a file (in the list of materialized files) which requires the materialization of this file as /// a prerequisite (if any). This is used when restoring content into cache for a host materialized file (i.e. write file output). private void AddFileMaterialization( - PipArtifactsState state, - FileArtifact file, - bool? allowReadOnlyOverride, - AbsolutePath symlinkTarget, + PipArtifactsState state, + FileArtifact file, + bool? allowReadOnlyOverride, + AbsolutePath symlinkTarget, int? dependentFileIndex = null) { bool shouldMaterializeSourceFile = (IsDistributedWorker && SourceFileMaterializationEnabled) || symlinkTarget.IsValid; @@ -1852,7 +1852,7 @@ namespace BuildXL.Scheduler.Artifacts /// /// /// Creating empty directories when they don't exist ensures the correctness of replaying pip outputs. Those existence of such directories may be needed - /// by downstream pips. Empty directories are not stored into the cache, but their paths are stored in the pip itself and are collected when we populate . + /// by downstream pips. Empty directories are not stored into the cache, but their paths are stored in the pip itself and are collected when we populate . /// If the pip outputs are removed, then to replay the empty output directories in the next build, when we have a cache hit, those directories need to be created. /// private async Task PrepareDirectoriesAsync(PipArtifactsState state, OperationContext operationContext) @@ -1914,7 +1914,7 @@ namespace BuildXL.Scheduler.Artifacts destinationPath: directory.Path.ToString(Context.PathTable), errorMessage: ex.LogEventMessage); state.AddFailedDirectory(directory); - + success = false; m_dynamicDirectoryDeletionTasks[directory] = BoolTask.False; @@ -2028,7 +2028,10 @@ namespace BuildXL.Scheduler.Artifacts if (possiblyStream.Succeeded) { +#pragma warning disable AsyncFixer02 possiblyStream.Result.Dispose(); +#pragma warning restore AsyncFixer02 + possiblyPlaced = new Possible( new ContentMaterializationResult( @@ -2286,7 +2289,7 @@ namespace BuildXL.Scheduler.Artifacts // the copy-file destination relies on the else-clause below where we try to get // other file using TryGetFileArtifactForHash. // If we don't store outputs to cache, then we should not include cache operation to determine - // if the content is available. However, we just checked, by TryDiscoverAsync above, that the content + // if the content is available. However, we just checked, by TryDiscoverAsync above, that the content // is available with the expected content hash. Thus, we can safely say that the content is available. isAvailable = true; } @@ -2339,7 +2342,7 @@ namespace BuildXL.Scheduler.Artifacts if (copySource.IsSourceFile) { - // Reached a source file. Just abort rather than calling the host again. + // Reached a source file. Just abort rather than calling the host again. break; } @@ -2551,10 +2554,10 @@ namespace BuildXL.Scheduler.Artifacts { // Start the task to hash input state.HashTasks.Add(TryQueryContentAsync( - file, - operationContext, - declaredArtifact: file, - pipInfo.UnderlyingPip.ProcessAllowsUndeclaredSourceReads, + file, + operationContext, + declaredArtifact: file, + pipInfo.UnderlyingPip.ProcessAllowsUndeclaredSourceReads, verifyingHash: true)); } else @@ -2852,7 +2855,7 @@ namespace BuildXL.Scheduler.Artifacts if (possibleProbeResult.Result == PathExistence.ExistsAsFile) { - Possible possiblyDiscovered = + Possible possiblyDiscovered = await LocalDiskContentStore.TryDiscoverAsync(fileArtifact, artifactExpandedPath); DiscoveredContentHashOrigin origin; @@ -3028,9 +3031,9 @@ namespace BuildXL.Scheduler.Artifacts // the flag supressed a double write violation detection. So let's just warn // and move on. Logger.Log.FileArtifactContentMismatch( - m_host.LoggingContext, - fileArtifact.Path.ToString(Context.PathTable), - existingInfo.Hash.ToHex(), + m_host.LoggingContext, + fileArtifact.Path.ToString(Context.PathTable), + existingInfo.Hash.ToHex(), fileMaterializationInfo.Hash.ToHex()); return false; @@ -3542,7 +3545,7 @@ namespace BuildXL.Scheduler.Artifacts /// Files which failed to materialize /// private readonly List<(FileArtifact, ContentHash)> m_failedFiles = new List<(FileArtifact, ContentHash)>(); - + /// /// Directories which failed to materialize /// @@ -3626,7 +3629,7 @@ namespace BuildXL.Scheduler.Artifacts m_failedFiles.Add((file, contentHash)); } } - + /// /// Adds a failed directory /// diff --git a/Public/Src/Explorer/Server/BuildXL.Explorer.Server.dsc b/Public/Src/Explorer/Server/BuildXL.Explorer.Server.dsc index 57d2f3464..fc33611d9 100644 --- a/Public/Src/Explorer/Server/BuildXL.Explorer.Server.dsc +++ b/Public/Src/Explorer/Server/BuildXL.Explorer.Server.dsc @@ -19,7 +19,7 @@ namespace Server { references: [ ...addIf(BuildXLSdk.isFullFramework, // TODO: revisit this! - Managed.Factory.createBinary(importFrom("Microsoft.NETCore.App").Contents.all, r`ref/netcoreapp2.1/netstandard.dll`) + Managed.Factory.createBinary(importFrom("Microsoft.NETCore.App").Contents.all, r`ref/netcoreapp3.0/netstandard.dll`) ), importFrom("BuildXL.Pips").dll, @@ -47,7 +47,7 @@ namespace Server { importFrom("Microsoft.AspNetCore.Mvc.DataAnnotations").pkg, importFrom("Microsoft.AspNetCore.Mvc.Formatters.Json").pkg, importFrom("Microsoft.AspNetCore.Mvc.ViewFeatures").pkg, - importFrom("Microsoft.AspNetCore.Razor.Runtime").pkg, + importFrom("Microsoft.AspNetCore.Razor.Runtime").pkg, importFrom("Microsoft.Extensions.Caching.Abstractions").pkg, importFrom("Microsoft.Extensions.Caching.Memory").pkg, importFrom("Microsoft.Extensions.Configuration").pkg, diff --git a/Public/Src/FrontEnd/Script/RuntimeModel/AstBridge/Linter/Rules/EnforceNumberLiteralRule.cs b/Public/Src/FrontEnd/Script/RuntimeModel/AstBridge/Linter/Rules/EnforceNumberLiteralRule.cs index 77e8b0ee3..abfa9d4b6 100644 --- a/Public/Src/FrontEnd/Script/RuntimeModel/AstBridge/Linter/Rules/EnforceNumberLiteralRule.cs +++ b/Public/Src/FrontEnd/Script/RuntimeModel/AstBridge/Linter/Rules/EnforceNumberLiteralRule.cs @@ -77,7 +77,11 @@ namespace BuildXL.FrontEnd.Script.RuntimeModel.AstBridge.Rules // Failing when the number literal overflows try { - double.Parse(literal, NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, s_numberFormatInfo); + var result = double.Parse(literal, NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, s_numberFormatInfo); + if (Double.IsInfinity(result)) + { + throw new OverflowException(); + } } catch (OverflowException) { diff --git a/Public/Src/FrontEnd/Sdk/SimpleFrontEndEngineAbstraction.cs b/Public/Src/FrontEnd/Sdk/SimpleFrontEndEngineAbstraction.cs index b792960c2..200471475 100644 --- a/Public/Src/FrontEnd/Sdk/SimpleFrontEndEngineAbstraction.cs +++ b/Public/Src/FrontEnd/Sdk/SimpleFrontEndEngineAbstraction.cs @@ -37,7 +37,7 @@ namespace BuildXL.FrontEnd.Sdk /// protected readonly PathTable m_pathTable; - + /// /// Mount names defined in the configuration (populated during construction). @@ -87,7 +87,7 @@ namespace BuildXL.FrontEnd.Sdk } stream = m_fileSystem.OpenText(AbsolutePath.Create(m_pathTable, physicalPath)).BaseStream; - + return true; } @@ -98,7 +98,10 @@ namespace BuildXL.FrontEnd.Sdk if (TryGetFrontEndFile(path, "dummyFrontEnd", out stream)) { var result = await FileContent.ReadFromAsync(stream); +#pragma warning disable AsyncFixer02 stream?.Dispose(); +#pragma warning restore AsyncFixer02 + return result; } diff --git a/Public/Src/FrontEnd/SdkTesting/Helper/TestEngineAbstraction.cs b/Public/Src/FrontEnd/SdkTesting/Helper/TestEngineAbstraction.cs index 5066b9c8f..2b6d8ff37 100644 --- a/Public/Src/FrontEnd/SdkTesting/Helper/TestEngineAbstraction.cs +++ b/Public/Src/FrontEnd/SdkTesting/Helper/TestEngineAbstraction.cs @@ -71,7 +71,9 @@ namespace BuildXL.FrontEnd.Script.Testing.Helper if (TryGetFrontEndFile(path, "dummyFrontEnd", out stream)) { var result = await FileContent.ReadFromAsync(stream); +#pragma warning disable AsyncFixer02 stream?.Dispose(); +#pragma warning restore AsyncFixer02 return result; } diff --git a/Public/Src/FrontEnd/SdkTesting/TestGenerator/BuildXL.FrontEnd.Script.Testing.TestGenerator.dsc b/Public/Src/FrontEnd/SdkTesting/TestGenerator/BuildXL.FrontEnd.Script.Testing.TestGenerator.dsc index 0235ca8a6..e7f949264 100644 --- a/Public/Src/FrontEnd/SdkTesting/TestGenerator/BuildXL.FrontEnd.Script.Testing.TestGenerator.dsc +++ b/Public/Src/FrontEnd/SdkTesting/TestGenerator/BuildXL.FrontEnd.Script.Testing.TestGenerator.dsc @@ -22,7 +22,7 @@ namespace TestGeneratorDeployment { subfolder: a`MacOs`, contents: $.withQualifier({ configuration: qualifier.configuration, - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "osx-x64" }).TestGenerator.deploymentContents } diff --git a/Public/Src/FrontEnd/Utilities/FrontEndUtilities.cs b/Public/Src/FrontEnd/Utilities/FrontEndUtilities.cs index 516eaf684..4bdf8a734 100644 --- a/Public/Src/FrontEnd/Utilities/FrontEndUtilities.cs +++ b/Public/Src/FrontEnd/Utilities/FrontEndUtilities.cs @@ -27,7 +27,7 @@ namespace BuildXL.FrontEnd.Utilities string frontEnd, FrontEndContext context, FrontEndEngineAbstraction engine, - IReadOnlyCollection explicitCandidates, + IReadOnlyCollection explicitCandidates, out IEnumerable searchLocations, Action onEmptyResult = null, Action onPathParseFailure = null) @@ -74,9 +74,9 @@ namespace BuildXL.FrontEnd.Utilities /// beforeLaunch is invoked right before the process is launched /// onResult is invoked after getting a successful result /// > - public static async Task RunSandboxedToolAsync(FrontEndContext context, - string pathToTool, - string buildStorageDirectory, + public static async Task RunSandboxedToolAsync(FrontEndContext context, + string pathToTool, + string buildStorageDirectory, FileAccessManifest fileAccessManifest, string arguments, string workingDirectory, @@ -125,9 +125,12 @@ namespace BuildXL.FrontEnd.Utilities r => { // Dispose the registration for the cancellation token once the process is done +#pragma warning disable AsyncFixer02 registration.Dispose(); +#pragma warning restore AsyncFixer02 - // + + // onResult?.Invoke(); return r.GetAwaiter().GetResult(); @@ -146,7 +149,7 @@ namespace BuildXL.FrontEnd.Utilities foreach (string environmentVariable in environment.Keys) { - // Expose as much of the environment as we can -- use the ones overriden by the Engine + // Expose as much of the environment as we can -- use the ones overriden by the Engine if (engine.TryGetBuildParameter(environmentVariable, frontEndName, out var value)) { engineEnvironment[environmentVariable] = value; @@ -229,7 +232,7 @@ namespace BuildXL.FrontEnd.Utilities // Two things are happening here: we want to register if the file is present or absent. Engine.FileExists takes // care of that. And in the case the file exists, record the content. // There are apparently some repos that create and delete files during graph construction :( - // So we cannot trust detours and check for IsNonexistent on the access itself. Even though there were read/write accesses on a given file, + // So we cannot trust detours and check for IsNonexistent on the access itself. Even though there were read/write accesses on a given file, // the file may not exist at this point if (engine.FileExists(path)) { diff --git a/Public/Src/IDE/Debugger/RemoteDebugger.cs b/Public/Src/IDE/Debugger/RemoteDebugger.cs index d7b11788c..c761b5787 100644 --- a/Public/Src/IDE/Debugger/RemoteDebugger.cs +++ b/Public/Src/IDE/Debugger/RemoteDebugger.cs @@ -63,7 +63,9 @@ namespace BuildXL.FrontEnd.Script.Debugger { if (stream != null) { +#pragma warning disable AsyncFixer02 stream.Dispose(); +#pragma warning restore AsyncFixer02 } } } diff --git a/Public/Src/IDE/LanguageServer/Utilities/DiagnosticsExtensions.cs b/Public/Src/IDE/LanguageServer/Utilities/DiagnosticsExtensions.cs index 4b01450c2..a6253628b 100644 --- a/Public/Src/IDE/LanguageServer/Utilities/DiagnosticsExtensions.cs +++ b/Public/Src/IDE/LanguageServer/Utilities/DiagnosticsExtensions.cs @@ -8,6 +8,7 @@ using TypeScript.Net.Diagnostics; using TypeScript.Net.Types; using TypeScript.Net.Utilities; using Diagnostic = Microsoft.VisualStudio.LanguageServer.Protocol.Diagnostic; +using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace BuildXL.Ide.LanguageServer { @@ -73,7 +74,7 @@ namespace BuildXL.Ide.LanguageServer End = LineInfoExtensions.GetLineAndColumnBy(spec.End, spec, false).ToPosition(), }; } - + /// public static Range ToRange(this ITextSpan textSpan, ISourceFile sourceFile) { diff --git a/Public/Src/IDE/LanguageServer/Utilities/PositionExtensions.cs b/Public/Src/IDE/LanguageServer/Utilities/PositionExtensions.cs index df6482080..a2db423b1 100644 --- a/Public/Src/IDE/LanguageServer/Utilities/PositionExtensions.cs +++ b/Public/Src/IDE/LanguageServer/Utilities/PositionExtensions.cs @@ -7,6 +7,7 @@ using Microsoft.VisualStudio.LanguageServer.Protocol; using TypeScript.Net.Diagnostics; using TypeScript.Net.Types; using TypeScript.Net.Utilities; +using Range = Microsoft.VisualStudio.LanguageServer.Protocol.Range; namespace BuildXL.Ide.LanguageServer { diff --git a/Public/Src/IDE/VsIntegration/CreateZipPackage/Tool.CreateZipPackage.dsc b/Public/Src/IDE/VsIntegration/CreateZipPackage/Tool.CreateZipPackage.dsc index 55bb3478d..ff9ca967d 100644 --- a/Public/Src/IDE/VsIntegration/CreateZipPackage/Tool.CreateZipPackage.dsc +++ b/Public/Src/IDE/VsIntegration/CreateZipPackage/Tool.CreateZipPackage.dsc @@ -20,7 +20,7 @@ namespace Tool.CreateZipPackage { importFrom("BuildXL.Utilities").ToolSupport.dll, ], defineConstants: [ - ...addIf(qualifier.targetFramework === "net472" || qualifier.targetFramework === "netcoreapp2.2", "FEATURE_EXTENDED_ATTR") + ...addIf(qualifier.targetFramework === "net472" || BuildXLSdk.isDotNetCoreBuild, "FEATURE_EXTENDED_ATTR") ] }); diff --git a/Public/Src/Tools/Orchestrator/Orchestrator.csproj b/Public/Src/Tools/Orchestrator/Orchestrator.csproj index 8d30f6964..5c21b8fe0 100644 --- a/Public/Src/Tools/Orchestrator/Orchestrator.csproj +++ b/Public/Src/Tools/Orchestrator/Orchestrator.csproj @@ -2,7 +2,7 @@ Exe x64 - netcoreapp2.2 + netcoreapp3.0 diff --git a/Public/Src/Utilities/UnitTests/Executables/TestProcess/Test.BuildXL.Executables.TestProcess.dsc b/Public/Src/Utilities/UnitTests/Executables/TestProcess/Test.BuildXL.Executables.TestProcess.dsc index 1e8cb3e4f..dc1aacdf6 100644 --- a/Public/Src/Utilities/UnitTests/Executables/TestProcess/Test.BuildXL.Executables.TestProcess.dsc +++ b/Public/Src/Utilities/UnitTests/Executables/TestProcess/Test.BuildXL.Executables.TestProcess.dsc @@ -37,7 +37,7 @@ namespace TestProcess { contents: [ $.withQualifier({ configuration: qualifier.configuration, - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "osx-x64" }).testProcessExe, diff --git a/Public/Src/Utilities/UnitTests/Ipc/MultiplexingServerTests.cs b/Public/Src/Utilities/UnitTests/Ipc/MultiplexingServerTests.cs index 0e806ca61..56a5d58be 100644 --- a/Public/Src/Utilities/UnitTests/Ipc/MultiplexingServerTests.cs +++ b/Public/Src/Utilities/UnitTests/Ipc/MultiplexingServerTests.cs @@ -116,7 +116,9 @@ namespace Test.BuildXL.Ipc Assert.False(client2PingResponseTask.IsCompleted); // close client1 and wait for response to client2 +#pragma warning disable AsyncFixer02 client1.Dispose(); +#pragma warning restore AsyncFixer02 VerifyPingResponse(client2PingRequest, await client2PingResponseTask); } }); diff --git a/Shared/Scripts/BuildDistributedTest.cmd b/Shared/Scripts/BuildDistributedTest.cmd index ed1f03cbd..477695dba 100644 --- a/Shared/Scripts/BuildDistributedTest.cmd +++ b/Shared/Scripts/BuildDistributedTest.cmd @@ -17,7 +17,7 @@ if NOT DEFINED DBD_TESTGEN_COUNT ( ) if NOT DEFINED TEST_COMMITID ( - set TEST_COMMITID=3a5fdc81d4d87a67fd519eb8dfd963e355139dcf + set TEST_COMMITID=201fb8470cc4a363705e1b4d721e98e5731346b0 ) set TEST_SOLUTION_ROOT=%ENLISTMENTROOT%\Out\Tests\SMDB diff --git a/config.dsc b/config.dsc index 5da767501..7c681b54f 100644 --- a/config.dsc +++ b/config.dsc @@ -78,7 +78,7 @@ config({ // Roslyn { id: "Microsoft.Net.Compilers", version: "3.0.0" }, - { id: "Microsoft.NETCore.Compilers", version: "2.10.0" }, + { id: "Microsoft.NETCore.Compilers", version: "3.1.0-beta3-final" }, { id: "Microsoft.CodeAnalysis.Common", version: "2.10.0" }, { id: "Microsoft.CodeAnalysis.CSharp", version: "2.10.0" }, { id: "Microsoft.CodeAnalysis.VisualBasic", version: "2.10.0" }, @@ -227,30 +227,48 @@ config({ { id: "Validation", version: "2.3.7"}, // .NET Core Dependencies - { id: "Microsoft.NETCore.App", version: "2.1.1" }, - { id: "NETStandard.Library", version: "2.0.3", tfm: ".NETStandard2.0"}, - { id: "Microsoft.NETCore.Platforms", version: "2.1.0", tfm: ".NETStandard2.0" }, - { id: "Microsoft.NETCore.DotNetHostPolicy", version: "2.1.1"}, + { id: "Microsoft.NETCore.App", version: "3.0.0-preview5-27626-15" }, + { id: "Microsoft.NETCore.App", version: "2.1.1", alias: "Microsoft.NETCore.App.211" }, + + { id: "NETStandard.Library", version: "2.0.3", tfm: ".NETStandard2.0" }, + { id: "Microsoft.NETCore.Platforms", version: "3.0.0-preview5.19224.8" }, + { id: "Microsoft.NETCore.DotNetHostPolicy", version: "3.0.0-preview5-27626-15"}, { id: "System.Security.Claims", version: "4.3.0" }, // .NET Core Self-Contained Deployment - { id: "Microsoft.NETCore.DotNetHostResolver", version: "2.2.0" }, - { id: "Microsoft.NETCore.DotNetAppHost", version: "2.2.0" }, - { id: "runtime.win-x64.Microsoft.NETCore.DotNetAppHost", version: "2.2.0" }, - { id: "runtime.win-x64.Microsoft.NETCore.App", version: "2.2.0" }, - { id: "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver", version: "2.2.0" }, - { id: "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy", version: "2.2.0" }, + { id: "Microsoft.NETCore.DotNetHostResolver", version: "3.0.0-preview5-27626-15" }, + { id: "Microsoft.NETCore.DotNetHostResolver", version: "2.2.0", alias: "Microsoft.NETCore.DotNetHostResolver.220" }, - { id: "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost", version: "2.2.0" }, - { id: "runtime.osx-x64.Microsoft.NETCore.App", version: "2.2.0" }, - { id: "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver", version: "2.2.0" }, - { id: "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy", version: "2.2.0" }, + { id: "Microsoft.NETCore.DotNetAppHost", version: "3.0.0-preview5-27626-15" }, + { id: "Microsoft.NETCore.DotNetAppHost", version: "2.2.0", alias: "Microsoft.NETCore.DotNetAppHost.220" }, - { id: "System.Security.Principal.Windows", version: "4.5.1" }, - { id: "System.Security.AccessControl", version: "4.5.0", dependentPackageIdsToSkip: ["System.Security.Principal.Windows"] }, - { id: "System.Threading.AccessControl", version: "4.5.0" }, + // .NET Core win-x64 runtime deps + { id: "runtime.win-x64.Microsoft.NETCore.DotNetAppHost", version: "3.0.0-preview5-27626-15" }, + { id: "runtime.win-x64.Microsoft.NETCore.DotNetAppHost", version: "2.2.0", alias: "runtime.win-x64.Microsoft.NETCore.DotNetAppHost.220" }, - // DotNetCore related + { id: "runtime.win-x64.Microsoft.NETCore.App", version: "3.0.0-preview5-27626-15" }, + { id: "runtime.win-x64.Microsoft.NETCore.App", version: "2.2.0", alias: "runtime.win-x64.Microsoft.NETCore.App.220" }, + + { id: "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver", version: "3.0.0-preview5-27626-15" }, + { id: "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver", version: "2.2.0", alias: "runtime.win-x64.Microsoft.NETCore.DotNetHostResolver.220" }, + + { id: "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy", version: "3.0.0-preview5-27626-15" }, + { id: "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy", version: "2.2.0", alias: "runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy.220" }, + + // .NET Core osx-x64 runtime deps + { id: "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost", version: "3.0.0-preview5-27626-15" }, + { id: "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost", version: "2.2.0", alias: "runtime.osx-x64.Microsoft.NETCore.DotNetAppHost.220" }, + + { id: "runtime.osx-x64.Microsoft.NETCore.App", version: "3.0.0-preview5-27626-15" }, + { id: "runtime.osx-x64.Microsoft.NETCore.App", version: "2.2.0", alias: "runtime.osx-x64.Microsoft.NETCore.App.220" }, + + { id: "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver", version: "3.0.0-preview5-27626-15" }, + { id: "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver", version: "2.2.0", alias: "runtime.osx-x64.Microsoft.NETCore.DotNetHostResolver.220" }, + + { id: "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy", version: "3.0.0-preview5-27626-15" }, + { id: "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy", version: "2.2.0", alias: "runtime.osx-x64.Microsoft.NETCore.DotNetHostPolicy.220" }, + + // DotNetCore related deps { id: "Microsoft.CSharp", version: "4.3.0" }, { id: "Microsoft.Win32.Primitives", version: "4.3.0" }, { id: "Microsoft.Win32.Registry", version: "4.3.0" }, @@ -338,6 +356,7 @@ config({ { id: "System.Runtime.Serialization.Json", version: "4.3.0" }, { id: "System.Runtime.Serialization.Primitives", version: "4.3.0" }, { id: "System.Runtime.Serialization.Xml", version: "4.3.0" }, + { id: "System.Security.AccessControl", version: "4.5.0", dependentPackageIdsToSkip: ["System.Security.Principal.Windows"] }, { id: "System.Security.Cryptography.Algorithms", version: "4.3.0" }, { id: "System.Security.Cryptography.Cng", version: "4.3.0" }, { id: "System.Security.Cryptography.Csp", version: "4.3.0" }, @@ -345,12 +364,14 @@ config({ { id: "System.Security.Cryptography.Primitives", version: "4.3.0" }, { id: "System.Security.Cryptography.X509Certificates", version: "4.3.0" }, { id: "System.Security.Principal", version: "4.3.0" }, + { id: "System.Security.Principal.Windows", version: "4.5.1" }, { id: "System.Security.SecureString", version: "4.3.0" }, { id: "System.Text.Encoding", version: "4.3.0" }, { id: "System.Text.Encoding.CodePages", version: "4.3.0" }, { id: "System.Text.Encoding.Extensions", version: "4.3.0" }, { id: "System.Text.RegularExpressions", version: "4.3.0" }, { id: "System.Threading", version: "4.3.0" }, + { id: "System.Threading.AccessControl", version: "4.5.0" }, { id: "System.Threading.Overlapped", version: "4.3.0" }, { id: "System.Threading.Tasks", version: "4.3.0" }, { id: "System.Threading.Tasks.Extensions", version: "4.3.0" }, @@ -463,20 +484,20 @@ config({ // DotNet Core Runtime { moduleName: "DotNet-Runtime.win-x64", - url: "https://download.visualstudio.microsoft.com/download/pr/b10d0a68-b720-48ae-bab8-4ac39bd1b5d3/f32b8b41dff5c1488c2b915a007fc4a6/dotnet-runtime-2.2.2-win-x64.zip", - hash: "VSO0:6BBAE77F9BA0231C90ABD9EA720FF886E8613CE8EF29D8B657AF201E2982829600", + url: "https://download.visualstudio.microsoft.com/download/pr/9459ede1-e223-40c7-a4c5-2409e789121a/46d4eb6067bda9f412a472f7286ffd94/dotnet-runtime-3.0.0-preview5-27626-15-win-x64.zip", + hash: "VSO0:6DBFE7BC9FA24D33A46A3A0732164BD5A4F5984E8FCE091D305FA635CD876AA700", archiveType: "zip", }, { moduleName: "DotNet-Runtime.osx-x64", - url: "https://download.visualstudio.microsoft.com/download/pr/d1f0dfb3-b6bd-42ae-895f-f149bf1d90ca/9b1fb91a9692fc31d6fc83e97caba4cd/dotnet-runtime-2.2.2-osx-x64.tar.gz", - hash: "VSO0:88B2B6E8CEF711E108FDE529E781F555516634CD442B3503B712D22947F0788700", + url: "https://download.visualstudio.microsoft.com/download/pr/85024962-5dee-4f64-ab29-a903f3749f85/6178bfacc58f4d9a596b5e3facc767ab/dotnet-runtime-3.0.0-preview5-27626-15-osx-x64.tar.gz", + hash: "VSO0:C6AB5808D30BFF857263BC467FE8D818F35486763F673F79CA5A758727CEF3A900", archiveType: "tgz", }, { moduleName: "DotNet-Runtime.linux-x64", - url: "https://download.visualstudio.microsoft.com/download/pr/97b97652-4f74-4866-b708-2e9b41064459/7c722daf1a80a89aa8c3dec9103c24fc/dotnet-runtime-2.2.2-linux-x64.tar.gz", - hash: "VSO0:6E5172671364C65B06C9940468A62BAF70EE27392CB2CA8B2C8BFE058CCD088300", + url: "https://download.visualstudio.microsoft.com/download/pr/f15ad9ab-7bd2-4ff5-87b6-b1a08f062ea2/6fdd314c16c17ba22934cd0ac6b4d343/dotnet-runtime-3.0.0-preview5-27626-15-linux-x64.tar.gz", + hash: "VSO0:C6AB5808D30BFF857263BC467FE8D818F35486763F673F79CA5A758727CEF3A900", archiveType: "tgz", }, @@ -506,7 +527,7 @@ config({ qualifiers: { defaultQualifier: { configuration: "debug", - targetFramework: Context.getCurrentHost().os === "win" ? "net472" : "netcoreapp2.2", + targetFramework: Context.getCurrentHost().os === "win" ? "net472" : "netcoreapp3.0", targetRuntime: Context.getCurrentHost().os === "win" ? "win-x64" : "osx-x64", }, namedQualifiers: { @@ -522,12 +543,12 @@ config({ }, DebugDotNetCore: { configuration: "debug", - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "win-x64", }, DebugDotNetCoreMac: { configuration: "debug", - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "osx-x64", }, @@ -545,12 +566,12 @@ config({ ReleaseDotNetCore: { configuration: "release", - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "win-x64", }, ReleaseDotNetCoreMac: { configuration: "release", - targetFramework: "netcoreapp2.2", + targetFramework: "netcoreapp3.0", targetRuntime: "osx-x64", }, } diff --git a/config.microsoftInternal.dsc b/config.microsoftInternal.dsc index 10a59dd46..438f88e78 100644 --- a/config.microsoftInternal.dsc +++ b/config.microsoftInternal.dsc @@ -48,7 +48,9 @@ export const pkgs = isMicrosoftInternal ? [ // Internal pacakged version to avoid downloading from the web but the trusted stable internal feed: { id: "NodeJs", version: "8.12.0-noTest" }, { id: "PowerShell.Core", version: "6.1.0" }, - { id: "Dotnet-Runtime", version: "2.2.2.1" }, + + // Combined runtimes + { id: "Dotnet-Runtime", version: "5.0.0" }, ] : [