Skip to content

Use new API for parsing binary logger parameter#53492

Merged
tmat merged 1 commit into
dotnet:release/10.0.3xxfrom
tmat:UseBinaryLoggerParseParameters
Mar 17, 2026
Merged

Use new API for parsing binary logger parameter#53492
tmat merged 1 commit into
dotnet:release/10.0.3xxfrom
tmat:UseBinaryLoggerParseParameters

Conversation

@tmat
Copy link
Copy Markdown
Member

@tmat tmat commented Mar 16, 2026

dotnet/msbuild#12606 added new API that parses binary logger parameters.
We can remove our custom parser.

Verified that the parsing tests passed before deleting them.

@tmat tmat requested a review from a team as a code owner March 16, 2026 23:48
Copilot AI review requested due to automatic review settings March 16, 2026 23:48
@tmat tmat force-pushed the UseBinaryLoggerParseParameters branch from 4fa4e5e to aec310a Compare March 16, 2026 23:49
@tmat
Copy link
Copy Markdown
Member Author

tmat commented Mar 16, 2026

@DustinCampbell ptal

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 replaces a custom binary logger parameter parser in dotnet-watch with the new BinaryLogger.ParseParameters API from MSBuild (introduced in dotnet/msbuild#12606), removing duplicated parsing logic.

Changes:

  • Replaced the custom ParseBinaryLogFilePath implementation with a call to BinaryLogger.ParseParameters from Microsoft.Build.Logging, adding error handling and an ILogger parameter.
  • Deleted the BinaryLoggerTests test file since the parsing logic is now owned by MSBuild.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Dotnet.Watch/dotnet-watch/CommandLine/CommandLineOptions.cs Replaced custom parser with BinaryLogger.ParseParameters API call; added ILogger parameter for error reporting; added new using directives.
test/dotnet-watch.Tests/CommandLine/BinaryLoggerTests.cs Deleted the test file for the now-removed custom parser.

Comment thread src/Dotnet.Watch/dotnet-watch/CommandLine/CommandLineOptions.cs
Copy link
Copy Markdown
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

Ooh we can use this in Roslyn too...

@tmat tmat force-pushed the UseBinaryLoggerParseParameters branch from aec310a to 8c931a5 Compare March 16, 2026 23:52
@tmat tmat force-pushed the UseBinaryLoggerParseParameters branch from 8c931a5 to 0326f72 Compare March 17, 2026 16:23
@tmat tmat merged commit e236a02 into dotnet:release/10.0.3xx Mar 17, 2026
28 checks passed
@tmat tmat deleted the UseBinaryLoggerParseParameters branch March 17, 2026 18:20
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.

4 participants