Skip to content

Make cache CI limit configurable #18721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions azure-pipelines-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Facilities/LanguageFeatures.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Compiler/Utilities/Caches.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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

[<Struct>]
Expand Down
Loading