diff options
author | Lukacs Berki <lberki@google.com> | 2015-08-28 07:40:04 +0000 |
---|---|---|
committer | Lukacs Berki <lberki@google.com> | 2015-08-28 09:23:15 +0000 |
commit | 05c5daacd8ffe1051471a6b9453c559aaed698fa (patch) | |
tree | 12fae75b1626e7fcd482e634574764e0f09536ec /src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java | |
parent | ff8fb25e9493adc280b458c3409430a5ac011919 (diff) |
Make dangling symlinks in external repositories work to some degree.
This seems to be the least insane approach within the following boundaries:
- Skyframe apparently doesn't allow GlobFunction to recover if FileFunction had already raised an exception that Skyframe knows about (this is somewhat surprising)
- I didn't want to change FileFunction not to throw an exception for dangling symlinks because this part of the code is scary
- I didn't want to revert to Skyframe-based symlink resolution for symlinks in immutable directories because that would be a performance hit
- I didn't want to write yet another symlink resolver and the two existing ones (FileSystem#resolveSymlinks() and and FileFunction#getSymlinkTargetRootedPath()) don't work: the former cannot resolve just one level of symlinks and the latter cannot do its job without adding Skyframe dependencies
I had to put in a placeholder value for realRootedPath when the FileValue represents a dangling symlink, because FileStateValue.create() relies on the symlink target being different than the symlink itself.
RELNOTES:
--
MOS_MIGRATED_REVID=101756189
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java')
0 files changed, 0 insertions, 0 deletions