Improve plugin error logging#6359
Closed
cdmihai wants to merge 12 commits intodotnet:mainfrom
Closed
Conversation
Fixes the issue of Logger.HasLoggedErrors leaking between API calls
cdmihai
commented
Apr 20, 2021
In this case the exception is not what the cache printed, but MSBuild's message that the cache logged an error
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on the changes in #6345. Merge that one in first.
These are the isolated diffs for this PR: https://github.com/dotnet/msbuild/pull/6359/files/1472b628aa65b2743b3abf068bcc2e4dc107c9f9..b9e1d9b2e51636d6cf1dae07cc53c119ee090464
Context
Treat project cache exceptions similar to how MSBuild treats exceptions from
ILogger.InitializeandILogger.Shutdown. This avoids the "file an issue against the MSBuild team" console messages.Treat errors logged by the project cache similar to how MSBuild treats errors logged by tasks. Which is to check whether they logged an error and if yes, shut the build down (project cache does not do "continue on error").
Changes Made
ProjectCacheExceptionwhich gets handled similarly toLoggerExceptionTesting