BuildCheck - once/if ProjectFinished is exposed via OM - facilitate proper WarnAsErrors promotability
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Context
https://github.com/dotnet/msbuild/issues/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:
https://github.com/dotnet/msbuild/blob/faadade9317ee6cf5cb05e52c9863fe3c25bea52/src/Build/BackEnd/Components/Logging/LoggingService.cs#L1651-L1657
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.