Uh oh!
There was an error while loading. Please reload this page.
refactor: split project in wrapper and abstraction - #905
Conversation
…O.Abstractions" and "TestableIO.System.IO.Wrappers"
Uh oh!
There was an error while loading. Please reload this page.
fgreinacher
left a comment
There was a problem hiding this comment.
Looks great, thanks @vbreuss!
rcdailey
commented
Nov 23, 2022
I'm really confused about this change. I'm getting tons of errors: And the dependencies are confusing as well: It seems like the goal was to add the
|
fgreinacher
commented
Nov 23, 2022
@vbreuss Can you support here? 🙇♂️ |
vbreuss
commented
Nov 24, 2022
I will have a look at it tomorrow! |
vbreuss
commented
Nov 25, 2022
@rcdailey : and used a simple unit test that references the [Fact]publicvoidTest1(){IFileSystemfileSystem=newMockFileSystem();IFileInfofileInfo=fileSystem.FileInfo.New("foo");Assert.False(fileInfo.Exists);}It runs as expected and also the dependencies look fine to me: What did I miss? |
I'm sorry for the complication. I thought this might be straightforward, but apparently not... My project is open source. Testing there might be the best option, since a simple MCVE doesn't seem to reproduce the issue. It's possible I'm doing something wrong. My project is here, along with the branch I'm testing the upgrade on: https://github.com/recyclarr/recyclarr/tree/system-io-abstractions-upgrade Steps to reproduce:
When I attempted to test this again, I noticed a new issue that wasn't there before. I'm not sure why it happens. When I do
I think we should analyze this first and see what is going on. If you do the same |
vbreuss
commented
Nov 26, 2022
Thanks @rcdailey for the explanation and the repo! I think it relates to the I could also reproduce the same error in my test project: @fgreinacher : Can we create a new version of TestableIO.System.IO.Abstractions.Extensions, which references the interface project? |
gigi81
commented
Nov 26, 2022
Will have a look later today! |
rcdailey
commented
Nov 26, 2022
I appreciate everyone looking into this. One last item I think would be nice: Documentation. It's unclear to me which packages I should be using. If it's just a matter of prepending Thanks again everyone! |
vbreuss
commented
Nov 27, 2022
@fgreinacher : wouldn't it be better to apply the same change on the TestingHelpers project? I think it would make the package naming more consistent! What do you think? |
fgreinacher
commented
Nov 27, 2022
Thanks for the feedback @rcdailey, appreciated! I have actually expected that this change is transparent to users, but I think there are a few cases like yours where this is actually a breaking change and we should have bumped the major version before releasing it. I therefore marked
Yes, full ack! I will do that as part of the PR! |
rcdailey
commented
Dec 4, 2022
Just wanted to write back and let you all know everything is working great now. I upgraded to all the latest as of today and no more issues! Thank you all for the quick turnaround! |
fgreinacher
commented
Dec 4, 2022
Cool, thanks for the feedback! |




As suggested in this comment split the "System.IO.Abstractions" project into two projects:
TestableIO.System.IO.Abstractionswhich contains just the interfaces
TestableIO.System.IO.Abstractions.Wrapperswhich contains the wrapper implementations and uses the interface project
System.IO.Abstractionsis kept as an empty project which referencesTestableIO.System.IO.Abstractions.Wrappersand used for backward compatibility