-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
FileSystemEntry.Attributes property is not correct on Unix #37301
Comments
Was this just an oversight in dotnet/corefx#34560 |
@davidkaya @danmosemsft @JeremyKuhne Could you please look the issue? I'd be happy to get the fix for PowerShell. |
@danmosemsft Yes, this looks like an oversight. We should add a comment in both places pointing out the connection if we can't share the code. @iSazonov I'm no longer on the libraries team, but this should clearly be consistent between the two. @carlossanlop will have to decide the best course of action on throwing. If we can be confident on checking that it isn't supported than throwing seems reasonable to me at first glance. |
If the fix is "to throw" the issue should be fixed in 5.0 milestone - later it will be a breaking change. |
@carlossanlop I have not possibility to develop on Unix :-( |
@iSazonov even with WSL 2 ? 😃 |
@danmosemsft I would like, but my laptop is against 😃 |
@carlossanlop Can we re-open the issue? |
@daxian-dbw hit this when trying to move Powershell to RC1. Here's the test we should ensure works well when we address this for 6.0:
In WSL2 if that takes more than a couple hundred milliseconds, there's a problem. (In .NET 5 RC1 it is ~2.5 seconds due to all the stating.) |
I wonder how you weight this:
|
@iSazonov Thanks for the comment and feedback. The priority is based on our overall themes and the relative priority of fixing this issue compared to completing other items that the team is committing to for 6.0.0. Even with |
@jeffhandley Thanks for clarify! I am trying to speed up PowerShell Core file operation and I hope we get this in the PowerShell milestone. So I have many concerns about .Net file API design and performance. Feel free to ping me when will your team start this work. |
@iSazonov What timing would enable you to utilize this fix in the PowerShell milestone you're targeting? |
@jeffhandley MSFT PowerShell team said they want to stop big changes before summer and then work only on bugs and stability. |
Update: It should be File Flags. Extended Attributes is another conception. |
Description
Comes from PowerShell/PowerShell#12834 where custom file enumerator is replaced with .Net FileSystemEnumerator.
Expectation is that:
It turns out the first has a simplified implementation
runtime/src/libraries/System.IO.FileSystem/src/System/IO/Enumeration/FileSystemEntry.Unix.cs
Lines 69 to 84 in bd6cbe3
than the second
runtime/src/libraries/System.IO.FileSystem/src/System/IO/FileStatus.Unix.cs
Lines 76 to 91 in bd6cbe3
Also CHFLAGS works only on BSD-like systems (MacOS, FreeBSD) but not on Linux. So expectation is that assigning Hidden flag on Linux throws PlatformNotSupportedException - it was very amazing to discover that some PowerShell tests are passed on Linux but really Hidden flag does not work.
The text was updated successfully, but these errors were encountered: