Skip to content

Commit 3784701

Browse files
authored
Make cache CI limit configurable (#18721)
1 parent e30b2da commit 3784701

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

azure-pipelines-PR.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,13 @@ stages:
457457
_configuration: Release
458458
_testKind: testFSharpQA
459459
transparentCompiler:
460+
FSHARP_CACHE_OVERRIDE: 256
460461
vs_release:
461462
_configuration: Release
462463
_testKind: testVs
463464
setupVsHive: true
464465
transparentCompiler:
466+
FSHARP_CACHE_OVERRIDE: 256
465467
transparent_compiler_release:
466468
_configuration: Release
467469
_testKind: testCoreclr

src/Compiler/Facilities/LanguageFeatures.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ type LanguageVersion(versionText) =
224224

225225
// F# preview
226226
LanguageFeature.EnforceAttributeTargets, previewVersion // Not enabled due to a number of external library dependencies on unenforced attributes
227-
LanguageFeature.UseTypeSubsumptionCache, previewVersion
227+
LanguageFeature.UseTypeSubsumptionCache, languageVersion90
228228
LanguageFeature.UnmanagedConstraintCsharpInterop, previewVersion // not enabled because: https://github.com/dotnet/fsharp/issues/17509
229229
LanguageFeature.FromEndSlicing, previewVersion // Unfinished features --- needs work
230230
LanguageFeature.AllowAccessModifiersToAutoPropertiesGettersAndSetters, previewVersion

src/Compiler/Utilities/Caches.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ module Cache =
162162

163163
/// Use for testing purposes to reduce memory consumption in testhost and its subprocesses.
164164
let OverrideCapacityForTesting () =
165-
Environment.SetEnvironmentVariable(overrideVariable, "true", EnvironmentVariableTarget.Process)
165+
Environment.SetEnvironmentVariable(overrideVariable, "4096", EnvironmentVariableTarget.Process)
166166

167167
let applyOverride (capacity: int) =
168-
match Environment.GetEnvironmentVariable(overrideVariable) with
169-
| NonNull _ when capacity > 4096 -> 4096
168+
match Int32.TryParse(Environment.GetEnvironmentVariable(overrideVariable)) with
169+
| true, n when capacity > n -> n
170170
| _ -> capacity
171171

172172
[<Struct>]

0 commit comments

Comments
 (0)