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

Use stdout for error messages #45999

Merged
merged 3 commits into from
Jan 19, 2025
Merged

Use stdout for error messages #45999

merged 3 commits into from
Jan 19, 2025

Conversation

tmat
Copy link
Member

@tmat tmat commented Jan 15, 2025

Messages written to stdout and stderr are not guaranteed to be displayed in the order they were written. This might cause confusion as an error might not be shown before we prompt the user for action, etc. It also causes intermittent failures of tests that verify error messages.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member labels Jan 15, 2025
@tmat
Copy link
Member Author

tmat commented Jan 15, 2025

@phil-allen-msft ptal

Copy link
Contributor

Thanks for your PR, @tmat.
To learn about the PR process and branching schedule of this repo, please take a look at the SDK PR Guide.

@KalleOlaviNiemitalo
Copy link
Contributor

stderr design in #7289

@tmat tmat enabled auto-merge (squash) January 16, 2025 22:11
@tmat
Copy link
Member Author

tmat commented Jan 16, 2025

@KalleOlaviNiemitalo
dotnet-watch outputs 4 different categories of output: verbose, ordinary, warning, error. All are regular, expected output. They vary in significance to the user. There are no scenarios where it would be useful to run dotnet-watch and only see errors, or non-errors. On the other hand, a common scenario is to display verbose messages (--verbose), which are not printed out by default.

Ordinary output describes context for error messages. It is important that both are printed out in the correct order, otherwise the proper context might be missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants