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

Fix missed errors appearance on restore #9424

Conversation

YuliiaKovalova
Copy link
Member

Fixes #9082

Context

Errors can be missed from the output if these are not associated with the tracked projects.
But this category of messages must be reported to the customers in any case.

Changes Made

Display non-associated errors.

Testing

Manual

Notes

image

Copy link
Member

@ladipro ladipro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a few comments inline. Additionally I'd like to ask if adding this logic to ErrorRaised but not to WarningRaised is intentional. Even if restore didn't produce any warnings, I feel like we should behave consistently between the two for future-proofing.

src/MSBuild/TerminalLogger/TerminalLogger.cs Outdated Show resolved Hide resolved
src/MSBuild/TerminalLogger/TerminalLogger.cs Outdated Show resolved Hide resolved
src/MSBuild/TerminalLogger/TerminalLogger.cs Show resolved Hide resolved
@YuliiaKovalova
Copy link
Member Author

YuliiaKovalova commented Nov 16, 2023

I've left a few comments inline. Additionally I'd like to ask if adding this logic to ErrorRaised but not to WarningRaised is intentional. Even if restore didn't produce any warnings, I feel like we should behave consistently between the two for future-proofing.

I was discussing this implementation with @rainersigwald, but probably I didn't get him right.
Let's wait for his input.

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @ladipro: the same logic for errors should apply to warnings. We shouldn't ever fail to log a warning or error just because it happened at a time where we weren't fully expecting it.

src/MSBuild/TerminalLogger/TerminalLogger.cs Outdated Show resolved Hide resolved
src/MSBuild/TerminalLogger/TerminalLogger.cs Outdated Show resolved Hide resolved
@rainersigwald
Copy link
Member

Oh and please add a Verify test of a project that fails during Restore.

@YuliiaKovalova YuliiaKovalova merged commit 5fcddc7 into dotnet:main Nov 28, 2023
8 checks passed
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.

Restore errors missing in -tl
4 participants