/// <nodoc /> public FileAccessWhitelistEntry(IFileAccessWhitelistEntry template, PathRemapper pathRemapper) : base(template, pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); Name = template.Name; Value = template.Value; ToolPath = pathRemapper.Remap(template.ToolPath); PathFragment = template.PathFragment; PathRegex = template.PathRegex; }
/// <nodoc /> public FrontEndConfiguration(IFrontEndConfiguration template, PathRemapper pathRemapper) { Contract.Requires(template != null); Contract.Assume(pathRemapper != null); ProfileScript = template.ProfileScript; ProfileReportDestination = pathRemapper.Remap(template.ProfileReportDestination); FileToFileReportDestination = pathRemapper.Remap(template.FileToFileReportDestination); EnableIncrementalFrontEnd = template.EnableIncrementalFrontEnd; EnableEvaluationThrottling = template.EnableEvaluationThrottling; DebugScript = template.DebugScript; DebuggerBreakOnExit = template.DebuggerBreakOnExit; DebuggerPort = template.DebuggerPort; UsePartialEvaluation = template.UsePartialEvaluation; EnabledPolicyRules = new List <string>(template.EnabledPolicyRules); MaxFrontEndConcurrency = template.MaxFrontEndConcurrency; MaxRestoreNugetConcurrency = template.MaxRestoreNugetConcurrency; ThreadPoolMinThreadCountMultiplier = template.ThreadPoolMinThreadCountMultiplier; MaxTypeCheckingConcurrency = template.MaxTypeCheckingConcurrency; DisableLanguagePolicyAnalysis = template.DisableLanguagePolicyAnalysis; DisableIsObsoleteCheckDuringConversion = template.DisableIsObsoleteCheckDuringConversion; NameResolutionSemantics = template.NameResolutionSemantics; PreserveFullNames = template.PreserveFullNames; DisableCycleDetection = template.DisableCycleDetection; PreserveTrivia = template.PreserveTrivia; ErrorLimit = template.ErrorLimit; ForcePopulatePackageCache = template.ForcePopulatePackageCache; UsePackagesFromFileSystem = template.UsePackagesFromFileSystem; RespectWeakFingerprintForNugetUpToDateCheck = template.RespectWeakFingerprintForNugetUpToDateCheck; ForceGenerateNuGetSpecs = template.ForceGenerateNuGetSpecs; UseLegacyOfficeLogic = template.UseLegacyOfficeLogic; TrackMethodInvocations = template.TrackMethodInvocations; CycleDetectorStartupDelay = template.CycleDetectorStartupDelay; FailIfWorkspaceMemoryIsNotCollected = template.FailIfWorkspaceMemoryIsNotCollected; FailIfFrontendMemoryIsNotCollected = template.FailIfFrontendMemoryIsNotCollected; ConstructAndSaveBindingFingerprint = template.ConstructAndSaveBindingFingerprint; UseGraphPatching = template.UseGraphPatching; CancelParsingOnFirstFailure = template.CancelParsingOnFirstFailure; UseSpecPublicFacadeAndAstWhenAvailable = template.UseSpecPublicFacadeAndAstWhenAvailable; CancelEvaluationOnFirstFailure = template.CancelEvaluationOnFirstFailure; ReloadPartialEngineStateWhenPossible = template.ReloadPartialEngineStateWhenPossible; EnableCyclicalFriendModules = template.EnableCyclicalFriendModules; LogStatistics = template.LogStatistics; ShowSlowestElementsStatistics = template.ShowSlowestElementsStatistics; ShowLargestFilesStatistics = template.ShowLargestFilesStatistics; ReleaseWorkspaceBeforeEvaluation = template.ReleaseWorkspaceBeforeEvaluation; UnsafeOptimizedAstConversion = template.UnsafeOptimizedAstConversion; AllowUnsafeAmbient = template.AllowUnsafeAmbient; GenerateCgManifestForNugets = template.GenerateCgManifestForNugets; ValidateCgManifestForNugets = template.ValidateCgManifestForNugets; AllowMissingSpecs = template.AllowMissingSpecs; }
/// <nodoc /> public ModuleConfiguration(IModuleConfiguration template, PathRemapper pathRemapper) : base(template, pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); ModuleId = template.ModuleId; Name = template.Name; FileAccessAllowList = new List <IFileAccessAllowlistEntry>(template.FileAccessAllowList.Select(entry => new FileAccessAllowlistEntry(entry, pathRemapper))); CacheableFileAccessAllowlist = new List <IFileAccessAllowlistEntry>(template.CacheableFileAccessAllowList.Select(entry => new FileAccessAllowlistEntry(entry, pathRemapper))); DirectoryMembershipFingerprinterRules = new List <IDirectoryMembershipFingerprinterRule>(template.DirectoryMembershipFingerprinterRules.Select(rule => new DirectoryMembershipFingerprinterRule(rule, pathRemapper))); Mounts = new List <IMount>(template.Mounts.Select(mount => new Mount(mount, pathRemapper))); }
/// <nodoc /> public SandboxConfiguration(ISandboxConfiguration template, PathRemapper pathRemapper) { Contract.Assume(template != null); m_unsafeSandboxConfig = new UnsafeSandboxConfiguration(template.UnsafeSandboxConfiguration); BreakOnUnexpectedFileAccess = template.BreakOnUnexpectedFileAccess; FileAccessIgnoreCodeCoverage = template.FileAccessIgnoreCodeCoverage; FailUnexpectedFileAccesses = template.FailUnexpectedFileAccesses; DefaultTimeout = template.DefaultTimeout; DefaultWarningTimeout = template.DefaultWarningTimeout; TimeoutMultiplier = template.TimeoutMultiplier; WarningTimeoutMultiplier = template.WarningTimeoutMultiplier; TimeoutDumpDirectory = pathRemapper.Remap(template.TimeoutDumpDirectory); SurvivingPipProcessChildrenDumpDirectory = pathRemapper.Remap(template.SurvivingPipProcessChildrenDumpDirectory); LogObservedFileAccesses = template.LogObservedFileAccesses; LogProcesses = template.LogProcesses; LogProcessData = template.LogProcessData; LogFileAccessTables = template.LogFileAccessTables; OutputReportingMode = template.OutputReportingMode; FileSystemMode = template.FileSystemMode; ForceReadOnlyForRequestedReadWrite = template.ForceReadOnlyForRequestedReadWrite; FlushPageCacheToFileSystemOnStoringOutputsToCache = template.FlushPageCacheToFileSystemOnStoringOutputsToCache; NormalizeReadTimestamps = template.NormalizeReadTimestamps; UseLargeNtClosePreallocatedList = template.UseLargeNtClosePreallocatedList; UseExtraThreadToDrainNtClose = template.UseExtraThreadToDrainNtClose; MaskUntrackedAccesses = template.MaskUntrackedAccesses; LogProcessDetouringStatus = template.LogProcessDetouringStatus; HardExitOnErrorInDetours = template.HardExitOnErrorInDetours; CheckDetoursMessageCount = template.CheckDetoursMessageCount; AllowInternalDetoursErrorNotificationFile = template.AllowInternalDetoursErrorNotificationFile; EnforceAccessPoliciesOnDirectoryCreation = template.EnforceAccessPoliciesOnDirectoryCreation; MeasureProcessCpuTimes = template.MeasureProcessCpuTimes; KextReportQueueSizeMb = template.KextReportQueueSizeMb; KextEnableReportBatching = template.KextEnableReportBatching; KextThrottleCpuUsageBlockThresholdPercent = template.KextThrottleCpuUsageBlockThresholdPercent; KextThrottleCpuUsageWakeupThresholdPercent = template.KextThrottleCpuUsageWakeupThresholdPercent; KextThrottleMinAvailableRamMB = template.KextThrottleMinAvailableRamMB; ContainerConfiguration = new SandboxContainerConfiguration(template.ContainerConfiguration); AdminRequiredProcessExecutionMode = template.AdminRequiredProcessExecutionMode; RedirectedTempFolderRootForVmExecution = pathRemapper.Remap(template.RedirectedTempFolderRootForVmExecution); RetryOnAzureWatsonExitCode = template.RetryOnAzureWatsonExitCode; EnsureTempDirectoriesExistenceBeforePipExecution = template.EnsureTempDirectoriesExistenceBeforePipExecution; GlobalUnsafeUntrackedScopes = pathRemapper.Remap(template.GlobalUnsafeUntrackedScopes); PreserveOutputsForIncrementalTool = template.PreserveOutputsForIncrementalTool; GlobalUnsafePassthroughEnvironmentVariables = new List <string>(template.GlobalUnsafePassthroughEnvironmentVariables); VmConcurrencyLimit = template.VmConcurrencyLimit; DirectoriesToEnableFullReparsePointParsing = pathRemapper.Remap(template.DirectoriesToEnableFullReparsePointParsing); ExplicitlyReportDirectoryProbes = template.ExplicitlyReportDirectoryProbes; }
/// <nodoc /> public RootModuleConfiguration(IRootModuleConfiguration template, PathRemapper pathRemapper) : base(template, pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); ModulePolicies = new Dictionary <ModuleId, IModuleConfiguration>(); SearchPathEnumerationTools = new List <RelativePath>( template.SearchPathEnumerationTools.Select(pathRemapper.Remap)); foreach (var module in template.ModulePolicies.Values) { ModulePolicies.Add(module.ModuleId, new ModuleConfiguration(module, pathRemapper)); } }
/// <nodoc /> public Mount(IMount template, PathRemapper pathRemapper) : base(template, pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); Name = pathRemapper.Remap(template.Name); Path = pathRemapper.Remap(template.Path); TrackSourceFileChanges = template.TrackSourceFileChanges; IsWritable = template.IsWritable; IsReadable = template.IsReadable; IsSystem = template.IsSystem; IsScrubbable = template.IsScrubbable; AllowCreateDirectory = template.AllowCreateDirectory; }
/// <nodoc/> public RushResolverSettings( IRushResolverSettings resolverSettings, PathRemapper pathRemapper) : base(resolverSettings, pathRemapper) { Root = pathRemapper.Remap(resolverSettings.Root); ModuleName = resolverSettings.ModuleName; UntrackedDirectoryScopes = resolverSettings.UntrackedDirectoryScopes; UntrackedFiles = resolverSettings.UntrackedFiles; UntrackedDirectories = resolverSettings.UntrackedDirectories; Environment = resolverSettings.Environment; KeepProjectGraphFile = resolverSettings.KeepProjectGraphFile; NodeExeLocation = resolverSettings.NodeExeLocation; AdditionalOutputDirectories = resolverSettings.AdditionalOutputDirectories; }
/// <summary> /// Create new mutable instance from template /// </summary> /// <remarks> /// This is the only class with CommandLineConfiguration as the configuration entrypoint where the pathRemapper is an argument with default value. /// If the argument was optional everywhere as well there would be no compiler helping us if someone forgot to pass it along. /// This is the main entrypoint so we allow a default value here for convenience /// </remarks> public CommandLineConfiguration(ICommandLineConfiguration template, PathRemapper pathRemapper = null) : base(template, pathRemapper) { Contract.Assume(template != null); pathRemapper = pathRemapper ?? new PathRemapper(); Help = template.Help; NoLogo = template.NoLogo; LaunchDebugger = template.LaunchDebugger; Startup = new StartupConfiguration(template.Startup, pathRemapper); Filter = template.Filter; Server = template.Server; ServerDeploymentDirectory = pathRemapper.Remap(template.ServerDeploymentDirectory); ServerMaxIdleTimeInMinutes = template.ServerMaxIdleTimeInMinutes; }
/// <nodoc /> public StartupConfiguration(IStartupConfiguration template, PathRemapper pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); ConfigFile = pathRemapper.Remap(template.ConfigFile); AdditionalConfigFiles = pathRemapper.Remap(template.AdditionalConfigFiles); Properties = new Dictionary <string, string>(); foreach (var kv in template.Properties) { Properties.Add(kv.Key, kv.Value); } QualifierIdentifiers = new List <string>(template.QualifierIdentifiers); ImplicitFilters = new List <string>(template.ImplicitFilters); CurrentHost = new Host(template.CurrentHost, pathRemapper); }
/// <nodoc/> public JavaScriptResolverSettings( IJavaScriptResolverSettings resolverSettings, PathRemapper pathRemapper) : base(resolverSettings, pathRemapper) { Root = pathRemapper.Remap(resolverSettings.Root); ModuleName = resolverSettings.ModuleName; UntrackedDirectoryScopes = resolverSettings.UntrackedDirectoryScopes; UntrackedFiles = resolverSettings.UntrackedFiles; UntrackedDirectories = resolverSettings.UntrackedDirectories; Environment = resolverSettings.Environment; KeepProjectGraphFile = resolverSettings.KeepProjectGraphFile; NodeExeLocation = resolverSettings.NodeExeLocation; AdditionalOutputDirectories = resolverSettings.AdditionalOutputDirectories; Execute = resolverSettings.Execute; CustomCommands = resolverSettings.CustomCommands; Exports = resolverSettings.Exports; }
/// <nodoc/> public RushResolverSettings( IRushResolverSettings resolverSettings, PathRemapper pathRemapper) : base(resolverSettings, pathRemapper) { Root = pathRemapper.Remap(resolverSettings.Root); ModuleName = resolverSettings.ModuleName; UntrackedDirectoryScopes = resolverSettings.UntrackedDirectoryScopes; UntrackedFiles = resolverSettings.UntrackedFiles; UntrackedDirectories = resolverSettings.UntrackedDirectories; Environment = resolverSettings.Environment; KeepProjectGraphFile = resolverSettings.KeepProjectGraphFile; NodeExeLocation = resolverSettings.NodeExeLocation; AdditionalOutputDirectories = resolverSettings.AdditionalOutputDirectories; Execute = resolverSettings.Execute; CustomCommands = resolverSettings.CustomCommands; RushLibBaseLocation = resolverSettings.RushLibBaseLocation; Exports = resolverSettings.Exports; TrackDependenciesWithShrinkwrapDepsFile = resolverSettings.TrackDependenciesWithShrinkwrapDepsFile; }
/// <nodoc /> public LayoutConfiguration(ILayoutConfiguration template, PathRemapper pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); PrimaryConfigFile = pathRemapper.Remap(template.PrimaryConfigFile); SourceDirectory = pathRemapper.Remap(template.SourceDirectory); OutputDirectory = pathRemapper.Remap(template.OutputDirectory); ObjectDirectory = pathRemapper.Remap(template.ObjectDirectory); FrontEndDirectory = pathRemapper.Remap(template.FrontEndDirectory); CacheDirectory = pathRemapper.Remap(template.CacheDirectory); EngineCacheDirectory = pathRemapper.Remap(template.EngineCacheDirectory); TempDirectory = pathRemapper.Remap(template.TempDirectory); BuildXlBinDirectory = pathRemapper.Remap(template.BuildXlBinDirectory); FileContentTableFile = pathRemapper.Remap(template.FileContentTableFile); SymlinkDefinitionFile = pathRemapper.Remap(template.SymlinkDefinitionFile); SchedulerFileChangeTrackerFile = pathRemapper.Remap(template.SchedulerFileChangeTrackerFile); IncrementalSchedulingStateFile = pathRemapper.Remap(template.IncrementalSchedulingStateFile); FingerprintStoreDirectory = pathRemapper.Remap(template.FingerprintStoreDirectory); }
/// <nodoc /> public NugetResolverSettings(INugetResolverSettings template, PathRemapper pathRemapper) : base(template, pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); Configuration = template.Configuration == null ? null : new NugetConfiguration(template.Configuration); Repositories = new Dictionary <string, string>(template.Repositories.Count); foreach (var kv in template.Repositories) { Repositories.Add(kv.Key, kv.Value); } Packages = new List <INugetPackage>(template.Packages.Count); foreach (var package in template.Packages) { Packages.Add(new NugetPackage(package)); } DoNotEnforceDependencyVersions = template.DoNotEnforceDependencyVersions; }
/// <nodoc /> public SandboxConfiguration(ISandboxConfiguration template, PathRemapper pathRemapper) { Contract.Assume(template != null); m_unsafeSandboxConfig = new UnsafeSandboxConfiguration(template.UnsafeSandboxConfiguration); DebugInstantPipOutputs = template.DebugInstantPipOutputs; BreakOnUnexpectedFileAccess = template.BreakOnUnexpectedFileAccess; FileAccessIgnoreCodeCoverage = template.FileAccessIgnoreCodeCoverage; FailUnexpectedFileAccesses = template.FailUnexpectedFileAccesses; DefaultTimeout = template.DefaultTimeout; DefaultWarningTimeout = template.DefaultWarningTimeout; TimeoutMultiplier = template.TimeoutMultiplier; WarningTimeoutMultiplier = template.WarningTimeoutMultiplier; TimeoutDumpDirectory = pathRemapper.Remap(template.TimeoutDumpDirectory); LogObservedFileAccesses = template.LogObservedFileAccesses; LogProcesses = template.LogProcesses; LogProcessData = template.LogProcessData; LogFileAccessTables = template.LogFileAccessTables; OutputReportingMode = template.OutputReportingMode; FileSystemMode = template.FileSystemMode; ForceReadOnlyForRequestedReadWrite = template.ForceReadOnlyForRequestedReadWrite; FlushPageCacheToFileSystemOnStoringOutputsToCache = template.FlushPageCacheToFileSystemOnStoringOutputsToCache; NormalizeReadTimestamps = template.NormalizeReadTimestamps; UseLargeNtClosePreallocatedList = template.UseLargeNtClosePreallocatedList; UseExtraThreadToDrainNtClose = template.UseExtraThreadToDrainNtClose; MaskUntrackedAccesses = template.MaskUntrackedAccesses; LogProcessDetouringStatus = template.LogProcessDetouringStatus; HardExitOnErrorInDetours = template.HardExitOnErrorInDetours; CheckDetoursMessageCount = template.CheckDetoursMessageCount; AllowInternalDetoursErrorNotificationFile = template.AllowInternalDetoursErrorNotificationFile; EnforceAccessPoliciesOnDirectoryCreation = template.EnforceAccessPoliciesOnDirectoryCreation; KextMeasureProcessCpuTimes = template.KextMeasureProcessCpuTimes; KextReportQueueSizeMb = template.KextReportQueueSizeMb; KextEnableReportBatching = template.KextEnableReportBatching; KextThrottleCpuUsageBlockThresholdPercent = template.KextThrottleCpuUsageBlockThresholdPercent; KextThrottleCpuUsageWakeupThresholdPercent = template.KextThrottleCpuUsageWakeupThresholdPercent; KextThrottleMinAvailableRamMB = template.KextThrottleMinAvailableRamMB; ContainerConfiguration = new SandboxContainerConfiguration(template.ContainerConfiguration); AdminRequiredProcessExecutionMode = template.AdminRequiredProcessExecutionMode; }
/// <nodoc /> public EngineConfiguration(IEngineConfiguration template, PathRemapper pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); DefaultFilter = template.DefaultFilter; RootMap = new Dictionary <string, AbsolutePath>(); foreach (var kv in template.RootMap) { RootMap.Add(kv.Key, pathRemapper.Remap(kv.Value)); } UseHardlinks = template.UseHardlinks; ScanChangeJournal = template.ScanChangeJournal; ScanChangeJournalTimeLimitInSec = template.ScanChangeJournalTimeLimitInSec; DisableConHostSharing = template.DisableConHostSharing; Phase = template.Phase; CleanOnly = template.CleanOnly; Scrub = template.Scrub; ExitOnNewGraph = template.ExitOnNewGraph; MaxRelativeOutputDirectoryLength = template.MaxRelativeOutputDirectoryLength; CleanTempDirectories = template.CleanTempDirectories; ReuseEngineState = template.ReuseEngineState; BuildLockPollingIntervalSec = template.BuildLockPollingIntervalSec; BuildLockWaitTimeoutMins = template.BuildLockWaitTimeoutMins; Converge = template.Converge; DirectoriesToTranslate = template.DirectoriesToTranslate.Select( d => new TranslateDirectoryData(d.RawUserOption, pathRemapper.Remap(d.FromPath), pathRemapper.Remap(d.ToPath))).ToList(); ScrubDirectories = pathRemapper.Remap(template.ScrubDirectories); CompressGraphFiles = template.CompressGraphFiles; FileChangeTrackerInitializationMode = template.FileChangeTrackerInitializationMode; LogStatistics = template.LogStatistics; TrackBuildsInUserFolder = template.TrackBuildsInUserFolder; TrackGvfsProjections = template.TrackGvfsProjections; UseFileContentTable = template.UseFileContentTable; AllowDuplicateTemporaryDirectory = template.AllowDuplicateTemporaryDirectory; UnsafeAllowOutOfMountWrites = template.UnsafeAllowOutOfMountWrites; VerifyFileContentOnBuildManifestHashComputation = template.VerifyFileContentOnBuildManifestHashComputation; }
/// <nodoc/> public JavaScriptResolverSettings( IJavaScriptResolverSettings resolverSettings, PathRemapper pathRemapper) : base(resolverSettings, pathRemapper) { Root = pathRemapper.Remap(resolverSettings.Root); ModuleName = resolverSettings.ModuleName; UntrackedDirectoryScopes = resolverSettings.UntrackedDirectoryScopes; UntrackedFiles = resolverSettings.UntrackedFiles; UntrackedDirectories = resolverSettings.UntrackedDirectories; UntrackedGlobalDirectoryScopes = resolverSettings.UntrackedGlobalDirectoryScopes; Environment = resolverSettings.Environment; KeepProjectGraphFile = resolverSettings.KeepProjectGraphFile; NodeExeLocation = resolverSettings.NodeExeLocation; AdditionalOutputDirectories = resolverSettings.AdditionalOutputDirectories; Execute = resolverSettings.Execute; CustomCommands = resolverSettings.CustomCommands; Exports = resolverSettings.Exports; WritingToStandardErrorFailsExecution = resolverSettings.WritingToStandardErrorFailsExecution; DoubleWritePolicy = resolverSettings.DoubleWritePolicy; CustomScheduling = resolverSettings.CustomScheduling; }
/// <nodoc/> public JavaScriptResolverSettings( IJavaScriptResolverSettings resolverSettings, PathRemapper pathRemapper) : base(resolverSettings, resolverSettings, pathRemapper) { Root = pathRemapper.Remap(resolverSettings.Root); ModuleName = resolverSettings.ModuleName; Environment = resolverSettings.Environment; KeepProjectGraphFile = resolverSettings.KeepProjectGraphFile; NodeExeLocation = pathRemapper.Remap(resolverSettings.NodeExeLocation); AdditionalOutputDirectories = resolverSettings.AdditionalOutputDirectories; Execute = resolverSettings.Execute; CustomCommands = resolverSettings.CustomCommands; Exports = resolverSettings.Exports; WritingToStandardErrorFailsExecution = resolverSettings.WritingToStandardErrorFailsExecution; DoubleWritePolicy = resolverSettings.DoubleWritePolicy; CustomScheduling = resolverSettings.CustomScheduling; CustomScripts = resolverSettings.CustomScripts; SuccessExitCodes = resolverSettings.SuccessExitCodes; RetryExitCodes = resolverSettings.RetryExitCodes; ProcessRetries = resolverSettings.ProcessRetries; AdditionalDependencies = resolverSettings.AdditionalDependencies?.Select(additionalDependency => new JavaScriptDependency(additionalDependency, pathRemapper))?.ToList(); }
/// <nodoc /> public LayoutConfiguration(ILayoutConfiguration template, PathRemapper pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); PrimaryConfigFile = pathRemapper.Remap(template.PrimaryConfigFile); SourceDirectory = pathRemapper.Remap(template.SourceDirectory); OutputDirectory = pathRemapper.Remap(template.OutputDirectory); ObjectDirectory = pathRemapper.Remap(template.ObjectDirectory); RedirectedDirectory = pathRemapper.Remap(template.RedirectedDirectory); FrontEndDirectory = pathRemapper.Remap(template.FrontEndDirectory); CacheDirectory = pathRemapper.Remap(template.CacheDirectory); EngineCacheDirectory = pathRemapper.Remap(template.EngineCacheDirectory); TempDirectory = pathRemapper.Remap(template.TempDirectory); BuildEngineDirectory = pathRemapper.Remap(template.BuildEngineDirectory); FileContentTableFile = pathRemapper.Remap(template.FileContentTableFile); SymlinkDefinitionFile = pathRemapper.Remap(template.SymlinkDefinitionFile); SchedulerFileChangeTrackerFile = pathRemapper.Remap(template.SchedulerFileChangeTrackerFile); IncrementalSchedulingStateFile = pathRemapper.Remap(template.IncrementalSchedulingStateFile); FingerprintStoreDirectory = pathRemapper.Remap(template.FingerprintStoreDirectory); EmitSpotlightIndexingWarning = template.EmitSpotlightIndexingWarning; RedirectedUserProfileJunctionRoot = pathRemapper.Remap(template.RedirectedUserProfileJunctionRoot); }
/// <nodoc/> public MsBuildResolverSettings( IMsBuildResolverSettings resolverSettings, PathRemapper pathRemapper) : base(resolverSettings, pathRemapper) { Root = pathRemapper.Remap(resolverSettings.Root); RootTraversal = resolverSettings.RootTraversal.IsValid? pathRemapper.Remap(resolverSettings.RootTraversal) : Root; ModuleName = resolverSettings.ModuleName; AdditionalOutputDirectories = resolverSettings.AdditionalOutputDirectories; UntrackedDirectoryScopes = resolverSettings.UntrackedDirectoryScopes; UntrackedFiles = resolverSettings.UntrackedFiles; UntrackedDirectories = resolverSettings.UntrackedDirectories; RunInContainer = resolverSettings.RunInContainer; MsBuildSearchLocations = resolverSettings.MsBuildSearchLocations; FileNameEntryPoint = resolverSettings.FileNameEntryPoint; InitialTargets = resolverSettings.InitialTargets; Environment = resolverSettings.Environment; GlobalProperties = resolverSettings.GlobalProperties; LogVerbosity = resolverSettings.LogVerbosity; EnableBinLogTracing = resolverSettings.EnableBinLogTracing; EnableEngineTracing = resolverSettings.EnableEngineTracing; KeepProjectGraphFile = resolverSettings.KeepProjectGraphFile; EnableTransitiveProjectReferences = resolverSettings.EnableTransitiveProjectReferences; }
/// <nodoc /> public DirectoryMembershipFingerprinterRule(IDirectoryMembershipFingerprinterRule template, PathRemapper pathRemapper) : base(template, pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); Name = template.Name; Root = pathRemapper.Remap(template.Root); DisableFilesystemEnumeration = template.DisableFilesystemEnumeration; FileIgnoreWildcards = new List <PathAtom>(template.FileIgnoreWildcards.Select(pathRemapper.Remap)); }
/// <nodoc /> public ScheduleConfiguration(IScheduleConfiguration template, PathRemapper pathRemapper) { Contract.Assume(template != null); MaxProcesses = template.MaxProcesses; MaxLightProcesses = template.MaxLightProcesses; MaxIO = template.MaxIO; MaxChooseWorkerCpu = template.MaxChooseWorkerCpu; MaxChooseWorkerCacheLookup = template.MaxChooseWorkerCacheLookup; MaxCacheLookup = template.MaxCacheLookup; MaxMaterialize = template.MaxMaterialize; EnvironmentFingerprint = template.EnvironmentFingerprint; DisableProcessRetryOnResourceExhaustion = template.DisableProcessRetryOnResourceExhaustion; StopOnFirstError = template.StopOnFirstError; LowPriority = template.LowPriority; EnableLazyOutputMaterialization = template.EnableLazyOutputMaterialization; ForceSkipDependencies = template.ForceSkipDependencies; UseHistoricalPerformanceInfo = template.UseHistoricalPerformanceInfo; RequiredOutputMaterialization = template.RequiredOutputMaterialization; TreatDirectoryAsAbsentFileOnHashingInputContent = template.TreatDirectoryAsAbsentFileOnHashingInputContent; MaximumRamUtilizationPercentage = template.MaximumRamUtilizationPercentage; MinimumTotalAvailableRamMb = template.MinimumTotalAvailableRamMb; MinimumDiskSpaceForPipsGb = template.MinimumDiskSpaceForPipsGb; MaximumAllowedMemoryPressureLevel = template.MaximumAllowedMemoryPressureLevel; AllowCopySymlink = template.AllowCopySymlink; AdaptiveIO = template.AdaptiveIO; ReuseOutputsOnDisk = template.ReuseOutputsOnDisk; UseHistoricalRamUsageInfo = template.UseHistoricalRamUsageInfo; VerifyCacheLookupPin = template.VerifyCacheLookupPin; PinCachedOutputs = template.PinCachedOutputs; CanonicalizeFilterOutputs = template.CanonicalizeFilterOutputs; ForceUseEngineInfoFromCache = template.ForceUseEngineInfoFromCache; UnsafeDisableGraphPostValidation = template.UnsafeDisableGraphPostValidation; ProcessRetries = template.ProcessRetries; StoreOutputsToCache = template.StoreOutputsToCache; EnableLazyWriteFileMaterialization = template.EnableLazyWriteFileMaterialization; WriteIpcOutput = template.WriteIpcOutput; OutputMaterializationExclusionRoots = pathRemapper.Remap(template.OutputMaterializationExclusionRoots); IncrementalScheduling = template.IncrementalScheduling; ComputePipStaticFingerprints = template.ComputePipStaticFingerprints; LogPipStaticFingerprintTexts = template.LogPipStaticFingerprintTexts; CreateHandleWithSequentialScanOnHashingOutputFiles = template.CreateHandleWithSequentialScanOnHashingOutputFiles; OutputFileExtensionsForSequentialScanHandleOnHashing = new List <PathAtom>(template.OutputFileExtensionsForSequentialScanHandleOnHashing.Select(pathRemapper.Remap)); TelemetryTagPrefix = template.TelemetryTagPrefix; MasterCpuMultiplier = template.MasterCpuMultiplier; MasterCacheLookupMultiplier = template.MasterCacheLookupMultiplier; SkipHashSourceFile = template.SkipHashSourceFile; UnsafeDisableSharedOpaqueEmptyDirectoryScrubbing = template.UnsafeDisableSharedOpaqueEmptyDirectoryScrubbing; UnsafeLazySODeletion = template.UnsafeLazySODeletion; UseFixedApiServerMoniker = template.UseFixedApiServerMoniker; InputChanges = pathRemapper.Remap(template.InputChanges); CacheOnly = template.CacheOnly; EnableSetupCostWhenChoosingWorker = template.EnableSetupCostWhenChoosingWorker; MaxSealDirs = template.MaxSealDirs; EnableHistoricCommitMemoryProjection = template.EnableHistoricCommitMemoryProjection; MaximumCommitUtilizationPercentage = template.MaximumCommitUtilizationPercentage; DelayedCacheLookupMinMultiplier = template.DelayedCacheLookupMinMultiplier; DelayedCacheLookupMaxMultiplier = template.DelayedCacheLookupMaxMultiplier; MaxRetriesDueToLowMemory = template.MaxRetriesDueToLowMemory; MaxRetriesDueToRetryableFailures = template.MaxRetriesDueToRetryableFailures; EnableLessAggresiveMemoryProjection = template.EnableLessAggresiveMemoryProjection; ManageMemoryMode = template.ManageMemoryMode; }
/// <summary> /// Polymorphic instantiation from template function /// </summary> /// <remarks> /// Each time we add a resolver, we'll have to add the instance here. /// </remarks> public static ResolverSettings CreateFromTemplate(IResolverSettings resolverSettings, PathRemapper pathRemapper) { Contract.Requires(resolverSettings != null); Contract.Requires(pathRemapper != null); switch (resolverSettings) { case IDScriptResolverSettings sourceResolver: return(new SourceResolverSettings(sourceResolver, pathRemapper)); case IDefaultSourceResolverSettings defaultResolver: return(new DefaultSourceResolverSettings(defaultResolver, pathRemapper)); case INugetResolverSettings nugetResolver: return(new NugetResolverSettings(nugetResolver, pathRemapper)); case IDownloadResolverSettings downloadResolver: return(new DownloadResolverSettings(downloadResolver, pathRemapper)); case IMsBuildResolverSettings msBuildResolver: return(new MsBuildResolverSettings(msBuildResolver, pathRemapper)); case INinjaResolverSettings ninjaResolver: return(new NinjaResolverSettings(ninjaResolver, pathRemapper)); case ICMakeResolverSettings cmakeResolver: return(new CMakeResolverSettings(cmakeResolver, pathRemapper)); case IRushResolverSettings rushResolver: return(new RushResolverSettings(rushResolver, pathRemapper)); case IYarnResolverSettings yarnResolver: return(new YarnResolverSettings(yarnResolver, pathRemapper)); default: Contract.Assume(false, "Unexpected type of resolver settings."); return(null); } }
/// <nodoc /> public InternalDefaultDScriptResolverSettings(IInternalDefaultDScriptResolverSettings template, PathRemapper pathRemapper) : base(template, pathRemapper) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); Projects = template.Projects == null ? null : new List <AbsolutePath>(template.Projects); }
/// <nodoc /> public ScheduleConfiguration(IScheduleConfiguration template, PathRemapper pathRemapper) { Contract.Assume(template != null); MaxProcesses = template.MaxProcesses; MaxLightProcesses = template.MaxLightProcesses; MaxIO = template.MaxIO; MaxChooseWorkerCpu = template.MaxChooseWorkerCpu; MaxChooseWorkerCacheLookup = template.MaxChooseWorkerCacheLookup; MaxCacheLookup = template.MaxCacheLookup; MaxMaterialize = template.MaxMaterialize; EnvironmentFingerprint = template.EnvironmentFingerprint; DisableProcessRetryOnResourceExhaustion = template.DisableProcessRetryOnResourceExhaustion; StopOnFirstError = template.StopOnFirstError; LowPriority = template.LowPriority; EnableLazyOutputMaterialization = template.EnableLazyOutputMaterialization; ForceSkipDependencies = template.ForceSkipDependencies; UseHistoricalPerformanceInfo = template.UseHistoricalPerformanceInfo; RequiredOutputMaterialization = template.RequiredOutputMaterialization; TreatDirectoryAsAbsentFileOnHashingInputContent = template.TreatDirectoryAsAbsentFileOnHashingInputContent; MaximumRamUtilizationPercentage = template.MaximumRamUtilizationPercentage; MinimumTotalAvailableRamMb = template.MinimumTotalAvailableRamMb; AllowCopySymlink = template.AllowCopySymlink; AdaptiveIO = template.AdaptiveIO; ReuseOutputsOnDisk = template.ReuseOutputsOnDisk; UseHistoricalRamUsageInfo = template.UseHistoricalRamUsageInfo; VerifyCacheLookupPin = template.VerifyCacheLookupPin; PinCachedOutputs = template.PinCachedOutputs; CanonicalizeFilterOutputs = template.CanonicalizeFilterOutputs; ForceUseEngineInfoFromCache = template.ForceUseEngineInfoFromCache; UnsafeDisableGraphPostValidation = template.UnsafeDisableGraphPostValidation; ProcessRetries = template.ProcessRetries; UnsafeLazySymlinkCreation = template.UnsafeLazySymlinkCreation; UnexpectedSymlinkAccessReportingMode = template.UnexpectedSymlinkAccessReportingMode; StoreOutputsToCache = template.StoreOutputsToCache; EnableLazyWriteFileMaterialization = template.EnableLazyWriteFileMaterialization; WriteIpcOutput = template.WriteIpcOutput; OutputMaterializationExclusionRoots = pathRemapper.Remap(template.OutputMaterializationExclusionRoots); IncrementalScheduling = template.IncrementalScheduling; GraphAgnosticIncrementalScheduling = template.GraphAgnosticIncrementalScheduling; ComputePipStaticFingerprints = template.ComputePipStaticFingerprints; LogPipStaticFingerprintTexts = template.LogPipStaticFingerprintTexts; CreateHandleWithSequentialScanOnHashingOutputFiles = template.CreateHandleWithSequentialScanOnHashingOutputFiles; OutputFileExtensionsForSequentialScanHandleOnHashing = new List <PathAtom>(template.OutputFileExtensionsForSequentialScanHandleOnHashing.Select(pathRemapper.Remap)); TelemetryTagPrefix = template.TelemetryTagPrefix; MasterCpuMultiplier = template.MasterCpuMultiplier; MasterCacheLookupMultiplier = template.MasterCacheLookupMultiplier; SkipHashSourceFile = template.SkipHashSourceFile; UnsafeDisableSharedOpaqueEmptyDirectoryScrubbing = template.UnsafeDisableSharedOpaqueEmptyDirectoryScrubbing; EarlyWorkerRelease = template.EarlyWorkerRelease; EarlyWorkerReleaseMultiplier = template.EarlyWorkerReleaseMultiplier; }
/// <nodoc /> public LoggingConfiguration(ILoggingConfiguration template, PathRemapper pathRemapper) : base(template) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); LogsDirectory = pathRemapper.Remap(template.LogsDirectory); RedirectedLogsDirectory = pathRemapper.Remap(template.RedirectedLogsDirectory); LogPrefix = template.LogPrefix; Log = pathRemapper.Remap(template.Log); ErrorLog = pathRemapper.Remap(template.ErrorLog); WarningLog = pathRemapper.Remap(template.WarningLog); LogExecution = template.LogExecution; LogPackedExecution = template.LogPackedExecution; ExecutionLog = pathRemapper.Remap(template.ExecutionLog); StoreFingerprints = template.StoreFingerprints; SaveFingerprintStoreToLogs = template.SaveFingerprintStoreToLogs; FingerprintStoreMode = template.FingerprintStoreMode; FingerprintStoreMaxEntryAgeMinutes = template.FingerprintStoreMaxEntryAgeMinutes; FingerprintStoreBulkLoad = template.FingerprintStoreBulkLoad; FingerprintsLogDirectory = pathRemapper.Remap(template.FingerprintsLogDirectory); ExecutionFingerprintStoreLogDirectory = pathRemapper.Remap(template.ExecutionFingerprintStoreLogDirectory); CacheLookupFingerprintStoreLogDirectory = pathRemapper.Remap(template.CacheLookupFingerprintStoreLogDirectory); HistoricMetadataCacheLogDirectory = pathRemapper.Remap(template.HistoricMetadataCacheLogDirectory); EngineCacheLogDirectory = pathRemapper.Remap(template.EngineCacheLogDirectory); EngineCacheCorruptFilesLogDirectory = pathRemapper.Remap(template.EngineCacheCorruptFilesLogDirectory); CustomLog = new Dictionary <AbsolutePath, (IReadOnlyList <int>, EventLevel?)>(); foreach (var kv in template.CustomLog) { CustomLog.Add(pathRemapper.Remap(kv.Key), kv.Value); } CustomLogEtwKinds = new Dictionary <AbsolutePath, string>(); foreach (var kv in template.CustomLogEtwKinds) { CustomLogEtwKinds.Add(pathRemapper.Remap(kv.Key), kv.Value); } NoLog = new List <int>(template.NoLog); NoExecutionLog = new List <int>(template.NoExecutionLog); Diagnostic = template.Diagnostic; ConsoleVerbosity = template.ConsoleVerbosity; FileVerbosity = template.FileVerbosity; LogCounters = template.LogCounters; LogStats = template.LogStats; EnableAsyncLogging = template.EnableAsyncLogging; StatsLog = pathRemapper.Remap(template.StatsLog); StatsPrfLog = pathRemapper.Remap(template.StatsPrfLog); EventSummaryLog = pathRemapper.Remap(template.EventSummaryLog); Environment = template.Environment; RemoteTelemetry = template.RemoteTelemetry; TraceInfo = new Dictionary <string, string>(); foreach (var kv in template.TraceInfo) { TraceInfo.Add(kv.Key, kv.Value); } Color = template.Color; AnimateTaskbar = template.AnimateTaskbar; RelatedActivityId = template.RelatedActivityId; LogsToRetain = template.LogsToRetain; FancyConsole = template.FancyConsole; FancyConsoleMaxStatusPips = template.FancyConsoleMaxStatusPips; SubstSource = pathRemapper.Remap(template.SubstSource); SubstTarget = pathRemapper.Remap(template.SubstTarget); DisableLoggedPathTranslation = template.DisableLoggedPathTranslation; LogStatus = template.LogStatus; LogTracer = template.LogTracer; StatusFrequencyMs = template.StatusFrequencyMs; StatusLog = pathRemapper.Remap(template.StatusLog); TraceLog = pathRemapper.Remap(template.TraceLog); CacheMissLog = pathRemapper.Remap(template.CacheMissLog); DevLog = pathRemapper.Remap(template.DevLog); RpcLog = pathRemapper.Remap(template.RpcLog); PipOutputLog = pathRemapper.Remap(template.PipOutputLog); FailPipOnFileAccessError = template.FailPipOnFileAccessError; LogMemory = template.LogMemory; ReplayWarnings = template.ReplayWarnings; UseCustomPipDescriptionOnConsole = template.UseCustomPipDescriptionOnConsole; CacheMissAnalysisOption = new CacheMissAnalysisOption( template.CacheMissAnalysisOption.Mode, new List <string>(template.CacheMissAnalysisOption.Keys), pathRemapper.Remap(template.CacheMissAnalysisOption.CustomPath)); CacheMissDiffFormat = template.CacheMissDiffFormat; CacheMissBatch = template.CacheMissBatch; OptimizeConsoleOutputForAzureDevOps = template.OptimizeConsoleOutputForAzureDevOps; InvocationExpandedCommandLineArguments = template.InvocationExpandedCommandLineArguments; OptimizeProgressUpdatingForAzureDevOps = template.OptimizeProgressUpdatingForAzureDevOps; OptimizeVsoAnnotationsForAzureDevOps = template.OptimizeVsoAnnotationsForAzureDevOps; AriaIndividualMessageSizeLimitBytes = template.AriaIndividualMessageSizeLimitBytes; MaxNumPipTelemetryBatches = template.MaxNumPipTelemetryBatches; DumpFailedPips = template.DumpFailedPips; DumpFailedPipsLogLimit = template.DumpFailedPipsLogLimit; DumpFailedPipsWithDynamicData = template.DumpFailedPipsWithDynamicData; LogCachedPipOutputs = template.LogCachedPipOutputs; }
/// <nodoc /> public SourceResolverSettings(IDScriptResolverSettings template, PathRemapper pathRemapper) : base(template, pathRemapper) { }
/// <nodoc/> public LageResolverSettings(ILageResolverSettings template, PathRemapper pathRemapper) : base(template, pathRemapper) { NpmLocation = pathRemapper.Remap(template.NpmLocation); }
/// <nodoc/> public CustomJavaScriptResolverSettings(ICustomJavaScriptResolverSettings resolverSettings, PathRemapper pathRemapper) : base(resolverSettings, pathRemapper) { if (resolverSettings.CustomProjectGraph?.GetValue() is AbsolutePath absolutePath) { CustomProjectGraph = new DiscriminatingUnion <AbsolutePath, IReadOnlyDictionary <string, IJavaScriptCustomProjectGraphNode> >(pathRemapper.Remap(absolutePath)); } else { CustomProjectGraph = resolverSettings.CustomProjectGraph; } }
/// <nodoc /> public LoggingConfiguration(ILoggingConfiguration template, PathRemapper pathRemapper) : base(template) { Contract.Assume(template != null); Contract.Assume(pathRemapper != null); LogsDirectory = pathRemapper.Remap(template.LogsDirectory); RedirectedLogsDirectory = pathRemapper.Remap(template.RedirectedLogsDirectory); LogPrefix = template.LogPrefix; Log = pathRemapper.Remap(template.Log); ErrorLog = pathRemapper.Remap(template.ErrorLog); WarningLog = pathRemapper.Remap(template.WarningLog); LogExecution = template.LogExecution; ExecutionLog = pathRemapper.Remap(template.ExecutionLog); StoreFingerprints = template.StoreFingerprints; FingerprintStoreMode = template.FingerprintStoreMode; FingerprintStoreMaxEntryAgeMinutes = template.FingerprintStoreMaxEntryAgeMinutes; FingerprintsLogDirectory = pathRemapper.Remap(template.FingerprintsLogDirectory); ExecutionFingerprintStoreLogDirectory = pathRemapper.Remap(template.ExecutionFingerprintStoreLogDirectory); CacheLookupFingerprintStoreLogDirectory = pathRemapper.Remap(template.CacheLookupFingerprintStoreLogDirectory); HistoricMetadataCacheLogDirectory = pathRemapper.Remap(template.HistoricMetadataCacheLogDirectory); EngineCacheLogDirectory = pathRemapper.Remap(template.EngineCacheLogDirectory); EngineCacheCorruptFilesLogDirectory = pathRemapper.Remap(template.EngineCacheCorruptFilesLogDirectory); CustomLog = new Dictionary <AbsolutePath, IReadOnlyList <int> >(); foreach (var kv in template.CustomLog) { CustomLog.Add(pathRemapper.Remap(kv.Key), kv.Value); } CustomLogEtwKinds = new Dictionary <AbsolutePath, string>(); foreach (var kv in template.CustomLogEtwKinds) { CustomLogEtwKinds.Add(pathRemapper.Remap(kv.Key), kv.Value); } NoLog = new List <int>(template.NoLog); NoExecutionLog = new List <int>(template.NoExecutionLog); Diagnostic = template.Diagnostic; ConsoleVerbosity = template.ConsoleVerbosity; FileVerbosity = template.FileVerbosity; LogCounters = template.LogCounters; LogStats = template.LogStats; EnableAsyncLogging = template.EnableAsyncLogging; StatsLog = pathRemapper.Remap(template.StatsLog); EventSummaryLog = pathRemapper.Remap(template.EventSummaryLog); Environment = template.Environment; RemoteTelemetry = template.RemoteTelemetry; TraceInfo = new Dictionary <string, string>(); foreach (var kv in template.TraceInfo) { TraceInfo.Add(kv.Key, kv.Value); } Color = template.Color; AnimateTaskbar = template.AnimateTaskbar; RelatedActivityId = template.RelatedActivityId; LogsToRetain = template.LogsToRetain; FancyConsole = template.FancyConsole; FancyConsoleMaxStatusPips = template.FancyConsoleMaxStatusPips; SubstSource = pathRemapper.Remap(template.SubstSource); SubstTarget = pathRemapper.Remap(template.SubstTarget); DisableLoggedPathTranslation = template.DisableLoggedPathTranslation; LogStatus = template.LogStatus; StatusFrequencyMs = template.StatusFrequencyMs; StatusLog = pathRemapper.Remap(template.StatusLog); CacheMissLog = pathRemapper.Remap(template.CacheMissLog); DevLog = pathRemapper.Remap(template.DevLog); RpcLog = pathRemapper.Remap(template.RpcLog); PipOutputLog = pathRemapper.Remap(template.PipOutputLog); FailPipOnFileAccessError = template.FailPipOnFileAccessError; LogMemory = template.LogMemory; ReplayWarnings = template.ReplayWarnings; UseCustomPipDescriptionOnConsole = template.UseCustomPipDescriptionOnConsole; CacheMissAnalysisOption = new CacheMissAnalysisOption( template.CacheMissAnalysisOption.Mode, new List <string>(template.CacheMissAnalysisOption.Keys), pathRemapper.Remap(template.CacheMissAnalysisOption.CustomPath)); }
/// <nodoc /> public DefaultSourceResolverSettings(IDefaultSourceResolverSettings template, PathRemapper pathRemapper) : base(template, pathRemapper) { Contract.Requires(template != null); Contract.Requires(pathRemapper != null); }