Remove TestRequestExecutionTimeInfo binary-compat shim in next major release
- Dominant language
- C#
- Stars
- 1k
- Forks
- 312
- Avg merge
- 8h 30m
- Merged PRs (30d)
- 469
Description
## Context
PR #8921 restored the internal type `Microsoft.Testing.Platform.Extensions.Messages.TestRequestExecutionTimeInfo` (removed in #8514) as a binary-compatibility shim so that older shipped versions of `Microsoft.Testing.Platform.MSBuild` (<= 2.2.x) do not throw `TypeLoadException` when loaded against the current `Microsoft.Testing.Platform`.
Follow-up #8921 (commit `053ba72`) additionally restored the publisher in `TestHostTestFrameworkInvoker.ExecuteAsync` so the old `MSBuildConsumer` still receives the message it needs to emit its end-of-run summary.
The type is marked `[Obsolete]` precisely so we don''t forget about it.
## Task
In the next major release of `Microsoft.Testing.Platform` (where breaking binary compatibility with the 2.2.x extension line is acceptable), remove:
1. The type itself: `src/Platform/Microsoft.Testing.Platform/Messages/TestRequestExecutionTimeInfo.cs`.
2. The `IDataProducer` implementation on `TestHostTestFrameworkInvoker` (`src/Platform/Microsoft.Testing.Platform/Requests/TestHostTestFrameworkInvoker.cs`):
- Remove `IDataProducer` from the interface list.
- Remove the `DataTypesProduced` property.
- Remove the `DateTimeOffset startTime` / `Stopwatch` setup and the final `messageBus.PublishAsync(this, new TestRequestExecutionTimeInfo(...))` call.
- Remove the related `#pragma warning disable CS0618` blocks and the `using Microsoft.Testing.Platform.Extensions.Messages;` if no longer needed.
3. The `ForwardCompatibilityTests` asset pin for `Microsoft.Testing.Platform.MSBuild` 2.2.1 can be revisited / bumped to a version that no longer references the type.
## References
- Removal PR: #8514
- Crash report / restore PR: #8921
- Original `[Obsolete]` annotation: commit `c915e821b`
- Republish for old extension summary: commit `053ba72`
Contributor guide
Research direction
Start with src/Platform/Microsoft.Testing.Platform/Messages/TestRequestExecutionTimeInfo.cs and src/Platform/Microsoft.Testing.Platform/Requests/TestHostTestFrameworkInvoker.cs, then inspect the ForwardCompatibilityTests asset pin for Microsoft.Testing.Platform.MSBuild 2.2.1. Remove the obsolete type and producer-related members and update the compatibility asset as appropriate; done means the next-major build and relevant compatibility tests no longer reference the shim.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100