Move BufferedStreamWriter (+Switchable, +Pipe) to RESPite.Streams as the single copy - #3153
Merged
Merged
Conversation
…the single copy The trio existed twice: here (redis-coupled factory) and drifted lib-generic copies on the proxy spike branch. Duplicated code is asking for trouble, so this is the unification, replace/move not duplicate: the SE.Redis files are GONE, the one copy lives in RESPite.Streams (it already leaned on RESPite.Buffers -- the move is with the grain), and the proxy branch deletes its copies on next rebase. What decoupled: the factory loses ConnectionType/ConfigurationOptions and takes (WriteMode, Stream, MemoryPool<byte>?, CancellationToken); WriteMode.Default maps to Async as the lib-safe default. The redis POLICY (pub/sub never wants sync latency mode) moves to the one call site in PhysicalConnection.InitOutput, where it reads as policy instead of hiding in a lib factory. RESPite gains the same conditional System.IO.Pipelines reference SE.Redis already carries (in-box from net10.0) so PipeStreamWriter -- the comparison/troubleshooting implementation -- stays with its family rather than being split back out via cross-assembly inheritance. Everything stays internal; RESPite already grants IVT to StackExchange.Redis and the test projects. Solution builds 0 errors on all TFMs; BufferedStreamWriter + RoundTrip + InProcess/WriteMode test batteries all pass (129 tests).
mgravell
added a commit
that referenced
this pull request
Aug 3, 2026
…copies die This branch was the source of the duplication -- its lib-generic src/RESPite/Streams copies drifted from the redis-coupled originals. Main now carries the unified trio in RESPite.Streams (#3153), so the merge resolves every add/add in main's favour; the branch's copies are gone. The one branch call site (InnerLeg's sync writer) moves to the unified factory signature, and the PublicAPI file unions this branch's RespStream entries with main's SER009 entries. Solution + proxy toy build clean; the 129-test writer/round-trip/in-proc battery passes on the merged result.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The trio existed twice: here (redis-coupled factory) and drifted lib-generic copies on the proxy spike branch. Duplicated code is asking for trouble, so this is the unification, replace/move not duplicate: the SE.Redis files are GONE, the one copy lives in RESPite.Streams (it already leaned on RESPite.Buffers -- the move is with the grain), and the proxy branch deletes its copies on next rebase.
What decoupled: the factory loses ConnectionType/ConfigurationOptions and takes (WriteMode, Stream, MemoryPool?, CancellationToken); WriteMode.Default maps to Async as the lib-safe default. The redis POLICY (pub/sub never wants sync latency mode) moves to the one call site in PhysicalConnection.InitOutput, where it reads as policy instead of hiding in a lib factory.
RESPite gains the same conditional System.IO.Pipelines reference SE.Redis already carries (in-box from net10.0) so PipeStreamWriter -- the comparison/troubleshooting implementation -- stays with its family rather than being split back out via cross-assembly inheritance. Everything stays internal; RESPite already grants IVT to StackExchange.Redis and the test projects.
Solution builds 0 errors on all TFMs; BufferedStreamWriter + RoundTrip + InProcess/WriteMode test batteries all pass (129 tests).
Checklist