Skip to content

refactor: extract ACL related functionality#913

Merged
mergify[bot] merged 32 commits into
TestableIO:mainfrom
vbreuss:topic/extract-acl-related-functionality
Dec 8, 2022
Merged

refactor: extract ACL related functionality#913
mergify[bot] merged 32 commits into
TestableIO:mainfrom
vbreuss:topic/extract-acl-related-functionality

Conversation

@vbreuss

@vbreuss vbreuss commented Nov 15, 2022

Copy link
Copy Markdown
Member

Remove the ACL-Features from the interfaces and instead implement them as extension methods implemented in "TestableIO.System.IO.Abstractions.Wrappers".

This removes the dependency on System.IO.FileSystem.AccessControl from the interface project.

This is part of the approach discussed in #883

BREAKING CHANGE: This refactoring removes ACL-related methods from the interface project and replaces them with extension methods in TestableIO.System.IO.Abstractions.Wrappers.

@vbreuss

vbreuss commented Nov 15, 2022

Copy link
Copy Markdown
Member Author

@fgreinacher :
I finished part 1 of the next PR. Could you please have a look?

@fgreinacher fgreinacher self-requested a review November 15, 2022 14:02
Comment thread src/System.IO.Abstractions.TestingHelpers/MockFileInfo.cs
Comment thread src/System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs
@fgreinacher

Copy link
Copy Markdown
Contributor

I'll have a deeper look at this by the middle of the week.

@siprbaum Do you want to do another pass?

Comment thread src/System.IO.Abstractions.TestingHelpers/FileSystemExtensibility.cs Outdated
Comment thread src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryAclExtensions.cs Outdated
Comment thread src/TestableIO.System.IO.Abstractions.Wrappers/FileAclExtensions.cs Outdated
- Replace IFileSystemExtensibility with IFileSystemAclSupport
Comment thread src/System.IO.Abstractions.TestingHelpers/FileSystemExtensibility.cs Outdated
Comment thread src/System.IO.Abstractions.TestingHelpers/MockDirectoryData.cs Outdated
Comment thread src/System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs Outdated
Comment thread src/System.IO.Abstractions.TestingHelpers/MockFileData.cs Outdated
@vbreuss

vbreuss commented Nov 27, 2022

Copy link
Copy Markdown
Member Author

@fgreinacher :
I think it would be good to finish this PR before bumping the major version in #919, as this PR also changes the dependencies...

@fgreinacher

Copy link
Copy Markdown
Contributor

@fgreinacher : I think it would be good to finish this PR before bumping the major version in #919, as this PR also changes the dependencies...

@vbreuss I'd like to push out a clean v18 first. We can then just bump major again for this change, no problem :)

@vbreuss

vbreuss commented Nov 28, 2022

Copy link
Copy Markdown
Member Author

@fgreinacher : I think it would be good to finish this PR before bumping the major version in #919, as this PR also changes the dependencies...

@vbreuss I'd like to push out a clean v18 first. We can then just bump major again for this change, no problem :)

@fgreinacher: I merged the latest changes from main including the v18 refactoring.
I am not sure, if the change really needs a major version bump; it just removes a reference, from the interface and replaces it with extension methods. However, if somebody only uses the interface project (which didn't exist previously), the ACL-methods are now missing...

@fgreinacher fgreinacher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your rework @vbreuss - I like it a lot know.

I have a few small suggestions/questions and then we're good to go 🚀

Comment thread src/System.IO.Abstractions.TestingHelpers/FileSystemExtensibility.cs Outdated
Comment thread src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileData.cs Outdated
Comment thread src/TestableIO.System.IO.Abstractions/IFileSystemAclSupport.cs Outdated
@fgreinacher

fgreinacher commented Dec 1, 2022

Copy link
Copy Markdown
Contributor

I am not sure, if the change really needs a major version bump; it just removes a reference, from the interface and replaces it with extension methods. However, if somebody only uses the interface project (which didn't exist previously), the ACL-methods are now missing...

It will break people that are currently mocking the methods on the interface level, so I'd rather bump major to not surprise folks :)

Could you bump version.json to 19.0 and update the description to include a BREAKING CHANGE notice like in #919?

@vbreuss

vbreuss commented Dec 2, 2022

Copy link
Copy Markdown
Member Author

I am not sure, if the change really needs a major version bump; it just removes a reference, from the interface and replaces it with extension methods. However, if somebody only uses the interface project (which didn't exist previously), the ACL-methods are now missing...

It will break people that are currently mocking the methods on the interface level, so I'd rather bump major to not surprise folks :)

Could you bump version.json to 19.0 and update the description to include a BREAKING CHANGE notice like in #919?

@fgreinacher :
I implemented your review comments and updated version to 19.0!

@vbreuss vbreuss requested a review from fgreinacher December 8, 2022 10:32

@fgreinacher fgreinacher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @vbreuss 🎉

@mergify mergify Bot merged commit 24d1d07 into TestableIO:main Dec 8, 2022
@github-actions

github-actions Bot commented Dec 8, 2022

Copy link
Copy Markdown

This is addressed in release v19.0.1.

@github-actions github-actions Bot added the state: released Issues that are released label Dec 8, 2022
@github-actions

Copy link
Copy Markdown

This is addressed in release v19.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: released Issues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants