diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index 563f0afcbfb..9f06d744935 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -457,11 +457,13 @@ stages: _configuration: Release _testKind: testFSharpQA transparentCompiler: + FSHARP_CACHE_OVERRIDE: 256 vs_release: _configuration: Release _testKind: testVs setupVsHive: true transparentCompiler: + FSHARP_CACHE_OVERRIDE: 256 transparent_compiler_release: _configuration: Release _testKind: testCoreclr diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index 246ec741d67..565665d605b 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -224,7 +224,7 @@ type LanguageVersion(versionText) = // F# preview LanguageFeature.EnforceAttributeTargets, previewVersion // Not enabled due to a number of external library dependencies on unenforced attributes - LanguageFeature.UseTypeSubsumptionCache, previewVersion + LanguageFeature.UseTypeSubsumptionCache, languageVersion90 LanguageFeature.UnmanagedConstraintCsharpInterop, previewVersion // not enabled because: https://github.com/dotnet/fsharp/issues/17509 LanguageFeature.FromEndSlicing, previewVersion // Unfinished features --- needs work LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters, previewVersion diff --git a/src/Compiler/Utilities/Caches.fs b/src/Compiler/Utilities/Caches.fs index a3cebd93161..30c45f1ecd9 100644 --- a/src/Compiler/Utilities/Caches.fs +++ b/src/Compiler/Utilities/Caches.fs @@ -162,11 +162,11 @@ module Cache = /// Use for testing purposes to reduce memory consumption in testhost and its subprocesses. let OverrideCapacityForTesting () = - Environment.SetEnvironmentVariable(overrideVariable, "true", EnvironmentVariableTarget.Process) + Environment.SetEnvironmentVariable(overrideVariable, "4096", EnvironmentVariableTarget.Process) let applyOverride (capacity: int) = - match Environment.GetEnvironmentVariable(overrideVariable) with - | NonNull _ when capacity > 4096 -> 4096 + match Int32.TryParse(Environment.GetEnvironmentVariable(overrideVariable)) with + | true, n when capacity > n -> n | _ -> capacity []