-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Removing Hardlink from Mode property in default file system format #8789
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
Conversation
62e83be to
badf4c4
Compare
src/System.Management.Automation/FormatAndOutput/DefaultFormatters/FileSystem_format_ps1xml.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/FormatAndOutput/DefaultFormatters/FileSystem_format_ps1xml.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
|
@powercode The change looks good in general. Could you also put a before and after of how the output of |
|
@powercode Could also have a look at the CodeFactor issue, some on them are about documentation and formating. Would be nice to get those fixed. |
|
symlinks will still appear in the default view, right? |
|
@JamesWTruher Yes, symlinks appear as an |
|
The build errors seem unrelated to my change. Is there a way to trigger a build without a new commit? |
|
@powercode Restarted the CI. |
|
@powercode Please respond to the committee recommendation about re-using the |
|
@adityapatwardhan I'm on it :) Is this what we want, or should I skip the Link resolution? |
|
@powercode yes, that's perfect! |
|
@SteveL-MSFT I'm playing now with moving AddScriptBlockColumn into hidden code properties. Seems to be a bit faster to. Any reason not to do that? The Name string needed it to get to the internal methods for Link management. |
88b6d93 to
35a425f
Compare
|
A bit of feature creep here :) Feel free to pick the commits you want! |
35a425f to
9cbd8d8
Compare
|
@powercode Please have a look at the test failure |
SteveL-MSFT
left a comment
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.
We should have some tests validating the formating changes
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
|
I consider the remaining CodeFactor issues to be noise, and the CI static analysis seem to complain about spelling in MD files. |
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
iSazonov
left a comment
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.
@SteveL-MSFT Has PowerShell Committee approved new public APIs?
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
|
This is what the default view and the |
63bd965 to
15b1144
Compare
|
@powercode I have pushed changes to convert the new xUnit tests to Pester. I also rebased to master to resolve some merge conflicts. Please have a look if I have missed something. And thank you for your patience. |
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/namespaces/FileSystemProvider.cs
Outdated
Show resolved
Hide resolved
| } | ||
| return Platform.IsWindows | ||
| ? fileInfo.Attributes.HasFlag(System.IO.FileAttributes.ReparsePoint) | ||
| : Platform.NonWindowsIsSymLink(fileInfo); |
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.
I wonder why we use Platform.IsWindows not #if UNIX?
The only code path that used multiple return values was !CORECLR. I removed the obsolete #ifdef-ed code.
|
I adressed @daxian-dbw's feedback. |
|
@daxian-dbw Can you update your review? |
daxian-dbw
left a comment
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.
LGTM
|
@daxian-dbw You won the race! |
|
@powercode Thanks for your contribution and patience! |
|
How will a normal person using Powershell, know that these FT views exist? |
|
@lukeb1961 Please open a feature request (for tab completion) and/or doc isuue. |
Adding a new table view,
childrenWithHardlink, that has the same behavior aschildrenview had before this PR.The
childrenview now uses the modifiedModeWithoutHardlinkproperty that doesn't check for hardlinks when setting thelletter ofModecolumn.The
Modeproperty keeps it's existing behavior, so this change should not be breaking.PR Summary
#8051
Significant speedup for default filesystem output
Formatting result
Output before
Output after
produces the old output.
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.[feature]to your commit messages if the change is significant or affects feature tests