Skip to content

Use stdout for error messages#45999

Merged
tmat merged 3 commits intodotnet:release/9.0.3xxfrom
tmat:StdErr
Jan 19, 2025
Merged

Use stdout for error messages#45999
tmat merged 3 commits intodotnet:release/9.0.3xxfrom
tmat:StdErr

Conversation

@tmat
Copy link
Copy Markdown
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.

@ghost ghost added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, StaticWebAssetsSDK untriaged Request triage from a team member labels Jan 15, 2025
@tmat
Copy link
Copy Markdown
Member Author

tmat commented Jan 15, 2025

@phil-allen-msft ptal

@dotnet-policy-service
Copy link
Copy Markdown
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
Copy Markdown
Contributor

stderr design in #7289

@tmat tmat enabled auto-merge (squash) January 16, 2025 22:11
@tmat
Copy link
Copy Markdown
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, StaticWebAssetsSDK untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants