-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Backport 2.13-maintenance] Read file type #8392
[Backport 2.13-maintenance] Read file type #8392
Conversation
Allows checking directory entry type of a single file/directory. This was added to optimize the use of `builtins.readDir` on some filesystems and operating systems which cannot detect this information using POSIX's `readdir`. Previously `builtins.readDir` would eagerly use system calls to lookup these filetypes using other interfaces; this change makes these operations lazy in the attribute values for each file with application of `builtins.readFileType`. (cherry picked from commit 153ee46)
(cherry picked from commit 37c533e)
* Fixup release notes
We generally don't backport features, only bug fixes. Feature PRs have more potential to introduce breakage. |
file types from POSIX's `readdir`. In such cases the type of each file was | ||
discovered by making multiple syscalls. This change makes these operations | ||
lazy such that these lookups will only be performed if the attribute is used. | ||
This optimization affects a minority of filesystems and operating systems. |
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.
Note that this makes the release notes diverge between master and 2.13, e.g. the release notes for 2.13 in the online manual will not contain this entry.
I guess that's fair, though a builtin shouldn't cause problems. I'd appreciate it if this was backported but it's not crucial. |
It seems that backporting this solves the issue raised in I'll rebase this to hopefully make CI pass. |
Automatic backport to
2.13-maintenance
, triggered by a label in #7447.