-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add breaking change documentation for BufferedStream.WriteByte implicit flush removal in .NET 10 #49123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…it flush removal Co-authored-by: gewarren <[email protected]>
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 documents a breaking change in .NET 10 Preview 4 where BufferedStream.WriteByte no longer performs an implicit flush when the internal buffer is full, aligning its behavior with other Write methods in the BufferedStream class.
Key changes:
- Added comprehensive breaking change documentation explaining the behavioral change and migration guidance
- Created compilable code snippets in both C# and Visual Basic demonstrating the previous behavior and migration path
- Updated the table of contents and index to include the new breaking change entry
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md | Main documentation file describing the breaking change, previous/new behavior, and migration guidance |
| docs/core/compatibility/core-libraries/10.0/snippets/bufferedstream-writebyte-flush/csharp/Program.cs | C# code examples demonstrating the behavioral change and recommended migration |
| docs/core/compatibility/core-libraries/10.0/snippets/bufferedstream-writebyte-flush/csharp/BufferedStreamWriteByteFlush.csproj | Project file for C# code snippets |
| docs/core/compatibility/core-libraries/10.0/snippets/bufferedstream-writebyte-flush/vb/Program.vb | Visual Basic code examples demonstrating the behavioral change and recommended migration |
| docs/core/compatibility/core-libraries/10.0/snippets/bufferedstream-writebyte-flush/vb/BufferedStreamWriteByteFlush.vbproj | Project file for Visual Basic code snippets |
| docs/core/compatibility/toc.yml | Added TOC entry for the breaking change under Core .NET libraries |
| docs/core/compatibility/10.0.md | Added index table entry for the breaking change |
BillWagner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After updating to .NET 10, this looks great.
Summary
This PR adds documentation for a breaking change in .NET 10 Preview 4 where
BufferedStream.WriteByteno longer performs an implicit flush when the internal buffer is full.Changes
New documentation file:
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.mdWriteBytewould automatically flush the bufferWritemethodsCode snippets: Created compilable C# and Visual Basic examples demonstrating:
snippets/bufferedstream-writebyte-flush/csharp/andsnippets/bufferedstream-writebyte-flush/vb/TOC and index updates:
toc.ymlunder Core .NET libraries (alphabetically ordered)10.0.mdindex with the breaking change entryContext
This change aligns
BufferedStream.WriteBytebehavior with otherWritemethods in theBufferedStreamclass (WriteandWriteAsync), which don't perform implicit flushes. The inconsistency could lead to unexpected performance issues or unintended side effects when working with streams sensitive to flush operations.Fixes #496356
References
Original prompt
Fixes #48913
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews