Merged PR 705616: Remove JetBrains/Resharper Annotations

JetBrainsAnnotations should be removed now that there are built-in NotNull attributes.
This commit is contained in:
Will Li 2023-03-08 19:25:56 +00:00
Родитель 295525b24b
Коммит 90e4d7d8ab
275 изменённых файлов: 738 добавлений и 4358 удалений

Просмотреть файл

@ -15,7 +15,7 @@ using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Tracing;
using BuildXL.ViewModel;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL
{
@ -59,7 +59,7 @@ namespace BuildXL
DateTime baseTime,
BuildViewModel buildViewModel,
bool useCustomPipDescription,
[CanBeNull] WarningMapper warningMapper,
[AllowNull] WarningMapper warningMapper,
int initialFrequencyMs,
int adoConsoleMaxIssuesToLog)
: base(eventSource, baseTime, warningMapper: warningMapper, level: EventLevel.Verbose, captureAllDiagnosticMessages: false, timeDisplay: TimeDisplay.Seconds, useCustomPipDescription: useCustomPipDescription)

Просмотреть файл

@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Tracing;
using BuildXL.Pips.Operations;
using BuildXL.Processes.Tracing;
@ -9,7 +10,6 @@ using BuildXL.Scheduler.Distribution;
using BuildXL.Tracing.CloudBuild;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Tracing;
using JetBrains.Annotations;
namespace BuildXL
{
@ -25,7 +25,7 @@ namespace BuildXL
Events eventSource,
DateTime baseTime,
bool useCustomPipDescription,
[CanBeNull] WarningMapper warningMapper)
[AllowNull] WarningMapper warningMapper)
: base(
eventSource,
baseTime,

Просмотреть файл

@ -13,7 +13,7 @@ using BuildXL.Cache.ContentStore.Utils;
using BuildXL.Utilities.Core.Tasks;
using ContentStoreTest.Test;
using FluentAssertions;
using JetBrains.Annotations;
using Xunit;
using Xunit.Sdk;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -24,10 +24,10 @@ using BuildXL.Cache.Host.Configuration;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.ParallelAlgorithms;
using JetBrains.Annotations;
using static BuildXL.Cache.Host.Configuration.DeploymentManifest;
using static BuildXL.Cache.Host.Service.DeploymentUtilities;
using AbsolutePath = BuildXL.Cache.ContentStore.Interfaces.FileSystem.AbsolutePath;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Cache.Host.Service
{
@ -663,7 +663,7 @@ namespace BuildXL.Cache.Host.Service
AccessToken = ContentHash.Random().ToHex();
}
internal string GetUrl(Context context, string hash, [CanBeNull] string proxyBaseAddress)
internal string GetUrl(Context context, string hash, [MaybeNull] string proxyBaseAddress)
{
if (proxyBaseAddress == null)
{

Просмотреть файл

@ -6,6 +6,7 @@ namespace Interfaces {
export const dll = BuildXLSdk.library({
assemblyName: "BuildXL.Cache.Interfaces",
sources: globR(d`.`, "*.cs"),
addNotNullAttributeFile: true,
references: [
...addIfLazy(BuildXLSdk.isFullFramework, () => [
NetFx.System.Dynamic.Runtime.dll,

Просмотреть файл

@ -3,9 +3,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
namespace BuildXL.Cache.Interfaces
{

Просмотреть файл

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Cache.Interfaces
{

Просмотреть файл

@ -3,12 +3,12 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using BuildXL.Cache.ContentStore.Hashing;
using BuildXL.Cache.ContentStore.Interfaces.Sessions;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
namespace BuildXL.Cache.Interfaces
{
@ -97,7 +97,7 @@ namespace BuildXL.Cache.Interfaces
/// next request for more in the enumeration may be to obtain L2
/// data.
/// </remarks>
IEnumerable<Task<Possible<StrongFingerprint, Failure>>> EnumerateStrongFingerprints([CanBeNull]WeakFingerprintHash weak, OperationHints hints = default, Guid activityId = default(Guid));
IEnumerable<Task<Possible<StrongFingerprint, Failure>>> EnumerateStrongFingerprints([MaybeNull]WeakFingerprintHash weak, OperationHints hints = default, Guid activityId = default(Guid));
/// <summary>
/// Get the unique cache entry that matches the Strong Fingerprint

Просмотреть файл

@ -3,11 +3,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Threading.Tasks;
using BuildXL.Cache.ContentStore.Interfaces.Sessions;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
namespace BuildXL.Cache.Interfaces
{

Просмотреть файл

@ -8,6 +8,7 @@ namespace Engine {
export const dll = BuildXLSdk.library({
assemblyName: "BuildXL.Engine",
generateLogs: true,
addNotNullAttributeFile: true,
sources: [
...globR(d`.`, "*.cs"),
],
@ -54,7 +55,6 @@ namespace Engine {
importFrom("Newtonsoft.Json").pkg,
],
internalsVisibleTo: [
"bxlScriptAnalyzer",
"BxlPipGraphFragmentGenerator",
"IntegrationTest.BuildXL.Scheduler",
"Test.BuildXL.Engine",

Просмотреть файл

@ -20,7 +20,7 @@ using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Configuration.Mutable;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using Logger = BuildXL.Engine.Tracing.Logger;
using Pure = System.Diagnostics.Contracts.PureAttribute;
@ -39,7 +39,7 @@ namespace BuildXL.Engine
CacheInitializationTask engineCacheTask,
MountsTable mountsTable,
EvaluationFilter evaluationFilter,
[CanBeNull] GraphReuseResult reuseResult,
[AllowNull] GraphReuseResult reuseResult,
out PipGraph pipGraph)
{
Contract.Requires(frontEndEngineAbstration != null);
@ -129,7 +129,7 @@ namespace BuildXL.Engine
private IPipGraphBuilder CreatePipGraphBuilder(
LoggingContext loggingContext,
MountsTable mountsTable,
[CanBeNull] GraphReuseResult reuseResult)
[AllowNull] GraphReuseResult reuseResult)
{
var searchPathToolsHash = new Scheduler.DirectoryMembershipFingerprinterRuleSet(Configuration, Context.StringTable).ComputeSearchPathToolsHash();
var builder = new PipGraph.Builder(
@ -684,7 +684,7 @@ namespace BuildXL.Engine
/// Factory method for the case when nothing can be reused.
/// Input changes may still optionally be provided.
/// </summary>
internal static GraphReuseResult CreateForNoReuse([CanBeNull] InputTracker.InputChanges inputChanges)
internal static GraphReuseResult CreateForNoReuse([AllowNull] InputTracker.InputChanges inputChanges)
{
return new GraphReuseResult(
pipGraph: null,
@ -696,7 +696,7 @@ namespace BuildXL.Engine
/// Factory method for the case when everything can be reused.
/// A non-null engine schedule must be provided; input changes may optionally be provided too.
/// </summary>
internal static GraphReuseResult CreateForFullReuse(EngineSchedule engineSchedule, [CanBeNull] InputTracker.InputChanges inputChanges)
internal static GraphReuseResult CreateForFullReuse(EngineSchedule engineSchedule, [AllowNull] InputTracker.InputChanges inputChanges)
{
Contract.Requires(engineSchedule != null);

Просмотреть файл

@ -48,7 +48,6 @@ using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Core.Tasks;
using BuildXL.Utilities.Tracing;
using BuildXL.ViewModel;
using JetBrains.Annotations;
using Microsoft.Win32.SafeHandles;
using static BuildXL.Utilities.Core.BuildParameters;
using static BuildXL.Utilities.Core.FormattableStringEx;
@ -236,7 +235,7 @@ namespace BuildXL.Engine
/// <remarks>
/// This is only populate on official builds, on developer builds this null
/// </remarks>
[CanBeNull]
[AllowNull]
private readonly string m_commitId;
/// <summary>
@ -245,7 +244,7 @@ namespace BuildXL.Engine
/// <remarks>
/// This is only populate on official builds, on developer builds this null
/// </remarks>
[CanBeNull]
[AllowNull]
private readonly string m_buildVersion;
private bool IsDistributedOrchestrator => Configuration.Distribution.BuildRole.IsOrchestrator();
@ -267,8 +266,8 @@ namespace BuildXL.Engine
DateTime? processStartTimeUtc,
TrackingEventListener trackingEventListener,
bool rememberAllChangedTrackedInputs,
[CanBeNull] string commitId,
[CanBeNull] string buildVersion)
[AllowNull] string commitId,
[AllowNull] string buildVersion)
{
Contract.Requires(context != null);
Contract.Requires(configuration != null);

Просмотреть файл

@ -14,8 +14,6 @@ using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Core.Qualifier;
using BuildXL.Utilities.Tracing;
using JetBrains.Annotations;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
namespace BuildXL.Engine
{

Просмотреть файл

@ -21,11 +21,9 @@ using BuildXL.Pips.Graph;
using BuildXL.Processes;
using BuildXL.Processes.Sideband;
using BuildXL.Scheduler;
using BuildXL.Scheduler.Artifacts;
using BuildXL.Scheduler.Cache;
using BuildXL.Scheduler.Distribution;
using BuildXL.Scheduler.Fingerprints;
using BuildXL.Scheduler.Graph;
using BuildXL.Scheduler.Performance;
using BuildXL.Scheduler.Tracing;
using BuildXL.Storage;
@ -40,7 +38,6 @@ using BuildXL.Utilities.Core.Tasks;
using BuildXL.Utilities.Core.Tracing;
using BuildXL.Utilities.VmCommandProxy;
using BuildXL.ViewModel;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using Logger = BuildXL.Engine.Tracing.Logger;
using SchedulerLogger = BuildXL.Scheduler.Tracing.Logger;
@ -760,7 +757,7 @@ namespace BuildXL.Engine
}
internal static void ScrubExtraneousFilesAndDirectories(
[CanBeNull] MountPathExpander mountPathExpander,
[AllowNull] MountPathExpander mountPathExpander,
Scheduler.Scheduler scheduler,
LoggingContext loggingContext,
IConfiguration configuration,
@ -910,7 +907,7 @@ namespace BuildXL.Engine
PathTable pathTable,
IConfiguration configuration,
IEnumerable<string> extraNonScrubbablePaths,
[CanBeNull] ITempCleaner tempCleaner)
[AllowNull] ITempCleaner tempCleaner)
{
var nonScrubbablePaths = new List<string>(new[]
{
@ -1497,7 +1494,7 @@ namespace BuildXL.Engine
/// <summary>
/// At the end of the build this logs some important stats about the build
/// </summary>
public SchedulerPerformanceInfo LogStats(LoggingContext loggingContext, [CanBeNull] BuildSummary buildSummary)
public SchedulerPerformanceInfo LogStats(LoggingContext loggingContext, [AllowNull] BuildSummary buildSummary)
{
#pragma warning disable SA1114 // Parameter list must follow declaration

Просмотреть файл

@ -4,9 +4,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
namespace BuildXL.Engine

Просмотреть файл

@ -23,7 +23,6 @@ using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using Microsoft.Win32.SafeHandles;
using static BuildXL.Utilities.Core.BuildParameters;
using static BuildXL.Utilities.Core.FormattableStringEx;
@ -566,7 +565,7 @@ namespace BuildXL.Engine
BinaryWriter writer,
PathTable pathTable,
IReadOnlyDictionary<string, string> buildParametersImpactingBuild,
[CanBeNull] IReadOnlyDictionary<string, IMount> mountsImpactingBuild,
[AllowNull] IReadOnlyDictionary<string, IMount> mountsImpactingBuild,
string changeTrackingStatePath)
{
Contract.Requires(writer != null);
@ -1467,14 +1466,14 @@ namespace BuildXL.Engine
/// Paths and hashes of files that did not change from the previous run. These files are guaranteed
/// to already have been tracked with the associated FileChangeTracker.
/// </summary>
[CanBeNull]
[AllowNull]
public ConcurrentDictionary<string, ContentHash> UnchangedPaths;
/// <summary>
/// Paths of files that definitely changed since the previous run, or <code>null</code>
/// if no such information is available.
/// </summary>
[CanBeNull]
[AllowNull]
public ConcurrentQueue<string> ChangedPaths;
/// <summary>

Просмотреть файл

@ -18,7 +18,6 @@ using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Tracing;
using JetBrains.Annotations;
namespace BuildXL.Engine
{
@ -87,7 +86,7 @@ namespace BuildXL.Engine
LoggingContext loggingContext,
BuildXLContext context,
IConfiguration configuration,
[CanBeNull] IReadOnlyDictionary<string, string> properties)
[AllowNull] IReadOnlyDictionary<string, string> properties)
{
Contract.Requires(context != null);
Contract.Requires(configuration != null);

Просмотреть файл

@ -10,7 +10,7 @@ using BuildXL.Engine.Cache.Fingerprints;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Engine
{
@ -293,13 +293,13 @@ namespace BuildXL.Engine
/// <summary>
/// Environment variable value.
/// </summary>
[CanBeNull]
[AllowNull]
public readonly string Value;
/// <summary>
/// Creates an instance of <see cref="EnvironmentVariableInput"/>.
/// </summary>
public EnvironmentVariableInput(string name, [CanBeNull] string value)
public EnvironmentVariableInput(string name, [AllowNull] string value)
{
Contract.Requires(!string.IsNullOrWhiteSpace(name));

Просмотреть файл

@ -3,12 +3,11 @@
using System;
using BuildXL.Engine.Tracing;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Core.Tasks;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Engine.Recovery
{

Просмотреть файл

@ -3,16 +3,15 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Globalization;
using System.IO;
using System.Linq;
using BuildXL.Native.IO;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Core.Tasks;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
namespace BuildXL.Engine.Recovery

Просмотреть файл

@ -3,11 +3,10 @@
using System;
using System.Diagnostics.ContractsLight;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Core.Tasks;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Engine.Recovery
{

Просмотреть файл

@ -4,13 +4,13 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Globalization;
using System.IO;
using System.Text;
using BuildXL.Native.IO;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using Microsoft.Win32.SafeHandles;
namespace BuildXL.Processes
@ -32,7 +32,7 @@ namespace BuildXL.Processes
/// <summary>
/// We shouldn't try to close this handle. Detours takes care of that.
/// </summary>
[CanBeNull]
[MaybeNull]
private readonly SafeFileHandle m_detoursReportHandle;
private readonly UnicodeEncoding m_encoding;
@ -79,8 +79,8 @@ namespace BuildXL.Processes
FlagsAndAttributes flagsAndAttributes,
FlagsAndAttributes openedFileOrDirectoryAttributes,
string path,
[CanBeNull]string enumeratePattern = null,
[CanBeNull]string processArgs = null)
[MaybeNull]string enumeratePattern = null,
[MaybeNull]string processArgs = null)
{
Contract.Requires(!string.IsNullOrEmpty(path));

Просмотреть файл

@ -6,7 +6,6 @@ using System.Diagnostics.ContractsLight;
using System.IO;
using BuildXL.Pips.Operations;
using BuildXL.Utilities.Core;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
namespace BuildXL.Processes
{
@ -33,7 +32,7 @@ namespace BuildXL.Processes
/// <summary>
/// Protected constructor
/// </summary>
protected FileAccessAllowlistEntry([NotNull]SerializableRegex pathRegex, bool allowsCaching, string name)
protected FileAccessAllowlistEntry([NotNull] SerializableRegex pathRegex, bool allowsCaching, string name)
{
Contract.Requires(pathRegex != null);
@ -46,7 +45,7 @@ namespace BuildXL.Processes
/// Determine whether a ReportedFileAccess matches the allowlist rules.
/// </summary>
[SuppressMessage("Microsoft.Design", "CA1011", Justification = "Only a Process can have unknown file accesses.")]
public abstract FileAccessAllowlist.MatchType Matches(ReportedFileAccess reportedFileAccess, [NotNull]Process pip, [NotNull]PathTable pathTable);
public abstract FileAccessAllowlist.MatchType Matches(ReportedFileAccess reportedFileAccess, [NotNull] Process pip, [NotNull] PathTable pathTable);
#region Serialization

Просмотреть файл

@ -13,7 +13,6 @@ using BuildXL.Native.IO;
using BuildXL.Native.Processes;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
namespace BuildXL.Processes
{
@ -591,7 +590,7 @@ namespace BuildXL.Processes
/// Internal since this is set as a side effect of initializing a FileAccessManifest
/// in <see cref="SandboxedProcessInfo"/>.
/// </remarks>
[CanBeNull]
[MaybeNull]
public SubstituteProcessExecutionInfo SubstituteProcessExecutionInfo { get; set; }
/// <nodoc/>

Просмотреть файл

@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.Native.IO;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
namespace BuildXL.Processes
{
@ -23,7 +23,7 @@ namespace BuildXL.Processes
private readonly ConcurrentBigMap<AbsolutePath, AbsolutePath> m_resolvedPathCache = new ConcurrentBigMap<AbsolutePath, AbsolutePath>();
/// <nodoc/>
public ReparsePointResolver(PipExecutionContext context, [CanBeNull] DirectoryTranslator directoryTranslator)
public ReparsePointResolver(PipExecutionContext context, [MaybeNull] DirectoryTranslator directoryTranslator)
{
Contract.RequiresNotNull(context);
m_context = context;

Просмотреть файл

@ -14,7 +14,6 @@ using BuildXL.Processes.Sideband;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using static BuildXL.Processes.IDetoursEventListener;
using static BuildXL.Utilities.Core.FormattableStringEx;
@ -43,10 +42,10 @@ namespace BuildXL.Processes
private readonly Dictionary<string, string> m_pathCache = new Dictionary<string, string>(OperatingSystemHelper.PathComparer);
private readonly Dictionary<AbsolutePath, bool> m_overrideAllowedWritePaths = new Dictionary<AbsolutePath, bool>();
[CanBeNull]
[MaybeNull]
private readonly IDetoursEventListener m_detoursEventListener;
[CanBeNull]
[MaybeNull]
private readonly SidebandWriter m_sharedOpaqueOutputLogger;
public readonly List<ReportedProcess> Processes = new List<ReportedProcess>();
@ -124,10 +123,10 @@ namespace BuildXL.Processes
long pipSemiStableHash,
string pipDescription,
LoggingContext loggingContext,
[CanBeNull] IDetoursEventListener detoursEventListener,
[CanBeNull] SidebandWriter sharedOpaqueOutputLogger,
[CanBeNull] ISandboxFileSystemView fileSystemView,
[CanBeNull] SandboxedProcessTraceBuilder traceBuilder = null)
[MaybeNull] IDetoursEventListener detoursEventListener,
[MaybeNull] SidebandWriter sharedOpaqueOutputLogger,
[MaybeNull] ISandboxFileSystemView fileSystemView,
[MaybeNull] SandboxedProcessTraceBuilder traceBuilder = null)
{
Contract.RequiresNotNull(manifest);
Contract.RequiresNotNull(pathTable);

Просмотреть файл

@ -18,10 +18,10 @@ using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.ParallelAlgorithms;
using BuildXL.Utilities.Core.Tasks;
using JetBrains.Annotations;
using static BuildXL.Interop.Unix.Sandbox;
using static BuildXL.Processes.SandboxedProcessFactory;
using static BuildXL.Utilities.Core.FormattableStringEx;
using System.Diagnostics.CodeAnalysis;
#nullable enable
@ -633,7 +633,7 @@ namespace BuildXL.Processes
}
/// <nodoc />
[NotNull]
[return: NotNull]
internal override CpuTimes GetCpuTimes()
{
return m_processResourceUsage is null

Просмотреть файл

@ -8,10 +8,9 @@ using System.Globalization;
using System.IO;
using System.Linq;
using BuildXL.Pips.Operations;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Processes.Sideband
{
@ -74,7 +73,7 @@ namespace BuildXL.Processes.Sideband
///
/// When <code>null</code>, all paths are recorded.
/// </summary>
[CanBeNull]
[MaybeNull]
public IReadOnlyList<string> RootDirectories { get; }
/// <summary>
@ -105,7 +104,7 @@ namespace BuildXL.Processes.Sideband
/// <param name="metadata">Metadata</param>
/// <param name="sidebandLogFile">File to which to save the log.</param>
/// <param name="rootDirectories">Only paths under one of these root directories will be recorded.</param>
public SidebandWriter(SidebandMetadata metadata, string sidebandLogFile, [CanBeNull] IReadOnlyList<string> rootDirectories)
public SidebandWriter(SidebandMetadata metadata, string sidebandLogFile, [MaybeNull] IReadOnlyList<string> rootDirectories)
{
Metadata = metadata;
SidebandLogFile = sidebandLogFile;

Просмотреть файл

@ -2,7 +2,6 @@
// Licensed under the MIT License.
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.ContractsLight;
@ -10,11 +9,10 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BuildXL.Interop;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration.Mutable;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
#if FEATURE_SAFE_PROCESS_HANDLE
using Microsoft.Win32.SafeHandles;
#else
@ -484,7 +482,7 @@ namespace BuildXL.Processes
}
/// <nodoc/>
[NotNull]
[return: NotNull]
internal virtual CpuTimes GetCpuTimes()
{
// 'Dispatch.GetProcessResourceUsage()' doesn't work because the process has already exited

Просмотреть файл

@ -21,7 +21,6 @@ using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Tracing;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
#pragma warning disable 1591 // disabling warning about missing API documentation; TODO: Remove this line and write documentation!
@ -302,12 +301,12 @@ namespace BuildXL.Scheduler
/// <inheritdoc />
public AnalyzePipViolationsResult AnalyzePipViolations(
Process pip,
[CanBeNull] IReadOnlyCollection<ReportedFileAccess> violations,
[CanBeNull] IReadOnlyCollection<ReportedFileAccess> allowlistedAccesses,
[CanBeNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[CanBeNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[CanBeNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
[AllowNull] IReadOnlyCollection<ReportedFileAccess> violations,
[AllowNull] IReadOnlyCollection<ReportedFileAccess> allowlistedAccesses,
[AllowNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[AllowNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[AllowNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
ReadOnlyArray<(FileArtifact fileArtifact, FileMaterializationInfo fileInfo, PipOutputOrigin pipOutputOrigin)> outputsContent,
out IReadOnlyDictionary<FileArtifact, (FileMaterializationInfo, ReportedViolation)> allowedSameContentViolations)
{
@ -530,9 +529,9 @@ namespace BuildXL.Scheduler
public bool AnalyzeDynamicViolations(
Process pip,
IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[CanBeNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[CanBeNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[AllowNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[AllowNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
ReadOnlyArray<(FileArtifact fileArtifact, FileMaterializationInfo fileInfo, PipOutputOrigin pipOutputOrigin)> outputsContent)
{
Contract.Requires(pip != null);
@ -564,12 +563,12 @@ namespace BuildXL.Scheduler
private List<ReportedViolation> ReportDynamicViolations(
Process pip,
[CanBeNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectories,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[CanBeNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[CanBeNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
[AllowNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectories,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[AllowNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[AllowNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
IReadOnlyDictionary<FileArtifact, FileMaterializationInfo> outputArtifactInfo,
[CanBeNull] Dictionary<FileArtifact, (FileMaterializationInfo fileMaterializationInfo, ReportedViolation reportedViolation)> allowedDoubleWriteViolations)
[AllowNull] Dictionary<FileArtifact, (FileMaterializationInfo fileMaterializationInfo, ReportedViolation reportedViolation)> allowedDoubleWriteViolations)
{
List<ReportedViolation> dynamicViolations = new List<ReportedViolation>();
var absentPathProbesUnderOutputDirectories = dynamicObservations?
@ -762,7 +761,7 @@ namespace BuildXL.Scheduler
IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
List<ReportedViolation> reportedViolations,
IReadOnlyDictionary<FileArtifact, FileMaterializationInfo> outputArtifactsInfo,
[CanBeNull] Dictionary<FileArtifact, (FileMaterializationInfo fileMaterializationInfo, ReportedViolation reportedViolation)> allowedDoubleWriteViolations)
[AllowNull] Dictionary<FileArtifact, (FileMaterializationInfo fileMaterializationInfo, ReportedViolation reportedViolation)> allowedDoubleWriteViolations)
{
foreach (var kvp in sharedOpaqueDirectoryWriteAccesses)
{
@ -907,7 +906,7 @@ namespace BuildXL.Scheduler
List<ReportedViolation> reportedViolations,
IReadOnlyDictionary<FileArtifact, FileMaterializationInfo> outputArtifactsInfo,
FileArtifactWithAttributes access,
[CanBeNull] Dictionary<FileArtifact, (FileMaterializationInfo fileMaterializationInfo, ReportedViolation reportedViolation)> allowedDoubleWriteViolations)
[AllowNull] Dictionary<FileArtifact, (FileMaterializationInfo fileMaterializationInfo, ReportedViolation reportedViolation)> allowedDoubleWriteViolations)
{
// The access in an opaque has always rewrite count 1
Contract.Assert(access.RewriteCount == 1);
@ -1333,7 +1332,7 @@ namespace BuildXL.Scheduler
Process pip,
IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
List<ReportedViolation> reportedViolations,
[CanBeNull] Dictionary<FileArtifact, (FileMaterializationInfo fileMaterializationInfo, ReportedViolation reportedViolation)> allowedDoubleWriteViolations)
[AllowNull] Dictionary<FileArtifact, (FileMaterializationInfo fileMaterializationInfo, ReportedViolation reportedViolation)> allowedDoubleWriteViolations)
{
foreach (var undeclaredRead in allowedUndeclaredReads)
{

Просмотреть файл

@ -17,13 +17,12 @@ using BuildXL.Scheduler.FileSystem;
using BuildXL.Scheduler.Tracing;
using BuildXL.Storage;
using BuildXL.Storage.Fingerprints;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Tracing;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using System.Diagnostics.CodeAnalysis;
#pragma warning disable 1591 // disabling warning about missing API documentation; TODO: Remove this line and write documentation!
@ -105,7 +104,7 @@ namespace BuildXL.Scheduler.Fingerprints
TTarget target,
CacheablePipInfo pip,
ReadOnlyArray<ObservedFileAccess> accesses,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedDynamicDirectoryWriteAccesses,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedDynamicDirectoryWriteAccesses,
bool trackFileChanges = true)
where TTarget : struct, IObservedInputProcessingTarget<ObservedFileAccess>
{
@ -136,7 +135,7 @@ namespace BuildXL.Scheduler.Fingerprints
TTarget target,
CacheablePipInfo pip,
ReadOnlyArray<TObservation> observations,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> unPopulatedSharedOpaqueOutputs,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> unPopulatedSharedOpaqueOutputs,
SortedReadOnlyArray<StringId, CaseInsensitiveStringIdComparer> observedAccessedFileNames,
bool isCacheLookup,
bool trackFileChanges = true)
@ -1456,7 +1455,7 @@ namespace BuildXL.Scheduler.Fingerprints
/// Projects the set of paths (from <see cref="ObservedInputs"/>) into an <see cref="ObservedPathSet"/>.
/// Note that this field may only be performed for a successful result.
/// </summary>
public ObservedPathSet GetPathSet([CanBeNull]UnsafeOptions unsafeOptions)
public ObservedPathSet GetPathSet([AllowNull]UnsafeOptions unsafeOptions)
{
Contract.Requires(Status == ObservedInputProcessingStatus.Success);

Просмотреть файл

@ -8,7 +8,7 @@ using BuildXL.Cache.ContentStore.Hashing;
using BuildXL.Storage;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Scheduler.Fingerprints
{
@ -92,7 +92,7 @@ namespace BuildXL.Scheduler.Fingerprints
public ObservedPathSet(
SortedReadOnlyArray<ObservedPathEntry, ObservedPathEntryExpandedPathComparer> paths,
SortedReadOnlyArray<StringId, CaseInsensitiveStringIdComparer> observedAccessedFileNames,
[CanBeNull]UnsafeOptions unsafeOptions)
[AllowNull]UnsafeOptions unsafeOptions)
{
Contract.Requires(paths.IsValid);
Paths = paths;

Просмотреть файл

@ -5,7 +5,7 @@ using System.Diagnostics.ContractsLight;
using BuildXL.Storage.Fingerprints;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Scheduler.Fingerprints
{
@ -119,7 +119,7 @@ namespace BuildXL.Scheduler.Fingerprints
///
/// If an exception is caught, <code>null</code> is returned.
/// </summary>
public static UnsafeOptions TryDeserialize([CanBeNull]BuildXLReader reader)
public static UnsafeOptions TryDeserialize([AllowNull]BuildXLReader reader)
{
if (reader == null)
{

Просмотреть файл

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Linq;
using System.Threading;
@ -15,7 +16,6 @@ using BuildXL.Pips.Graph;
using BuildXL.Pips.Operations;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
namespace BuildXL.Scheduler.Graph
@ -178,7 +178,7 @@ namespace BuildXL.Scheduler.Graph
}
/// <inheritdoc />
public void SetSpecsToIgnore([CanBeNull] IEnumerable<AbsolutePath> specsToIgnore)
public void SetSpecsToIgnore([AllowNull] IEnumerable<AbsolutePath> specsToIgnore)
{
m_specsToIgnore = specsToIgnore != null
? new HashSet<AbsolutePath>(specsToIgnore)

Просмотреть файл

@ -12,11 +12,10 @@ using BuildXL.Pips;
using BuildXL.Pips.Builders;
using BuildXL.Pips.Graph;
using BuildXL.Pips.Operations;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Scheduler.Graph
{

Просмотреть файл

@ -7,7 +7,7 @@ using BuildXL.Pips;
using BuildXL.Pips.Operations;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.Scheduler.Graph
{

Просмотреть файл

@ -2,13 +2,13 @@
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using BuildXL.Pips.Operations;
using BuildXL.Processes;
using BuildXL.Storage;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Tracing;
using JetBrains.Annotations;
namespace BuildXL.Scheduler
{
@ -33,12 +33,12 @@ namespace BuildXL.Scheduler
/// </remarks>
AnalyzePipViolationsResult AnalyzePipViolations(
Process pip,
[CanBeNull] IReadOnlyCollection<ReportedFileAccess> violations,
[CanBeNull] IReadOnlyCollection<ReportedFileAccess> allowlistedAccesses,
[CanBeNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[CanBeNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[CanBeNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
[AllowNull] IReadOnlyCollection<ReportedFileAccess> violations,
[AllowNull] IReadOnlyCollection<ReportedFileAccess> allowlistedAccesses,
[AllowNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[AllowNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[AllowNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
ReadOnlyArray<(FileArtifact fileArtifact, FileMaterializationInfo fileInfo, PipOutputOrigin pipOutputOrigin)> outputsContent,
out IReadOnlyDictionary<FileArtifact, (FileMaterializationInfo, ReportedViolation)> allowedSameContentViolations);
@ -47,10 +47,10 @@ namespace BuildXL.Scheduler
/// </summary>
bool AnalyzeDynamicViolations(
Process pip,
[CanBeNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[CanBeNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[CanBeNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
[AllowNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[AllowNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[AllowNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
ReadOnlyArray<(FileArtifact fileArtifact, FileMaterializationInfo fileInfo, PipOutputOrigin pipOutputOrigin)> outputsContent);
/// <summary>

Просмотреть файл

@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using BuildXL.Engine.Cache;
using BuildXL.Engine.Cache.Artifacts;
@ -20,7 +21,6 @@ using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Tracing;
using BuildXL.Utilities.VmCommandProxy;
using JetBrains.Annotations;
namespace BuildXL.Scheduler
{
@ -238,7 +238,7 @@ namespace BuildXL.Scheduler
/// <summary>
/// Resolves file accesses containing symlinked paths
/// </summary>
[CanBeNull] ReparsePointResolver ReparsePointAccessResolver { get; }
[AllowNull] ReparsePointResolver ReparsePointAccessResolver { get; }
/// <summary>
/// Indicates if inputs are lazily materialized via MaterializeInput step.

Просмотреть файл

@ -6,7 +6,6 @@ using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using BuildXL.Scheduler.WorkDispatcher;
using BuildXL.Utilities;
using NotNullAttribute=JetBrains.Annotations.NotNullAttribute;
namespace BuildXL.Scheduler
{

Просмотреть файл

@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using BuildXL.Pips.Filter;
using BuildXL.Processes;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
namespace BuildXL.Scheduler
{

Просмотреть файл

@ -44,7 +44,6 @@ using BuildXL.Utilities.ParallelAlgorithms;
using BuildXL.Utilities.Core.Tasks;
using BuildXL.Utilities.Core.Tracing;
using BuildXL.Utilities.Tracing;
using JetBrains.Annotations;
using static BuildXL.Processes.SandboxedProcessFactory;
using static BuildXL.Utilities.Core.FormattableStringEx;
@ -4061,7 +4060,7 @@ namespace BuildXL.Scheduler
CacheablePip pip,
FileAccessReportingContext fileAccessReportingContext,
SortedReadOnlyArray<ObservedFileAccess, ObservedFileAccessExpandedPathComparer> observedFileAccesses,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedDynamicDirectoryWriteAccesses,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedDynamicDirectoryWriteAccesses,
bool trackFileChanges = true)
{
Contract.Requires(environment != null);

Просмотреть файл

@ -63,7 +63,6 @@ using BuildXL.Utilities.Core.Tasks;
using BuildXL.Utilities.Tracing;
using BuildXL.Utilities.VmCommandProxy;
using BuildXL.ViewModel;
using JetBrains.Annotations;
using static BuildXL.Processes.SandboxedProcessFactory;
using static BuildXL.Utilities.Core.FormattableStringEx;
using Logger = BuildXL.Scheduler.Tracing.Logger;
@ -239,7 +238,7 @@ namespace BuildXL.Scheduler
/// <summary>
/// A kernel extension connection object for macOS sandboxing
/// </summary>
[CanBeNull]
[AllowNull]
protected ISandboxConnection SandboxConnection;
/// <summary>
@ -517,16 +516,16 @@ namespace BuildXL.Scheduler
/// <summary>
/// External API server.
/// </summary>
[CanBeNull]
[AllowNull]
private ApiServer m_apiServer;
[CanBeNull]
[AllowNull]
private PluginManager m_pluginManager;
/// <summary>
/// Tracker for service pips.
/// </summary>
[CanBeNull]
[AllowNull]
private readonly ServicePipTracker m_servicePipTracker;
/// <summary>
@ -1874,7 +1873,7 @@ namespace BuildXL.Scheduler
/// This is called after all pips have been added and the pip queue has emptied.
/// Warning: Some variables may be null if scheduler's Init() is not called.
/// </remarks>
public SchedulerPerformanceInfo LogStats(LoggingContext loggingContext, [CanBeNull] BuildSummary buildSummary)
public SchedulerPerformanceInfo LogStats(LoggingContext loggingContext, [AllowNull] BuildSummary buildSummary)
{
Dictionary<string, long> statistics = new Dictionary<string, long>();
LocalWorkerWithRemoting localWorkerWithRemoting = LocalWorker as LocalWorkerWithRemoting;
@ -5429,7 +5428,7 @@ namespace BuildXL.Scheduler
#region Critical Path Logging
private void LogCriticalPath(Dictionary<string, long> statistics, [CanBeNull] BuildSummary buildSummary)
private void LogCriticalPath(Dictionary<string, long> statistics, [AllowNull] BuildSummary buildSummary)
{
int currentCriticalPathTailPipIdValue;
PipRuntimeInfo criticalPathRuntimeInfo;

Просмотреть файл

@ -22,7 +22,6 @@ using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Configuration.Mutable;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using Test.BuildXL.EngineTestUtilities;
namespace Test.BuildXL.TestUtilities
@ -375,7 +374,7 @@ namespace Test.BuildXL.TestUtilities
}
/// <inheritdoc />
public void SetSpecsToIgnore([CanBeNull] IEnumerable<AbsolutePath> specsToIgnore)
public void SetSpecsToIgnore([AllowNull] IEnumerable<AbsolutePath> specsToIgnore)
{
throw new NotImplementedException();
}

Просмотреть файл

@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using BuildXL.Pips.Operations;
using BuildXL.Processes;
using BuildXL.Scheduler;
@ -9,8 +10,6 @@ using BuildXL.Storage;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Tracing;
using JetBrains.Annotations;
using static BuildXL.Scheduler.FileMonitoringViolationAnalyzer;
namespace Test.BuildXL.Scheduler.Utils
{
@ -32,21 +31,21 @@ namespace Test.BuildXL.Scheduler.Utils
/// <inheritdoc />
public bool AnalyzeDynamicViolations(
Process pip,
[CanBeNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[CanBeNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[CanBeNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
[AllowNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[AllowNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[AllowNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
ReadOnlyArray<(FileArtifact fileArtifact, FileMaterializationInfo fileInfo, PipOutputOrigin pipOutputOrigin)> outputContent) => true;
/// <inheritdoc />
public AnalyzePipViolationsResult AnalyzePipViolations(
Process pip,
[CanBeNull] IReadOnlyCollection<ReportedFileAccess> violations,
[CanBeNull] IReadOnlyCollection<ReportedFileAccess> allowlistedAccesses,
[CanBeNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[CanBeNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[CanBeNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[CanBeNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
[AllowNull] IReadOnlyCollection<ReportedFileAccess> violations,
[AllowNull] IReadOnlyCollection<ReportedFileAccess> allowlistedAccesses,
[AllowNull] IReadOnlyCollection<(DirectoryArtifact, ReadOnlyArray<FileArtifactWithAttributes>)> exclusiveOpaqueDirectoryContent,
[AllowNull] IReadOnlyDictionary<AbsolutePath, IReadOnlyCollection<FileArtifactWithAttributes>> sharedOpaqueDirectoryWriteAccesses,
[AllowNull] IReadOnlySet<AbsolutePath> allowedUndeclaredReads,
[AllowNull] IReadOnlyCollection<(AbsolutePath Path, DynamicObservationKind Kind)> dynamicObservations,
ReadOnlyArray<(FileArtifact fileArtifact, FileMaterializationInfo fileInfo, PipOutputOrigin pipOutputOrigin)> outputsContent,
out IReadOnlyDictionary<FileArtifact, (FileMaterializationInfo, ReportedViolation)> allowedSameContentViolations)
{

Просмотреть файл

@ -13,6 +13,7 @@ namespace CMake {
assemblyName: "BuildXL.FrontEnd.CMake",
generateLogs: true,
sources: globR(d`.`, "*.cs"),
addNotNullAttributeFile: true,
references: [
...BuildXLSdk.tplPackages,
importFrom("BuildXL.Engine").Cache.dll,

Просмотреть файл

@ -29,7 +29,6 @@ using Newtonsoft.Json;
using TypeScript.Net.DScript;
using TypeScript.Net.Types;
using static BuildXL.Utilities.Core.FormattableStringEx;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
namespace BuildXL.FrontEnd.CMake
{

Просмотреть файл

@ -11,6 +11,7 @@ namespace Core {
assemblyName: "BuildXL.FrontEnd.Core",
generateLogs: true,
sources: globR(d`.`, "*.cs"),
addNotNullAttributeFile: true,
references: [
...addIf(BuildXLSdk.isFullFramework,
NetFx.System.Net.Http.dll,

Просмотреть файл

@ -19,14 +19,12 @@ using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Core.Tasks;
using JetBrains.Annotations;
using TypeScript.Net.DScript;
using TypeScript.Net.Types;
using TypeScript.Net.Utilities;
using static BuildXL.Utilities.Core.FormattableStringEx;
using CancellationToken = System.Threading.CancellationToken;
using Diagnostic = TypeScript.Net.Diagnostics.Diagnostic;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
namespace BuildXL.FrontEnd.Core
{
@ -448,13 +446,13 @@ namespace BuildXL.FrontEnd.Core
/// <summary>
/// The workspace definition that was filtered based on the spec-2-spec map from the previous invocation.
/// </summary>
[CanBeNull]
[AllowNull]
public WorkspaceDefinition FilteredDefinition { get; }
/// <summary>
/// Failure that occur during workspace filtering.
/// </summary>
[CanBeNull]
[AllowNull]
public Failure Failure { get; }
/// <summary>

Просмотреть файл

@ -527,7 +527,7 @@ namespace BuildXL.FrontEnd.Core
}
}
internal ConversionResult DoPhaseConvert([JetBrains.Annotations.CanBeNull] EvaluationFilter evaluationFilter)
internal ConversionResult DoPhaseConvert([AllowNull] EvaluationFilter evaluationFilter)
{
Contract.Requires(evaluationFilter != null || Workspace != null, "Evaluation filter may be null if workspace is enabled");

Просмотреть файл

@ -2,13 +2,13 @@
// Licensed under the MIT License.
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using BuildXL.FrontEnd.Core.Tracing;
using BuildXL.FrontEnd.Sdk;
using BuildXL.Native.IO;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
namespace BuildXL.FrontEnd.Core.Incrementality
@ -46,7 +46,7 @@ namespace BuildXL.FrontEnd.Core.Incrementality
m_cacheFileName = Path.Combine(outputFolder, CacheFileName);
}
[CanBeNull]
[return: MaybeNull]
public WorkspaceBindingSnapshot TryLoadFrontEndSnapshot(int expectedSpecCount)
{
try

Просмотреть файл

@ -2,11 +2,11 @@
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using BuildXL.FrontEnd.Sdk;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using TypeScript.Net.Incrementality;
namespace BuildXL.FrontEnd.Core.Incrementality
@ -44,7 +44,7 @@ namespace BuildXL.FrontEnd.Core.Incrementality
/// <summary>
/// Deserializes the state of all specs from the given reader.
/// </summary>
[NotNull]
[return: NotNull]
public static SpecBindingState[] DeserializeSpecStates([NotNull] BuildXLReader reader, PathTable pathTable, int? length = null)
{
if (length == null)
@ -114,7 +114,7 @@ namespace BuildXL.FrontEnd.Core.Incrementality
/// <summary>
/// Deserializes the spec fingerprint from the given reader.
/// </summary>
[NotNull]
[return: NotNull]
public static SpecBindingSymbols DeserializeBindingFingerprint([NotNull] BuildXLReader reader)
{
var declaredSymbols = ReadBindingSymbols(reader);
@ -156,7 +156,7 @@ namespace BuildXL.FrontEnd.Core.Incrementality
/// <summary>
/// Deserializes the <see cref="RoaringBitSet"/> from the given reader.
/// </summary>
[NotNull]
[return: NotNull]
public static RoaringBitSet DeserializeBitVector([NotNull]BuildXLReader reader)
{
var size = reader.ReadInt32Compact();

Просмотреть файл

@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Sdk;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using TypeScript.Net.Incrementality;
namespace BuildXL.FrontEnd.Core.Incrementality
@ -47,7 +47,7 @@ namespace BuildXL.FrontEnd.Core.Incrementality
public ISpecBindingSymbols BindingSymbols { get; }
/// <inheritdoc />
[JetBrains.Annotations.Pure]
[System.Diagnostics.Contracts.Pure]
public ISpecBindingState WithBindingFingerprint(string referencedSymbolsFingerprint, string declaredSymbolsFingerprint)
{
return new SpecBindingState(m_fullPath, referencedSymbolsFingerprint, declaredSymbolsFingerprint, FileDependencies, FileDependents);

Просмотреть файл

@ -9,10 +9,8 @@ using System.Linq;
using System.Threading.Tasks;
using BuildXL.FrontEnd.Sdk;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using TypeScript.Net.Incrementality;
using TypeScript.Net.Types;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
#pragma warning disable SA1649 // File name must match first type name
@ -110,7 +108,7 @@ namespace BuildXL.FrontEnd.Core.Incrementality
}
/// <nodoc />
[CanBeNull]
[return: MaybeNull]
public ISpecBindingState TryGetSpecState(AbsolutePath fullPath)
{
m_stateByPath.TryGetValue(fullPath, out var result);

Просмотреть файл

@ -2,13 +2,13 @@
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using BuildXL.Cache.ContentStore.Interfaces.Extensions;
using BuildXL.FrontEnd.Workspaces.Core;
using BuildXL.Pips.Filter;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using TypeScript.Net.Types;
namespace BuildXL.FrontEnd.Core.Incrementality

Просмотреть файл

@ -9,6 +9,7 @@ namespace Download {
assemblyName: "BuildXL.FrontEnd.Download",
generateLogs: true,
sources: globR(d`.`, "*.cs"),
addNotNullAttributeFile: true,
references: [
...addIf(BuildXLSdk.isFullFramework,
NetFx.System.Net.Http.dll,

Просмотреть файл

@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Linq;
using BuildXL.FrontEnd.Core;
@ -9,7 +10,6 @@ using BuildXL.FrontEnd.Download.Tracing;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Sdk;
using BuildXL.FrontEnd.Workspaces.Core;
using JetBrains.Annotations;
namespace BuildXL.FrontEnd.Download
{

Просмотреть файл

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Linq;
using System.Threading;
@ -20,7 +21,6 @@ using BuildXL.FrontEnd.Workspaces.Core;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
namespace BuildXL.FrontEnd.Download

Просмотреть файл

@ -16,10 +16,10 @@ using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Configuration.Mutable;
using JetBrains.Annotations;
using TypeScript.Net.DScript;
using TypeScript.Net.Types;
using ValueTaskFactory = BuildXL.Utilities.Core.Tasks.ValueTaskFactory;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.FrontEnd.Download
{

Просмотреть файл

@ -13,6 +13,7 @@ namespace JavaScript {
assemblyName: "BuildXL.FrontEnd.JavaScript",
generateLogs: true,
sources: globR(d`.`, "*.cs"),
addNotNullAttributeFile: true,
references: [
...BuildXLSdk.tplPackages,
importFrom("BuildXL.Engine").Cache.dll,

Просмотреть файл

@ -23,8 +23,6 @@ using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using TypeScript.Net.DScript;
@ -32,6 +30,7 @@ using TypeScript.Net.Types;
using ConfigurationConverter = BuildXL.FrontEnd.Script.Util.ConfigurationConverter;
using SourceFile = TypeScript.Net.Types.SourceFile;
using SyntaxKind = TypeScript.Net.Types.SyntaxKind;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.FrontEnd.JavaScript
{
@ -117,20 +116,20 @@ namespace BuildXL.FrontEnd.JavaScript
/// <summary>
/// Mapping between the ILazyEval instance specified in the resolver configuration with its corresponding statement in the lazy expression source file
/// </summary>
[CanBeNull]
[AllowNull]
public IReadOnlyDictionary<IVariableStatement, ILazyEval> LazyEvaluationStatementMapping { get; private set; }
/// <summary>
/// Mapping between JavaScript projects and the additional lazy evaluation artifacts
/// </summary>
[CanBeNull]
[AllowNull]
public IReadOnlyDictionary<JavaScriptProject, IReadOnlySet<ILazyEval>> AdditionalLazyArtifactsPerProject { get; private set; }
/// <summary>
/// If a custom scheduling callback is specified, this is the variable declaration (with function type) that has to be evaluated
/// to get the result of the custom scheduling
/// </summary>
[CanBeNull]
[AllowNull]
public VariableDeclaration CustomSchedulingCallback { get; private set; }
/// <inheritdoc/>
@ -186,7 +185,7 @@ namespace BuildXL.FrontEnd.JavaScript
protected bool TryResolveExports(
IReadOnlyCollection<JavaScriptProject> projects,
IReadOnlyCollection<DeserializedJavaScriptProject> deserializedProjects,
[CanBeNull] JavaScriptProjectSelector projectSelector,
[AllowNull] JavaScriptProjectSelector projectSelector,
out IReadOnlyCollection<ResolvedJavaScriptExport> resolvedExports)
{
// Build dictionaries to speed up subsequent look-ups

Просмотреть файл

@ -6,7 +6,7 @@ using System.Diagnostics;
using System.Diagnostics.ContractsLight;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
{
@ -25,7 +25,7 @@ namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
string name,
AbsolutePath projectFolder,
IReadOnlyCollection<string> dependencies,
[CanBeNull] IReadOnlyDictionary<string, string> availableScriptCommands,
[AllowNull] IReadOnlyDictionary<string, string> availableScriptCommands,
AbsolutePath tempFolder,
IReadOnlyCollection<PathWithTargets> outputDirectories,
IReadOnlyCollection<PathWithTargets> sourceFiles) : base(name, projectFolder, dependencies, tempFolder)

Просмотреть файл

@ -3,10 +3,9 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
{
@ -20,7 +19,7 @@ namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
public GenericJavaScriptProject(
string name,
AbsolutePath projectFolder,
[CanBeNull] IReadOnlyCollection<TDependency> dependencies,
[AllowNull] IReadOnlyCollection<TDependency> dependencies,
AbsolutePath tempFolder)
{
Contract.RequiresNotNullOrEmpty(name);

Просмотреть файл

@ -8,7 +8,7 @@ using System.Linq;
using BuildXL.FrontEnd.Sdk.ProjectGraph;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
{
@ -26,7 +26,7 @@ namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
string name,
AbsolutePath projectFolder,
string scriptCommandName,
[CanBeNull] string scriptCommand,
[AllowNull] string scriptCommand,
AbsolutePath tempFolder,
IReadOnlyCollection<AbsolutePath> outputDirectories,
IEnumerable<FileArtifact> inputFiles,

Просмотреть файл

@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Diagnostics.ContractsLight;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
{
@ -15,7 +15,7 @@ namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
public sealed class PathWithTargets
{
/// <nodoc/>
public PathWithTargets(AbsolutePath path, [CanBeNull] IReadOnlyList<string> targetScripts)
public PathWithTargets(AbsolutePath path, [AllowNull] IReadOnlyList<string> targetScripts)
{
Path = path;
TargetScripts = targetScripts?.ToReadOnlySet();
@ -25,7 +25,7 @@ namespace BuildXL.FrontEnd.JavaScript.ProjectGraph
public AbsolutePath Path { get; }
/// <nodoc/>
[CanBeNull]
[AllowNull]
public IReadOnlySet<string> TargetScripts { get; }
/// <summary>

Просмотреть файл

@ -12,6 +12,7 @@ namespace Nuget {
assemblyName: "BuildXL.FrontEnd.Nuget",
generateLogs: true,
sources: globR(d`.`, "*.cs"),
addNotNullAttributeFile: true,
references: [
...addIf(BuildXLSdk.isFullFramework,
NetFx.Netstandard.dll,

Просмотреть файл

@ -12,7 +12,6 @@ using BuildXL.FrontEnd.Sdk;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using JetBrains.Annotations;
using NuGet.Versioning;
using Moniker = BuildXL.Utilities.Core.PathAtom;
using static BuildXL.Utilities.Core.FormattableStringEx;
@ -163,7 +162,7 @@ namespace BuildXL.FrontEnd.Nuget
public static NugetAnalyzedPackage TryAnalyzeNugetPackage(
FrontEndContext context,
NugetFrameworkMonikers nugetFrameworkMonikers,
[CanBeNull] XDocument nuSpec,
[AllowNull] XDocument nuSpec,
PackageOnDisk packageOnDisk,
Dictionary<string, INugetPackage> packagesOnConfig,
bool doNotEnforceDependencyVersions,

Просмотреть файл

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Linq;
using BuildXL.FrontEnd.Script.Evaluator;
@ -11,7 +12,6 @@ using BuildXL.FrontEnd.Script.Statements;
using BuildXL.FrontEnd.Script.Types;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;

Просмотреть файл

@ -2,13 +2,13 @@
// Licensed under the MIT License.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Core;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Literals;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;

Просмотреть файл

@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Declarations;
using BuildXL.FrontEnd.Script.Evaluator;
@ -8,7 +9,6 @@ using BuildXL.FrontEnd.Script.Statements;
using BuildXL.FrontEnd.Script.Types;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
@ -48,7 +48,7 @@ namespace BuildXL.FrontEnd.Script.Expressions
/// <summary>
/// Function body. Null for ambients.
/// </summary>
[CanBeNull]
[AllowNull]
public Statement Body { get; }
/// <summary>

Просмотреть файл

@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Util;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Expressions
@ -23,7 +23,7 @@ namespace BuildXL.FrontEnd.Script.Expressions
/// <remarks>
/// If null, then this is a shorthand property assignment.
/// </remarks>
[CanBeNull]
[AllowNull]
public Expression Expression { get; private set; }
/// <nodoc />

Просмотреть файл

@ -16,7 +16,6 @@ using BuildXL.FrontEnd.Sdk;
using BuildXL.FrontEnd.Sdk.Mutable;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
@ -25,22 +24,22 @@ namespace BuildXL.FrontEnd.Script
public partial class Node
{
/// <nodoc />
[CanBeNull]
[return: MaybeNull]
public static Expression ReadExpression(DeserializationContext context) => Read<Expression>(context);
/// <nodoc />
[CanBeNull]
[return: MaybeNull]
public static Types.Type ReadType(DeserializationContext context) => Read<Types.Type>(context);
/// <nodoc />
[CanBeNull]
[return: MaybeNull]
public static TNode Read<TNode>(DeserializationContext context) where TNode : Node
{
return (TNode)Read(context);
}
/// <nodoc />
[CanBeNull]
[return: MaybeNull]
[SuppressMessage("Microsoft.Maintainability", "CA1505", Justification = "Method is still maintainable because it is comprised of one switch statement with a single line of code for each case.")]
public static Node Read(DeserializationContext context)
{
@ -443,7 +442,7 @@ namespace BuildXL.FrontEnd.Script
/// <summary>
/// Helper method that serializes a given node or writes 'null node' if the <paramref name="node"/> is null.
/// </summary>
public static void Serialize([CanBeNull]Node node, BuildXLWriter writer)
public static void Serialize([AllowNull]Node node, BuildXLWriter writer)
{
(node ?? NullNode.Instance).Serialize(writer);
}

Просмотреть файл

@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;

Просмотреть файл

@ -1,13 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
@ -24,15 +24,15 @@ namespace BuildXL.FrontEnd.Script.Statements
/// <remarks>
/// An initializer can either be an assignment statement or a variable statement (with initializer).
/// </remarks>
[CanBeNull]
[AllowNull]
public Statement Initializer { get; }
/// <nodoc />
[CanBeNull]
[AllowNull]
public Expression Condition { get; }
/// <nodoc />
[CanBeNull]
[AllowNull]
public AssignmentOrIncrementDecrementExpression Incrementor { get; }
/// <nodoc />
@ -40,9 +40,9 @@ namespace BuildXL.FrontEnd.Script.Statements
/// <nodoc />
public ForStatement(
[CanBeNull]Statement initializer,
[CanBeNull]Expression condition,
[CanBeNull]AssignmentOrIncrementDecrementExpression incrementor,
[AllowNull]Statement initializer,
[AllowNull]Expression condition,
[AllowNull]AssignmentOrIncrementDecrementExpression incrementor,
Statement body,
LineInfo location)
: base(location)

Просмотреть файл

@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
@ -24,7 +24,7 @@ namespace BuildXL.FrontEnd.Script.Statements
public Statement ThenStatement { get; }
/// <nodoc />
[CanBeNull]
[AllowNull]
public Statement ElseStatement { get; }
/// <nodoc />

Просмотреть файл

@ -3,9 +3,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Values;
using JetBrains.Annotations;
using TypeScript.Net.Utilities;
namespace BuildXL.FrontEnd.Script.Statements

Просмотреть файл

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Linq;
using System.Threading;
@ -10,7 +11,6 @@ using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Statements
@ -27,7 +27,7 @@ namespace BuildXL.FrontEnd.Script.Statements
public IReadOnlyList<CaseClause> CaseClauses { get; }
/// <nodoc />
[CanBeNull]
[AllowNull]
public DefaultClause DefaultClause { get; }
private Dictionary<EvaluationResult, int> m_caseTable;

Просмотреть файл

@ -8,7 +8,6 @@ using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.FrontEnd.Script.Types;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
@ -29,11 +28,11 @@ namespace BuildXL.FrontEnd.Script.Statements
/// Declared type.
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
[CanBeNull]
[AllowNull]
public Type Type { get; }
/// <nodoc />
[CanBeNull]
[AllowNull]
public Expression Initializer { get; }
/// <nodoc />

Просмотреть файл

@ -2,11 +2,11 @@
// Licensed under the MIT License.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
@ -174,7 +174,7 @@ namespace BuildXL.FrontEnd.Script.Values
/// <summary>
/// Applies a function with two arguments on the <paramref name="receiver"/>.
/// </summary>
public virtual EvaluationResult Apply([NotNull]Context context, [NotNull]T receiver, [CanBeNull]EvaluationResult arg1, [CanBeNull]EvaluationResult arg2, [NotNull]EvaluationStackFrame captures)
public virtual EvaluationResult Apply([NotNull]Context context, [NotNull]T receiver, [AllowNull]EvaluationResult arg1, [AllowNull]EvaluationResult arg2, [NotNull]EvaluationStackFrame captures)
{
throw new InvalidOperationException("Function with 2 arguments is not applicable.");
}
@ -182,7 +182,7 @@ namespace BuildXL.FrontEnd.Script.Values
/// <summary>
/// Applies a function with N arguments on the <paramref name="receiver"/>
/// </summary>
public virtual EvaluationResult Apply([NotNull]Context context, [NotNull]T receiver, [CanBeNull]EvaluationResult[] args, [NotNull]EvaluationStackFrame captures)
public virtual EvaluationResult Apply([NotNull]Context context, [NotNull]T receiver, [AllowNull]EvaluationResult[] args, [NotNull]EvaluationStackFrame captures)
{
throw new InvalidOperationException(I($"Function with {args.Length} arguments is not applicable."));
}

Просмотреть файл

@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Values
@ -52,17 +52,17 @@ namespace BuildXL.FrontEnd.Script.Values
/// <summary>
/// Applies ambient.
/// </summary>
public abstract EvaluationResult Apply(Context context, [CanBeNull]EvaluationResult arg, [NotNull]EvaluationStackFrame captures);
public abstract EvaluationResult Apply(Context context, [AllowNull]EvaluationResult arg, [NotNull]EvaluationStackFrame captures);
/// <summary>
/// Applies ambient.
/// </summary>
public abstract EvaluationResult Apply([NotNull]Context context, [CanBeNull]EvaluationResult arg1, [CanBeNull]EvaluationResult arg2, [NotNull]EvaluationStackFrame captures);
public abstract EvaluationResult Apply([NotNull]Context context, [AllowNull]EvaluationResult arg1, [AllowNull]EvaluationResult arg2, [NotNull]EvaluationStackFrame captures);
/// <summary>
/// Applies ambient.
/// </summary>
public abstract EvaluationResult Apply([NotNull]Context context, [CanBeNull]EvaluationResult[] args, [NotNull]EvaluationStackFrame captures);
public abstract EvaluationResult Apply([NotNull]Context context, [AllowNull]EvaluationResult[] args, [NotNull]EvaluationStackFrame captures);
}
/// <summary>

Просмотреть файл

@ -3,10 +3,10 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Runtime.CompilerServices;
using BuildXL.FrontEnd.Script.Literals;
using JetBrains.Annotations;
namespace BuildXL.FrontEnd.Script.Values
{

Просмотреть файл

@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Values

Просмотреть файл

@ -8,7 +8,6 @@ using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.Utilities.Core;
using TypeScript.Net.Types;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
namespace BuildXL.FrontEnd.Script.Values
{

Просмотреть файл

@ -11,9 +11,7 @@ using BuildXL.FrontEnd.Script.Literals;
using BuildXL.FrontEnd.Script.Util;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
namespace BuildXL.FrontEnd.Script.Values
{
@ -263,7 +261,7 @@ namespace BuildXL.FrontEnd.Script.Values
/// a uniform way to retrieve the custom merge function. Each subclass should
/// reimplement this if needed
/// </remarks>
[CanBeNull]
[return: MaybeNull]
protected virtual MergeFunction TryGetCustomMergeFunction(Context context, EvaluationStackFrame captures)
{
var customMerge = this[context.ContextTree.CommonConstants.CustomMergeFunction];
@ -290,7 +288,7 @@ namespace BuildXL.FrontEnd.Script.Values
/// <remarks>
/// Handles the left-wins-over-right behavior when custom functions are specified
/// </remarks>
[NotNull]
[return: NotNull]
protected MergeFunction GetMergeFunction(Context context, EvaluationStackFrame captures, ObjectLiteral leftObject, EvaluationResult rightObject)
{
// If the left object has a custom merge, that trumps the other cases

Просмотреть файл

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Util;
@ -10,7 +11,6 @@ using BuildXL.FrontEnd.Sdk.Tracing;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.Core.Qualifier;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Values
@ -28,7 +28,7 @@ namespace BuildXL.FrontEnd.Script.Values
/// <summary>
/// Object literal representing a qualifier.
/// </summary>
[CanBeNull]
[AllowNull]
public ObjectLiteral Qualifier { get; }
/// <summary>

Просмотреть файл

@ -12,7 +12,7 @@ using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.FrontEnd.Sdk;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Values
@ -53,7 +53,7 @@ namespace BuildXL.FrontEnd.Script.Values
/// <summary>
/// Captured template reference in the context of the thunk position. Can be null if we are in V1.
/// </summary>
[CanBeNull]
[AllowNull]
public Expression CapturedTemplateReference { get; }
/// <summary>
@ -81,7 +81,7 @@ namespace BuildXL.FrontEnd.Script.Values
}
/// <nodoc />
public Thunk(Expression expression, [CanBeNull]Expression capturedTemplateReference)
public Thunk(Expression expression, [AllowNull]Expression capturedTemplateReference)
{
Contract.Requires(expression != null);

Просмотреть файл

@ -14,19 +14,17 @@ using BuildXL.FrontEnd.Script.Values;
using BuildXL.FrontEnd.Sdk;
using BuildXL.FrontEnd.Workspaces;
using BuildXL.FrontEnd.Workspaces.Core;
using BuildXL.Utilities;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Instrumentation.Common;
using BuildXL.Utilities.ParallelAlgorithms;
using BuildXL.Utilities.Core.Tasks;
using JetBrains.Annotations;
using TypeScript.Net.DScript;
using TypeScript.Net.Types;
using TypeScript.Net.Utilities;
using static BuildXL.Utilities.Core.FormattableStringEx;
using Binder = TypeScript.Net.Binding.Binder;
using System.Diagnostics.CodeAnalysis;
namespace BuildXL.FrontEnd.Script
{
@ -76,7 +74,7 @@ namespace BuildXL.FrontEnd.Script
/// <nodoc />
public ConfigurationConversionHelper(
[CanBeNull] FrontEndEngineAbstraction engine,
[AllowNull] FrontEndEngineAbstraction engine,
ConfigurationKind kind,
Logger logger,
FrontEndHost host,

Просмотреть файл

@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.IO;
using System.Linq;
@ -14,8 +15,6 @@ using BuildXL.FrontEnd.Sdk.Workspaces;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Configuration;
using BuildXL.Utilities.Configuration.Mutable;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
namespace BuildXL.FrontEnd.Script
{
@ -34,7 +33,7 @@ namespace BuildXL.FrontEnd.Script
/// <remarks>
/// Not null if the configuration is processed successfully.
/// </remarks>
[CanBeNull]
[AllowNull]
public IWorkspace PrimaryConfigurationWorkspace { get; private set; }
/// <inheritdoc />

Просмотреть файл

@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Runtime.CompilerServices;
using System.Threading;
@ -12,7 +13,6 @@ using BuildXL.FrontEnd.Sdk;
using BuildXL.Pips;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using Closure = BuildXL.FrontEnd.Script.Values.Closure;
using LineInfo = TypeScript.Net.Utilities.LineInfo;

Просмотреть файл

@ -11,8 +11,6 @@ using BuildXL.FrontEnd.Script.Ambients.Transformers;
using BuildXL.FrontEnd.Script.Tracing;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.FrontEnd.Sdk;
using JetBrains.Annotations;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
namespace BuildXL.FrontEnd.Script.Evaluator
{

Просмотреть файл

@ -3,9 +3,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
#pragma warning disable SA1649 // File name must match first type name

Просмотреть файл

@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Runtime.CompilerServices;
using BuildXL.FrontEnd.Script.Expressions;
@ -9,7 +10,6 @@ using BuildXL.FrontEnd.Script.Literals;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
namespace BuildXL.FrontEnd.Script
{

Просмотреть файл

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using System.Threading;
using BuildXL.FrontEnd.Script.RuntimeModel.AstBridge;
@ -11,7 +12,6 @@ using BuildXL.FrontEnd.Script.Values;
using BuildXL.FrontEnd.Sdk;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Evaluator

Просмотреть файл

@ -1,13 +1,12 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.FrontEnd.Script.Util;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Instrumentation.Common;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Evaluator
@ -17,7 +16,7 @@ namespace BuildXL.FrontEnd.Script.Evaluator
/// </summary>
public sealed class StackEntry
{
[CanBeNull]
[AllowNull]
private ApplyExpression m_ambientCall;
/// <summary>
@ -28,7 +27,7 @@ namespace BuildXL.FrontEnd.Script.Evaluator
/// <summary>
/// Method that is called.
/// </summary>
[CanBeNull]
[AllowNull]
public FunctionLikeExpression Lambda { get; private set; }
/// <summary>
@ -53,7 +52,7 @@ namespace BuildXL.FrontEnd.Script.Evaluator
/// <summary>
/// Environment of the <see cref="Closure"/> (if any).
/// </summary>
[CanBeNull]
[AllowNull]
public ModuleLiteral Env { get; private set; }
/// <summary>

Просмотреть файл

@ -7,7 +7,7 @@ using System.Linq;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using System.Diagnostics.CodeAnalysis;
#pragma warning disable SA1649 // File name must match first type name
@ -54,7 +54,7 @@ namespace BuildXL.FrontEnd.Script.Evaluator
/// Creates a helper class with information about locals.
/// Returns null if not under the debugger.
/// </summary>
[CanBeNull]
[return: MaybeNull]
internal static DebugInfo Create(Context context, ModuleLiteral env, EvaluationStackFrame locals)
{
return context.IsBeingDebugged

Просмотреть файл

@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Evaluator
@ -40,7 +40,7 @@ namespace BuildXL.FrontEnd.Script.Evaluator
/// <summary>
/// The template value implicitly captured by the active thunk. Can be null if we are in V1 mode.
/// </summary>
[CanBeNull]
[AllowNull]
public object CapturedTemplateValue { get; }
/// <nodoc />

Просмотреть файл

@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Declarations;
using BuildXL.FrontEnd.Script.Expressions;
using BuildXL.FrontEnd.Script.Types;
using BuildXL.Utilities.Core;
using JetBrains.Annotations;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
namespace BuildXL.FrontEnd.Script.Values

Просмотреть файл

@ -17,12 +17,10 @@ using BuildXL.FrontEnd.Sdk.Evaluation;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Core.Qualifier;
using BuildXL.Utilities.Core.Tasks;
using JetBrains.Annotations;
using TypeScript.Net.Utilities;
using static BuildXL.Utilities.Core.FormattableStringEx;
using BindingDictionary = System.Collections.Generic.Dictionary<BuildXL.Utilities.Core.SymbolAtom, BuildXL.FrontEnd.Script.Values.ModuleBinding>;
using LineInfo = TypeScript.Net.Utilities.LineInfo;
using NotNullAttribute = JetBrains.Annotations.NotNullAttribute;
using NsBindingDictionary = System.Collections.Generic.Dictionary<BuildXL.Utilities.Core.FullSymbol, BuildXL.FrontEnd.Script.Values.ModuleBinding>;
// Enable below code for testing specialized dictionaries.
@ -73,7 +71,7 @@ namespace BuildXL.FrontEnd.Script.Values
///
/// Visibility should be internal, because File module reads/writes this field.
/// </remarks>
[CanBeNull]
[AllowNull]
[SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "SA1307:AccessibleFieldsMustBeginWithUpperCaseLetter")]
protected internal BindingDictionary m_bindings;
@ -84,7 +82,7 @@ namespace BuildXL.FrontEnd.Script.Values
/// These bindings are the bindings for namespaces.
/// Valid only for file modules and globals only. Shared between the uninstantiated module and its module instance.
/// </remarks>
[CanBeNull]
[AllowNull]
protected NsBindingDictionary m_nsBindings;
/// <summary>
@ -124,14 +122,14 @@ namespace BuildXL.FrontEnd.Script.Values
/// <remarks>
/// For types and namespaces this property returns owning file module, for file module - globals, and null for globals.
/// </remarks>
[CanBeNull]
[AllowNull]
public ModuleLiteral OuterScope { get; }
/// <summary>
/// Returns file module for this module instance.
/// Null for globals, 'this' for file module and owning file for type or namespace.
/// </summary>
[CanBeNull]
[AllowNull]
public abstract FileModuleLiteral CurrentFileModule { get; }
/// <summary>
@ -149,7 +147,7 @@ namespace BuildXL.FrontEnd.Script.Values
/// <remarks>
/// Null for <see cref="GlobalModuleLiteral"/> or not-null for other kind of module literals.
/// </remarks>
[CanBeNull]
[AllowNull]
public abstract Package Package { get; }
/// <summary>

Просмотреть файл

@ -3,13 +3,13 @@
using System;
using System.Collections.Concurrent;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Ambients;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.FrontEnd.Sdk.Evaluation;
using BuildXL.Utilities.Core;
using BuildXL.Utilities.Collections;
using JetBrains.Annotations;
using static BuildXL.Utilities.Core.FormattableStringEx;
namespace BuildXL.FrontEnd.Script.Evaluator
@ -64,7 +64,7 @@ namespace BuildXL.FrontEnd.Script.Evaluator
}
/// <nodoc/>
[NotNull]
[return: NotNull]
public UninstantiatedModuleInfo GetUninstantiatedModuleInfoByModuleId(ModuleLiteralId moduleId)
{
Contract.Requires(moduleId.IsValid);
@ -130,7 +130,7 @@ namespace BuildXL.FrontEnd.Script.Evaluator
}
/// <nodoc/>
[NotNull]
[return: NotNull]
public UninstantiatedModuleInfo GetUninstantiatedModuleInfoByPath(AbsolutePath path)
{
Contract.Requires(path.IsValid, "path.IsValid");

Просмотреть файл

@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.ContractsLight;
using BuildXL.FrontEnd.Script.Evaluator;
using BuildXL.FrontEnd.Script.Values;
using BuildXL.FrontEnd.Sdk.Evaluation;
using BuildXL.Utilities.Core.Qualifier;
using JetBrains.Annotations;
namespace BuildXL.FrontEnd.Script
{
@ -16,11 +16,11 @@ namespace BuildXL.FrontEnd.Script
public sealed class UninstantiatedModuleInfo : IUninstantiatedModuleInfo
{
/// <nodoc/>
[CanBeNull]
[AllowNull]
public FileModuleLiteral FileModuleLiteral { get; }
/// <nodoc/>
[CanBeNull]
[AllowNull]
public TypeOrNamespaceModuleLiteral TypeOrNamespaceTypeOrNamespaceLiteral { get; }
/// <nodoc/>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше