You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restores source compatibility for BatchIf calls that pass a named timer argument (with an optional scheduler) but omit initialPauseState. A compatibility overload is added so those call sites bind again; the batch starts unpaused, matching the previous behavior.
Also documents the overload's initial pause state in the cache operator instructions.
Validation
Prior validation already passed: the solution built across all seven target frameworks, and the focused BatchIf test suite passed. New API surface is captured in the approved API verification files for .NET 8 and .NET 9.
source.BatchIf(pause, null, scheduler) compiles against the base commit, selecting the overload with a nullable timeout. Against this PR it fails with CS0121, because the new IObservable<Unit>? parameter and the existing TimeSpan? parameter both accept the positional null.
Suggested fix: change the added overload shape so named timer calls remain available without introducing another candidate for the existing positional nullable-timeout call. This requires an API-shape decision rather than a null check in the implementation, since resolution fails before any method runs. Include compile-time compatibility coverage for both named-timer calls and the existing BatchIf(pause, null, scheduler) form. Requiring downstream callers to add a cast would leave this as a source-breaking change rather than a compatibility restoration.
The reason will be displayed to describe this comment to others. Learn more.
Based on the rest of the codebase, we generally don't test operator overloads that are just a no-logic alias of another. I don't see why we should start here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores source compatibility for
BatchIfcalls that pass a namedtimerargument (with an optionalscheduler) but omitinitialPauseState. A compatibility overload is added so those call sites bind again; the batch starts unpaused, matching the previous behavior.Also documents the overload's initial pause state in the cache operator instructions.
Validation
Prior validation already passed: the solution built across all seven target frameworks, and the focused
BatchIftest suite passed. New API surface is captured in the approved API verification files for .NET 8 and .NET 9.Fixes #1175