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.
puffnfresh
left a comment
There was a problem hiding this comment.
Much nicer! I actually noticed this when reviewing the Windows branch and really liked it.
thufschmitt
left a comment
There was a problem hiding this comment.
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
ENOTDIRand not justENOENTas 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.