Skip to content

feat: Add LinkTarget to FileSystemInfo for .NET 6 targets - #790

Merged
fgreinacher merged 8 commits into
TestableIO:mainfrom
BrianMcBrayer:bug/add-link-target-file-system-info
Jan 11, 2022
Merged

feat: Add LinkTarget to FileSystemInfo for .NET 6 targets#790
fgreinacher merged 8 commits into
TestableIO:mainfrom
BrianMcBrayer:bug/add-link-target-file-system-info

Conversation

@BrianMcBrayer

Copy link
Copy Markdown
Contributor

Overview

In .NET 6, additional symlinks support was added to FileSystemInfo. This PR adds at least one of those properties here, the LinkTarget property.

See #789

We need to discuss the mock portion of this though as I'm not sure how this codebase expects that.

@BrianMcBrayerBrianMcBrayer changed the title Add LinkTarget to FileSystemInfo for .NET 6 targetsfeat: Add LinkTarget to FileSystemInfo for .NET 6 targetsJan 7, 2022
@BrianMcBrayer

Copy link
Copy Markdown
ContributorAuthor

I think that this is probably a minor version bump, since it adds to the API without changing existing APIs? But I'm not sure.

Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileInfo.cs Outdated

@fgreinacherfgreinacher 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 a lot @BrianMcBrayer! Left some comments inline

Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions/DirectoryInfoWrapper.cs Outdated
Comment threadsrc/System.IO.Abstractions/FileInfoWrapper.cs Outdated
Comment threadsrc/System.IO.Abstractions/FileSystemInfoBase.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileInfo.cs Outdated
@BrianMcBrayer

Copy link
Copy Markdown
ContributorAuthor

Thank you! I'll try to update it all today

@BrianMcBrayerBrianMcBrayer left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I think I addressed all the comments

Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions/DirectoryInfoWrapper.cs Outdated
Comment threadsrc/System.IO.Abstractions/FileInfoWrapper.cs Outdated
Comment threadsrc/System.IO.Abstractions/FileSystemInfoBase.cs Outdated
@BrianMcBrayer
BrianMcBrayer marked this pull request as ready for review January 8, 2022 16:35
@BrianMcBrayer

Copy link
Copy Markdown
ContributorAuthor

Note that this PR is pending #791 because of the enhancements that will add to MockFileInfo

@fgreinacherfgreinacher 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.

Looking very good @BrianMcBrayer 👍

Happy to merge after you rebased/adapted the Mock implementation!

Brian McBrayer added 3 commits January 10, 2022 10:49
…st snapshots as well. Added mock stubs, but we need to discuss what a better mock implementation would look like.
@BrianMcBrayer
BrianMcBrayerforce-pushed the bug/add-link-target-file-system-info branch from 2ffb094 to 467a1c4CompareJanuary 10, 2022 15:52
@BrianMcBrayer

Copy link
Copy Markdown
ContributorAuthor

@fgreinacher it should be all updated to the latest mocking standards. Let me know if there are any additional changes needed though! Otherwise, I think it's ready to merge after checks pass.

@fgreinacherfgreinacher 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.

@BrianMcBrayer Thanks again, I left some minor suggestions. Please also bump the minor version in https://github.com/BrianMcBrayer/System.IO.Abstractions/blob/bug/add-link-target-file-system-info/version.json#L3 to indicate the new feature.

Comment threadDirectory.Build.props Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileData.cs Outdated
Comment threadsrc/System.IO.Abstractions.TestingHelpers/MockFileInfo.cs Outdated
BrianMcBrayerand others added 4 commits January 11, 2022 12:17
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
@BrianMcBrayer

Copy link
Copy Markdown
ContributorAuthor

@fgreinacher I accepted your review comments. Can't believe I didn't indent those things correctly. I think the conditional comments threw me off, which is silly.

@fgreinacherfgreinacher 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 a ton @BrianMcBrayer and no worries about the minor style issues.

Please bump the minor version in https://github.com/BrianMcBrayer/System.IO.Abstractions/blob/bug/add-link-target-file-system-info/version.json#L3 to indicate the new feature. I would have done this myself but cannot commit to your branch (you can allow that by ticking the "Allow edits and access to secrets by maintainers" checkbox on the right).

@fgreinacher
fgreinacher enabled auto-merge (squash) January 11, 2022 20:35

@fgreinacherfgreinacher 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.

Looking great now, thanks for addressing everything so quickly!

@fgreinacher
fgreinacher merged commit ba59ebe into TestableIO:mainJan 11, 2022
@BrianMcBrayer
BrianMcBrayer deleted the bug/add-link-target-file-system-info branch January 11, 2022 21:23
@github-actions

Copy link
Copy Markdown

This is addressed in release v16.1.1.

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

Labels

state: releasedIssues that are released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BrianMcBrayer@fgreinacher