Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet committed Oct 21, 2023
1 parent a6a0538 commit d31b42f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ public void StartBatchBuild(IDictionary<string, string>? globalProperties = null
Verbosity = MSB.Framework.LoggerVerbosity.Normal
};

// We already separately collect the DiagnosticLog in evaluation, so we don't need
// to pass the _batchBuildLogger here, we just need the binlog in the ProjectCollection.
var loggers = _msbuildLogger is not null
? ImmutableArray.Create(_msbuildLogger)
: ImmutableArray<MSB.Framework.ILogger>.Empty;
Expand All @@ -175,6 +177,8 @@ public void StartBatchBuild(IDictionary<string, string>? globalProperties = null

var buildParameters = new MSB.Execution.BuildParameters(_batchBuildProjectCollection)
{
// The loggers are not inherited from the project collection, so specify the
// binlog logger and the _batchBuildLogger (to collect the DiagnosticLog for build) here.
Loggers = loggers.Add(_batchBuildLogger),
// If we have an additional logger and it's diagnostic, then we need to opt into task inputs globally, or otherwise
// it won't get any log events. This logic matches https://github.com/dotnet/msbuild/blob/fa6710d2720dcf1230a732a8858ffe71bcdbe110/src/Build/Instance/ProjectInstance.cs#L2365-L2371
Expand Down

0 comments on commit d31b42f

Please sign in to comment.