[Backport 2.13-maintenance] Read file type#8392
Closed
github-actions[bot] wants to merge 3 commits into2.13-maintenancefrom
Closed
[Backport 2.13-maintenance] Read file type#8392github-actions[bot] wants to merge 3 commits into2.13-maintenancefrom
github-actions[bot] wants to merge 3 commits into2.13-maintenancefrom
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)
Merged
* Fixup release notes
Member
|
We generally don't backport features, only bug fixes. Feature PRs have more potential to introduce breakage. |
edolstra
reviewed
May 31, 2023
| 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. |
Member
There was a problem hiding this comment.
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.
Member
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. |
Closed
Member
|
It seems that backporting this solves the issue raised in I'll rebase this to hopefully make CI pass. |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic backport to
2.13-maintenance, triggered by a label in #7447.