Comments (11)
The type change was to remedy a long-standing problem with many users needing to cast the returned MemoryStream back to RecyclableMemoryStream. The original design was to completely abstract that away, as this is meant to be a drop-in replacement for MemoryStream, however I think this was a mistake, as enough functionality diverges that the API should give direct access to the RMS without additional casting.
I understand it's a major breaking change, but this library is only getting more popular, and it would be better to suffer the pain sooner rather than later and correct the original deficiency rather than live with it indefinitely.
Also note, that this library is not part of the .NET core libraries and does not adhere to the same standards for breaking changes, nor necessarily follows any other processes specific to that project.
from microsoft.io.recyclablememorystream.
Some types of breaking changes are expected (like removing obsolete types/methods), but not these - the changed return type on RecyclableMemoryStreamManager.GetStream
methods will cause a dll hell where it's impossible to upgrade from 2.x to 3.x without recompiling and updating all packages that depend on Microsoft.IO.RecyclableMemoryStream
at the same time.
Which in turn means that no-one can upgrade to 3.x because they would cause a binary breaking change for all their downstream dependencies. So OfficeOpenXml
(or anything else that depends on Microsoft.IO.RecyclableMemoryStream) will basically be forever locked to 2.x version.
from microsoft.io.recyclablememorystream.
Which in turn means that no-one can upgrade to 3.x .... will basically be forever locked to 2.x version.
Not true. Major/binary changes will always be major/binary. So it has always been and will always be with absolutely any packages and their dependencies. RMS 3.0 changes is not any special situation here. Life goes on.
from microsoft.io.recyclablememorystream.
Nevertheless I still don't understand what you expect/suggest and what are you complaining about. Do not make breaking changes at all? As @benmwatson said
With major version changes, breaking changes are expected. They happen all the time with most libraries.
I'm suggesting avoiding binary breaking changes for non-obsolete APIs that are in active use. Yes, there are different kinds of breaking changes happening with major releases, but a ABI break for a core API will cause an extremely painful DLL hell (potentially even bifurcation - there have been examples where some packages had a major ABI break and it took many years and uncountable number of lost brain cells before it was finally forgotten).
An ABI break falls in bucket 1 according to .NET rules: https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/breaking-changes.md
As for the specific API RecyclableMemoryStreamManager.GetStream
, I'm suggesting reverting the return type change.
from microsoft.io.recyclablememorystream.
Planned here - #258
from microsoft.io.recyclablememorystream.
Actually #165 was issued in June 2021 and @benmwatson carefully postponed it for v3.
from microsoft.io.recyclablememorystream.
Is there a specific proposal in mind?
With major version changes, breaking changes are expected. They happen all the time with most libraries.
That project will need to be rebuilt with v3.0 or stay on v2.x to maintain compatibility.
from microsoft.io.recyclablememorystream.
Staying with old versions of code that no one maintains is a recipe for future disasters security-wise
Plus at some point some other package will require the new version of the RecyclableMemoryStream and cause a deadlock since the OpenXml one doesn't seem to close its issues list fast enough
from microsoft.io.recyclablememorystream.
Staying with old versions of code that no one maintains ....
Nevertheless I still don't understand what you expect/suggest and what are you complaining about. Do not make breaking changes at all? As @benmwatson said
With major version changes, breaking changes are expected. They happen all the time with most libraries.
from microsoft.io.recyclablememorystream.
Btw, where is the original rationale recorded for those breaking changes that shows the clear benefits they bring compared to the issues they can cause for users? Do you wake up one day and say let's break some API?
from microsoft.io.recyclablememorystream.
thanx for the extra info on the rationale, seems issue was with EPPlus (was confused since it is using OfficeOpenXml namespace for its ExcelPackage class). They seem to have fixed it with latest EPPlus NuGet package release (7.0.8)
as for missing constructors wonder if some compatibility optional package could have been released to host them (thought it might be more of a hack to pull it out transparently)
from microsoft.io.recyclablememorystream.
Related Issues (20)
- Question about how to use Recyclable memory stream manager HOT 6
- RMS v3.0 Planning HOT 3
- NullReferenceException possible with M.IO.RecyclableMemoryStream.Dispose(true) HOT 1
- Using memory stream with httpClient post HOT 3
- Is there a plan to contribute to the dotnet/runtime? HOT 4
- FeatureRequest: Add opt-in possibility to zeroed-out buffers HOT 10
- Continous benchmarking HOT 1
- Multiple StreamManagers in referenced libraries - how to find total memory usage HOT 1
- Large pool limit should apply to whole pool, not each slot HOT 1
- Humanitarian Organization Team mbrgi
- ResponseTime is almost doubled with RecyclableMemoryStream. HOT 5
- Question: GetStream copy existing buffer use case HOT 1
- How effective is this package for buffers that are usually smaller than 256 bytes? HOT 1
- Consider using ArrayPool<byte> as underlying storage mechanism HOT 4
- Guideline about cryptography with RMS HOT 5
- Unclear Documentation for MaximumFreeSmallPoolBytes
- Upgrade blocker: Recent change of GetStream() to return RecyclableMemoryStream instead of MemoryStream HOT 1
- why just pool MemoryStream HOT 2
- FileStreamResult: ObjectDisposedException: Cannot access a disposed object. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft.io.recyclablememorystream.