-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[watch] Fix /bl option parsing, use it for build logging #50002
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the parsing of the /bl
(binary logger) option in dotnet-watch and enables proper build logging functionality. The changes address issues with how binary logger arguments were handled and ensure consistent logging across different build operations.
Key changes:
- Fixed binary logger option parsing to handle various
/bl
formats correctly - Updated all BuildReporter instantiations to accept GlobalOptions parameter for binary logging configuration
- Added proper binary log file filtering to prevent watch loops on generated log files
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
CommandLineOptions.cs | Added binary logger option parsing and forwarding logic with proper MSBuild argument formatting |
GlobalOptions.cs | Added BinaryLogPath property to store binary logger configuration |
EnvironmentOptions.cs | Modified GetBinLogPath method to use GlobalOptions instead of test-specific logic |
BuildReporter.cs | Updated constructor to accept GlobalOptions parameter for binary logging |
Multiple test files | Updated BuildReporter instantiations to include new GlobalOptions parameter |
HotReloadDotNetWatcher.cs | Added binary log file filtering and removed hardcoded test binary log arguments |
WatchableApp.cs | Updated default watch arguments to use simpler -bl format |
Comments suppressed due to low confidence (2)
test/dotnet-watch.Tests/CommandLine/EnvironmentOptionsTests.cs:6
- The class name 'BuildReporterTests' doesn't match the file name 'EnvironmentOptionsTests.cs'. Either rename the class to 'EnvironmentOptionsTests' or move it to a file named 'BuildReporterTests.cs'.
public class BuildReporterTests
src/BuiltInTools/dotnet-watch/CommandLine/CommandLineOptions.cs:264
- There's an extra closing brace here that doesn't match the opening structure, creating unbalanced braces in the control flow.
}
@baronfel ptal |
The option is now forwarded to the command dotnet-watch is executing (
dotnet run
,dotnet test
, etc.) and also used for logging dotnet-watch invoked build operations:dotnet build
and design-time build.