-
Notifications
You must be signed in to change notification settings - Fork 260
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
refactor: split project in wrapper and abstraction #905
refactor: split project in wrapper and abstraction #905
Conversation
…O.Abstractions" and "TestableIO.System.IO.Wrappers"
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.
Looks great, thanks @vbreuss!
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
|
@vbreuss Can you support here? 🙇♂️ |
I will have a look at it tomorrow! |
@rcdailey :
and used a simple unit test that references the [Fact]
public void Test1()
{
IFileSystem fileSystem = new MockFileSystem();
IFileInfo fileInfo = 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 |
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? |
Will have a look later today! |
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! |
@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? |
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! |
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! |
Cool, thanks for the feedback! |
As suggested in this comment split the "System.IO.Abstractions" project into two projects:
TestableIO.System.IO.Abstractions
which contains just the interfaces
TestableIO.System.IO.Abstractions.Wrappers
which contains the wrapper implementations and uses the interface project
System.IO.Abstractions
is kept as an empty project which referencesTestableIO.System.IO.Abstractions.Wrappers
and used for backward compatibility