forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[engine] Use scandir, and preserve symlink paths in output
This patch fixes an issue where symlinked directories and files were resolved to their canonical names during execution. That meant that a glob for `d.ln/2.txt` (where `d.ln` was a symlink to a directory `a`) might result in a match for the path `a/2.txt`. Instead, users expect that the symlink is treated as if it had the same type as the underlying file. Additionally, this review switches to using `scandir` to compute directory listings, which should result in 1 syscall per directory listing, rather than N+1. - Convert `Path` into a holder for a symbolic name and the `Stat` that underlies it. - Generate directory listings via scandir: fewer syscalls, and fewer FilesystemNodes. - Satisfy a point lookup for a literal Path using the directory listing that contains it (to allow the same underlying syscall to be reused there). - Preserve file ordering in EagerFilesetWithSpec, and cover with a test (resolves [pantsbuild#3497](pantsbuild#3497).) Testing Done: http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3575/5/ Bugs closed: 3497, 3575 Reviewed at https://rbcommons.com/s/twitter/r/3991/
- Loading branch information
Showing
39 changed files
with
562 additions
and
478 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.