Skip to content
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

Closed

Conversation

github-actions[bot]
Copy link

Automatic backport to 2.13-maintenance, triggered by a label in #7447.

aakropotkin and others added 2 commits May 24, 2023 15:16
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)
@github-actions github-actions bot mentioned this pull request May 24, 2023
@roberth roberth mentioned this pull request May 24, 2023
8 tasks
* Fixup release notes
@edolstra
Copy link
Member

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.
Copy link
Member

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.

@infinisil
Copy link
Member

We generally don't backport features, only bug fixes. Feature PRs have more potential to introduce breakage.

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.

@roberth roberth mentioned this pull request Jul 31, 2023
@roberth
Copy link
Member

roberth commented Jul 31, 2023

It seems that backporting this solves the issue raised in

I'll rebase this to hopefully make CI pass.

@roberth roberth mentioned this pull request Jul 31, 2023
8 tasks
@edolstra edolstra closed this Aug 7, 2023
@edolstra edolstra deleted the backport-7447-to-2.13-maintenance branch March 29, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants