1 write to Request
Microsoft.Build (1)
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (1)
130
Request
= request;
145 references to Request
Microsoft.Build (108)
BackEnd\BuildManager\LegacyThreadingData.cs (2)
159
instance?.RequestEntry?.
Request
!= null,
162
int submissionId = instance.RequestEntry.
Request
.SubmissionId;
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (60)
240
TraceEngine("CFB: Shutting down request {0}({1}) (nr {2}) failed due to exception: {3}", entry.
Request
.GlobalRequestId, entry.
Request
.ConfigurationId, entry.
Request
.NodeRequestId, e.ToString());
259
TraceEngine("CFB: Shutting down request {0}({1}) (nr {2}) failed due to exception: {3}", entry.
Request
.GlobalRequestId, entry.
Request
.ConfigurationId, entry.
Request
.NodeRequestId, e.ToString());
273
BuildResult result = entry.Result ?? new BuildResult(entry.
Request
, new BuildAbortedException());
274
TraceEngine("CFB: Request is now {0}({1}) (nr {2}) has been deactivated.", entry.
Request
.GlobalRequestId, entry.
Request
.ConfigurationId, entry.
Request
.NodeRequestId);
275
RaiseRequestComplete(entry.
Request
, result);
408
TraceEngine("Request {0}({1}) (nr {2}) is now proceeding from current state {3}.", entry.
Request
.GlobalRequestId, entry.
Request
.ConfigurationId, entry.
Request
.NodeRequestId, entry.State);
429
TraceEngine("Request {0}({1}) (nr {2}) has retrieved the results for configuration {3} and cached them on node {4} (UBR).", entry.
Request
.GlobalRequestId, entry.
Request
.ConfigurationId, entry.
Request
.NodeRequestId, entry.
Request
.ConfigurationId, _componentHost.BuildParameters.NodeId);
453
TraceEngine("Request {0}({1}) (nr {2}) is no longer waiting on nr {3} (UBR). Results are {4}.", entry.
Request
.GlobalRequestId, entry.
Request
.ConfigurationId, entry.
Request
.NodeRequestId, result.NodeRequestId, result.OverallResult);
568
BuildRequestBlocker blocker = new BuildRequestBlocker(currentEntry.
Request
.GlobalRequestId, currentEntry.GetActiveTargets(), requestsToIssue.ToArray());
736
TraceEngine("ERS: Active request is now {0}({1}) (nr {2}).", currentEntry.
Request
.GlobalRequestId, currentEntry.
Request
.ConfigurationId, currentEntry.
Request
.NodeRequestId);
742
TraceEngine("ERS: Request {0}({1}) (nr {2}) is marked as complete.", currentEntry.
Request
.GlobalRequestId, currentEntry.
Request
.ConfigurationId, currentEntry.
Request
.NodeRequestId);
768
TraceEngine("ERS: Request {0}({1}) (nr {2}) is being removed from the requests list.", completedEntry.
Request
.GlobalRequestId, completedEntry.
Request
.ConfigurationId, completedEntry.
Request
.NodeRequestId);
770
_requestsByGlobalRequestId.Remove(completedEntry.
Request
.GlobalRequestId);
810
BuildRequestConfiguration configuration = _configCache[completedEntry.
Request
.ConfigurationId];
822
TraceEngine("ERS: Request is now {0}({1}) (nr {2}) has had its builder cleaned up.", completedEntry.
Request
.GlobalRequestId, completedEntry.
Request
.ConfigurationId, completedEntry.
Request
.NodeRequestId);
823
RaiseRequestComplete(completedEntry.
Request
, completedEntry.Result);
935
RaiseRequestResumed(entry.
Request
);
1042
if (unsubmittedRequest.BlockingGlobalRequestId == issuingEntry.
Request
.GlobalRequestId)
1047
IssueBuildRequest(new BuildRequestBlocker(issuingEntry.
Request
.GlobalRequestId, issuingEntry.GetActiveTargets(), YieldAction.Yield));
1050
issuingEntry.WaitForBlockingRequest(issuingEntry.
Request
.GlobalRequestId);
1056
IssueBuildRequest(new BuildRequestBlocker(issuingEntry.
Request
.GlobalRequestId, issuingEntry.GetActiveTargets(), YieldAction.Reacquire));
1071
issuingEntry.WaitForBlockingRequest(issuingEntry.
Request
.GlobalRequestId);
1074
IssueBuildRequest(new BuildRequestBlocker(issuingEntry.
Request
.GlobalRequestId));
1085
IssueBuildRequest(new BuildRequestBlocker(issuingEntry.
Request
.GlobalRequestId, issuingEntry.GetActiveTargets(), unsubmittedRequest.BlockingGlobalRequestId, unsubmittedRequest.BlockingTarget, unsubmittedRequest.PartialBuildResult));
1142
if (issuingEntry.
Request
.BuildRequestDataFlags.HasFlag(BuildRequestDataFlags.IgnoreMissingEmptyAndInvalidImports))
1171
submissionId: issuingEntry.
Request
.SubmissionId,
1175
hostServices: issuingEntry.
Request
.HostServices,
1176
parentBuildEventContext: issuingEntry.
Request
.CurrentTaskContext ?? issuingEntry.
Request
.BuildEventContext,
1177
parentRequest: issuingEntry.
Request
,
1189
issuingEntry.
Request
.GlobalRequestId,
1190
issuingEntry.
Request
.ConfigurationId,
1191
issuingEntry.
Request
.NodeRequestId,
1200
submissionId: issuingEntry.
Request
.SubmissionId,
1204
hostServices: issuingEntry.
Request
.HostServices,
1205
parentBuildEventContext: issuingEntry.
Request
.CurrentTaskContext ?? issuingEntry.
Request
.BuildEventContext,
1206
parentRequest: issuingEntry.
Request
,
1273
BuildRequestBlocker blocker = new BuildRequestBlocker(issuingEntry.
Request
.GlobalRequestId, issuingEntry.GetActiveTargets(), requestsToIssue.ToArray());
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (2)
385
ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Waiting, "Entry must be in the waiting state to be unblocked. Config: {0} State: {1} Request: {2}", RequestConfiguration.ConfigurationId, State,
Request
.GlobalRequestId);
386
ErrorUtilities.VerifyThrow(_blockingGlobalRequestId != BuildRequest.InvalidGlobalRequestId, "Entry must be waiting on another request to be unblocked. Config: {0} Request: {1}", RequestConfiguration.ConfigurationId,
Request
.GlobalRequestId);
BackEnd\Components\Logging\ProjectLoggingContext.cs (10)
36
requestEntry.
Request
.SubmissionId,
37
requestEntry.
Request
.ConfigurationId,
39
requestEntry.
Request
.Targets,
43
requestEntry.
Request
.ParentBuildEventContext,
45
requestEntry.
Request
.ProjectContextId)
83
requestEntry.
Request
.SubmissionId,
84
requestEntry.
Request
.ConfigurationId,
86
requestEntry.
Request
.Targets,
90
requestEntry.
Request
.ParentBuildEventContext,
92
requestEntry.
Request
.ProjectContextId);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (21)
231
ErrorUtilities.VerifyThrow(_blockType == BlockType.BlockedOnTargetInProgress || _blockType == BlockType.Yielded || (_continueResults != null), "Unexpected null results for request {0} (nr {1})", _requestEntry.
Request
.GlobalRequestId, _requestEntry.
Request
.NodeRequestId);
440
RaiseOnBlockedRequest(_requestEntry.
Request
.GlobalRequestId, null);
449
RaiseOnBlockedRequest(_requestEntry.
Request
.GlobalRequestId, String.Empty);
506
RaiseResourceRequest(ResourceRequest.CreateAcquireRequest(_requestEntry.
Request
.GlobalRequestId, requestedCores, waitForCores));
540
RaiseResourceRequest(ResourceRequest.CreateReleaseRequest(_requestEntry.
Request
.GlobalRequestId, coresToRelease));
573
return host.BuildParameters.LegacyThreadingSemantics && (host.LegacyThreadingData.MainThreadSubmissionId == entry.
Request
.SubmissionId);
668
return componentHostSnapshot.LegacyThreadingData.GetLegacyThreadInactiveTask(_requestEntry.
Request
.SubmissionId);
681
ErrorUtilities.VerifyThrow(_componentHost.LegacyThreadingData.MainThreadSubmissionId != _requestEntry.
Request
.SubmissionId, "Can't start builder thread when we are using legacy threading semantics for this request.");
866
result = new BuildResult(_requestEntry.
Request
, thrownException);
965
handle = RequestBuilder.WaitWithBuilderThreadStart(handles, true, _componentHost.LegacyThreadingData, _requestEntry.
Request
.SubmissionId);
1131
new CheckLoggingContext(_nodeLoggingContext.LoggingService, _requestEntry.
Request
.BuildEventContext),
1136
RequestEntry.
Request
.BuildRequestDataFlags,
1137
RequestEntry.
Request
.SubmissionId,
1146
_requestEntry.
Request
,
1155
_requestEntry.
Request
.BuildEventContext);
1176
_requestEntry.
Request
.BuildEventContext = _projectLoggingContext.BuildEventContext;
1180
.GetTargetsUsedToBuildRequest(_requestEntry.
Request
).ToArray();
1211
result = _requestEntry.
Request
.ProxyTargets == null
1232
var proxyTargetMapping = _requestEntry.
Request
.ProxyTargets.ProxyTargetToRealTargetMap;
1235
var cachedResult = resultsCache.GetResultsForConfiguration(_requestEntry.
Request
.ConfigurationId);
BackEnd\Components\RequestBuilder\TargetBuilder.cs (9)
134
BuildResult existingBuildResult = resultsCache.GetResultsForConfiguration(_requestEntry.
Request
.ConfigurationId);
136
_buildResult = new BuildResult(entry.
Request
, existingBuildResult, null);
149
if (!targetExists && entry.
Request
.BuildRequestDataFlags.HasFlag(BuildRequestDataFlags.SkipNonexistentTargets))
191
if (_requestEntry.
Request
.BuildRequestDataFlags.HasFlag(BuildRequestDataFlags.ProvideProjectStateAfterBuild))
196
if (_requestEntry.
Request
.RequestedProjectState != null)
199
_projectInstance.FilteredCopy(_requestEntry.
Request
.RequestedProjectState);
482
_requestEntry.RequestConfiguration.ActivelyBuildingTargets[currentTargetEntry.Name] = _requestEntry.
Request
.GlobalRequestId;
683
if (idOfAlreadyBuildingRequest != _requestEntry.
Request
.GlobalRequestId)
767
if (idOfAlreadyBuildingRequest != _requestEntry.
Request
.GlobalRequestId)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (4)
165
if (_taskNode != null && requestEntry.
Request
.HostServices != null)
167
_taskHostObject = requestEntry.
Request
.HostServices.GetHostObject(requestEntry.RequestConfiguration.Project.FullPath, loggingContext.Target.Name, _taskNode.Name);
431
_buildRequestEntry.
Request
.CurrentTaskContext = taskLoggingContext.BuildEventContext;
475
_buildRequestEntry.
Request
.CurrentTaskContext = null;
Microsoft.Build.Engine.UnitTests (37)
BackEnd\BuildRequestEngine_Tests.cs (6)
105
BuildResult errorResult = new BuildResult(_entry.
Request
, new InvalidOperationException("ContinueRequest not received in time."));
115
BuildResult res = new BuildResult(_entry.
Request
, new BuildAbortedException());
128
BuildResult res = new BuildResult(_entry.
Request
, new BuildAbortedException());
147
BuildResult errorResult = new BuildResult(_entry.
Request
, new InvalidOperationException("ContinueRequest not received in time."));
159
BuildResult result = new BuildResult(_entry.
Request
);
161
foreach (string target in _entry.
Request
.Targets)
BackEnd\BuildRequestEntry_Tests.cs (4)
29
Assert.Equal(entry.
Request
, request);
48
Assert.Equal(entry.
Request
, request);
61
Assert.Equal(entry.
Request
, request);
69
Assert.Equal(entry.
Request
, request);
BackEnd\RequestBuilder_Tests.cs (3)
365
BuildResult result = new BuildResult(entry.
Request
);
390
BuildResult result = new BuildResult(entry.
Request
);
399
return Task<BuildResult>.FromResult(_cache.GetResultForRequest(entry.
Request
));
BackEnd\TargetBuilder_Tests.cs (24)
136
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("Bar"));
137
Assert.Equal(TargetResultCode.Success, resultsCache.GetResultForRequest(entry.
Request
)["Bar"].ResultCode);
159
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("SkipCondition"));
160
Assert.Equal(TargetResultCode.Skipped, resultsCache.GetResultForRequest(entry.
Request
)["SkipCondition"].ResultCode);
193
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("Foo"));
194
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("Skip"));
195
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("Error"));
196
Assert.False(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("Baz2"));
197
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("Bar"));
198
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("Baz"));
199
Assert.Equal(TargetResultCode.Failure, resultsCache.GetResultForRequest(entry.
Request
)["DepError"].ResultCode);
200
Assert.Equal(TargetResultCode.Success, resultsCache.GetResultForRequest(entry.
Request
)["Foo"].ResultCode);
201
Assert.Equal(TargetResultCode.Success, resultsCache.GetResultForRequest(entry.
Request
)["Skip"].ResultCode);
202
Assert.Equal(TargetResultCode.Failure, resultsCache.GetResultForRequest(entry.
Request
)["Error"].ResultCode);
203
Assert.Equal(TargetResultCode.Success, resultsCache.GetResultForRequest(entry.
Request
)["Bar"].ResultCode);
204
Assert.Equal(TargetResultCode.Success, resultsCache.GetResultForRequest(entry.
Request
)["Baz"].ResultCode);
1436
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("Build"));
1437
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("ProduceError1"));
1438
Assert.False(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("ProduceError2"));
1439
Assert.True(resultsCache.GetResultForRequest(entry.
Request
).HasResultsForTarget("_Error1"));
1441
Assert.Equal(TargetResultCode.Failure, resultsCache.GetResultForRequest(entry.
Request
)["Build"].ResultCode);
1442
Assert.Equal(TargetResultCode.Skipped, resultsCache.GetResultForRequest(entry.
Request
)["ProduceError1"].ResultCode);
1443
Assert.Equal(TargetResultCode.Failure, resultsCache.GetResultForRequest(entry.
Request
)["_Error1"].ResultCode);
1467
Assert.Throws<InternalErrorException>(() => resultsCache.GetResultForRequest(entry.
Request
));