Skip to content

Process MSVC logger events on the primary node - #151

Merged
dfederm merged 1 commit into
mainfrom
dfederm/fix-referencetrimmer-pr-builds
Aug 14, 2026
Merged

Process MSVC logger events on the primary node#151
dfederm merged 1 commit into
mainfrom
dfederm/fix-referencetrimmer-pr-builds

Conversation

@dfederm

@dfederm dfederm commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

Handle the central node's Unused libraries: output directly when no secondary node exists. This preserves ReferenceTrimmerUnusedMSVCLibraries.json.log generation for /m:1 and covers /m:N builds that execute link tasks on the central node.

The change also tightens context correlation so concurrent builds for the same project path do not cross-contaminate each other, while still falling back safely when MSBuild only provides partial context.

Why this is safe

  • Scope is limited to MSVC logger event handling and associated tests.
  • Existing forwarding behavior is preserved; the fix only adds a central-node path and more precise build-context matching.
  • Partial/invalid context still falls back to project path, avoiding regressions when MSBuild omits identifiers.

Testing

Test / build Result
GitHub Actions run 31820717422 at 2fefc29ea7b133fa1323aa56705c1a5636fb7a7b Passed
Restore, build, and test suite Passed (175/175 tests)
Notable coverage ForwardingLogger_IsolatesConcurrentBuildContextsForSameProject, ForwardingLogger_FallsBackToProjectPathForPartialBuildContexts, CentralLogger_ProcessesUnusedLibEventsFromPrimaryNode, UnusedWinSdkImportLibrary, UnusedCppLibrary, UnusedCppDelayLoadLibrary

The distributed forwarding logger is not created for single-node MSBuild 18 builds. Run the same event parser in the central logger so unused library diagnostics still work with /m:1.

Correlate parser state by node and project context so concurrent builds of the same project remain isolated even when task IDs differ between events.

Copilot-Session: 1a0d74b8-3e5c-4b54-ae88-080aa7d2a62e
@dfederm
dfederm merged commit c27c5d2 into main Aug 14, 2026
3 checks passed
@dfederm
dfederm deleted the dfederm/fix-referencetrimmer-pr-builds branch August 14, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant