Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuildCheck - once/if ProjectFinished is exposed via OM - facilitate proper WarnAsErrors promotability #10670

Open
JanKrivanek opened this issue Sep 16, 2024 · 0 comments

Comments

@JanKrivanek
Copy link
Member

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:

if (buildEventArgs is ProjectFinishedEventArgs projectFinishedEvent && projectFinishedEvent.BuildEventContext != null)
{
WarningsConfigKey key = GetWarningsConfigKey(projectFinishedEvent);
_warningsAsErrorsByProject?.Remove(key);
_warningsNotAsErrorsByProject?.Remove(key);
_warningsAsMessagesByProject?.Remove(key);
}

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant