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