Giter Club home page Giter Club logo

Comments (5)

fgreinacher avatar fgreinacher commented on June 9, 2024 1

Can we improve the visibility of this breaking change in the changelog for version 18?

@vbreuss I added this to the release notes: https://github.com/TestableIO/System.IO.Abstractions/releases/tag/v18.0.1

from system.io.abstractions.

vbreuss avatar vbreuss commented on June 9, 2024

@cryolithic :
I am afraid, that we don't have any options to resolve your issue.

  • We intentionally changed the return type to a custom Stream class due to #779.
  • Directly using FileStream is not possible, as the class is sealed and directly affects the file system, so we cannot overwrite/replace it's functionality in the test class.
    So in order to work with Streams we had to replace them with a custom wrapper
  • Using an interface as in other factory classes (e.g. IFileStream) instead would also not help in your case, as FileStream does not implement it and we would no longer return a Stream at all...

What do you want to achieve with this test of yours?

from system.io.abstractions.

cryolithic avatar cryolithic commented on June 9, 2024

The method in question acts as a factory (implementation is a bit more complex, but the details shouldn't matter). It accepts a Stream, and creates a StorageProvider to match the specifics of the stream type as we have different behaviour for a FileStream vs say a MemoryStream.

I worked around it in my code, but any libraries that make a similar check will break when using Abstractions.

from system.io.abstractions.

vbreuss avatar vbreuss commented on June 9, 2024

@cryolithic:
Unfortunately I underestimated this impact in #906 and didn't mark it explicitely as breaking change in itself, so the major version got bumped due to the refactoring in general, but this change is not explicitely mentioned in the changelog.

I don't have any idea for a workaround that doesn't involve this breaking change. Do you?

@fgreinacher:
Can we improve the visibility of this breaking change in the changelog for version 18?

from system.io.abstractions.

fgreinacher avatar fgreinacher commented on June 9, 2024

I'll go ahead close this. Feel free to reopen/comment if anything else can be improved.

from system.io.abstractions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.