-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Factor out nix::maybeLstat
#10362
Factor out nix::maybeLstat
#10362
Conversation
This function is nice for more than `PosixSourceAccessor`. We can make a few things simpler with it. Note that the error logic slightly changes in some of the call sites, in that we also count `ENOTDIR` and not just `ENOENT` as not having the file, but that should be fine.
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.
Much nicer! I actually noticed this when reviewing the Windows branch and really liked it.
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.
One small documentation nit, but great otherwise! It's quite pleasant to see these C-isms a bit more confined :)
Feel free to merge once the doc is here
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.19-maintenance
git worktree add -d .worktree/backport-10362-to-2.19-maintenance origin/2.19-maintenance
cd .worktree/backport-10362-to-2.19-maintenance
git switch --create backport-10362-to-2.19-maintenance
git cherry-pick -x 8be347afcac8006967921e4738215d98405f6d75 3752bbef28899bc05e2e144fae5dcf37d99f86b5 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.20-maintenance
git worktree add -d .worktree/backport-10362-to-2.20-maintenance origin/2.20-maintenance
cd .worktree/backport-10362-to-2.20-maintenance
git switch --create backport-10362-to-2.20-maintenance
git cherry-pick -x 8be347afcac8006967921e4738215d98405f6d75 3752bbef28899bc05e2e144fae5dcf37d99f86b5 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.19-maintenance
git worktree add -d .worktree/backport-10362-to-2.19-maintenance origin/2.19-maintenance
cd .worktree/backport-10362-to-2.19-maintenance
git switch --create backport-10362-to-2.19-maintenance
git cherry-pick -x 8be347afcac8006967921e4738215d98405f6d75 3752bbef28899bc05e2e144fae5dcf37d99f86b5 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.20-maintenance
git worktree add -d .worktree/backport-10362-to-2.20-maintenance origin/2.20-maintenance
cd .worktree/backport-10362-to-2.20-maintenance
git switch --create backport-10362-to-2.20-maintenance
git cherry-pick -x 8be347afcac8006967921e4738215d98405f6d75 3752bbef28899bc05e2e144fae5dcf37d99f86b5 |
Successfully created backport PR for |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.19-maintenance
git worktree add -d .worktree/backport-10362-to-2.19-maintenance origin/2.19-maintenance
cd .worktree/backport-10362-to-2.19-maintenance
git switch --create backport-10362-to-2.19-maintenance
git cherry-pick -x 8be347afcac8006967921e4738215d98405f6d75 3752bbef28899bc05e2e144fae5dcf37d99f86b5 |
Git push to origin failed for 2.21-maintenance with exitcode 1 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.20-maintenance
git worktree add -d .worktree/backport-10362-to-2.20-maintenance origin/2.20-maintenance
cd .worktree/backport-10362-to-2.20-maintenance
git switch --create backport-10362-to-2.20-maintenance
git cherry-pick -x 8be347afcac8006967921e4738215d98405f6d75 3752bbef28899bc05e2e144fae5dcf37d99f86b5 |
Git push to origin failed for 2.21-maintenance with exitcode 1 |
Factor out `nix::maybeLstat` (cherry-picked from commit 9b88e52) Change-Id: Id890525e847c890fad6593c594772826ac4d1d50
Motivation
This function is nice for more than
PosixSourceAccessor
. We can make a few things simpler with it.Context
Note that the error logic slightly changes in some of the call sites, in that we also count
ENOTDIR
and not justENOENT
as not having the file, but that should be fine.Helps out with windows porting.
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.