Open
Description
Context
#10618 has more context on issue and dilema of BuildCheck diagnostics promotability.
The fixing PR handles it by sending the info to the main node.
Main node is purging the WarnAsError dictionaries on project done:
msbuild/src/Build/BackEnd/Components/Logging/LoggingService.cs
Lines 1651 to 1657 in faadade
At the same time - if we'd expose ProjectDone event through BuildCheck OM (it's now exposed internally - so we might want to do it publically later on) - then warnings can be logged for such project just after the ProjectDone event passes through the clearing code above and hence such warning would not be properly promoted/demoted.
Possible solutions
- Not clearing the sets with warnings promotability/demotability this can however hurt perf.
- Mark somehow that ProjectDone is processed by buildCheck and only clear the lookups after that
- Process buildCheck diagnostics promotability during logging (so that it happens before LoggingService enqueues it - not after it dequeues it) and moving the clearing code couple lines after
RouteBuildEvent
is called