Uh oh!
There was an error while loading. Please reload this page.
Delete dead code - #7734
Conversation
There was a problem hiding this comment.
Pull request overview
Removes the unused/never-fully-implemented “obsolete command line option” surface area from Microsoft.Testing.Platform, including its IPC serialization and help/warning output paths.
Changes:
- Removes
CommandLineOption.ObsolescenceMessageand the related public constructor overload. - Deletes the obsolete-options warning path (
CheckForObsoleteOptionsAsync) and strips “[obsolete]”/obsolete text from help output. - Updates DotnetTest IPC models/serialization to stop emitting/reading the obsolete-message field.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/Serializers/CommandLineOptionMessagesSerializer.cs | Stops serializing/deserializing the obsolete-message field in IPC payloads. |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/ObjectFieldIds.cs | Removes the obsolete-message field id from the IPC field-id list (currently left as commented-out code). |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/Models/CommandLineOptionMessages.cs | Updates IPC record shape to drop the obsolete-message value. |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/DotnetTestConnection.cs | Stops sending obsolete-message over IPC when constructing option messages. |
| src/Platform/Microsoft.Testing.Platform/PublicAPI/PublicAPI.Shipped.txt | Updates shipped API declarations for the removed API surface (partial update). |
| src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs | Removes invocation of obsolete-options warning check during host build. |
| src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionsValidator.cs | Removes the obsolete-options warning implementation. |
| src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOption.cs | Removes ObsolescenceMessage and the public ctor overload that accepted it; adjusts equality/hash. |
| src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineHandler.cs | Removes “[obsolete]” label and obsolete-message printing from help output. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
03690cf to
d8582abCompared8582ab to
1588e27Compare
Amaury Levé (Evangelink)
left a comment
There was a problem hiding this comment.
Clean removal of unused API surface. The deletion is thorough across all layers (public API, help display, validator, IPC serialization) and IPC backward compat is safe thanks to the field-skip default branch in the deserializer.
Two minor nits left as inline comments:
- Orphaned
CommandLineOptionObsoleteWarningresource string + 13 xlf files should be cleaned up. - Commented-out field ID constant — prefer either deleting or a proper reservation comment.
Neither is blocking. LGTM.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We should have never introduced this as a public non-experimental API. It was introduced in 2.1.0 and wasn't used and also was never implemented fully with dotnet test. While it's binary breaking change, our users of such API will be test framework authors which is a very limited audience and no one is using it today. So it's a safe breaking change.