diff options
author | 2018-02-05 11:11:53 -0800 | |
---|---|---|
committer | 2018-02-05 11:13:48 -0800 | |
commit | 5be4dd62ee5d7bf3730ab2099829dc7f87ef2e94 (patch) | |
tree | 661529438d75ab969c46002b7638cafc50527465 /src/main/tools/linux-sandbox.h | |
parent | 8b17efaf80a056d88ec17f3b5d0284dcf149fcb8 (diff) |
Fix Fileset incrementality bug when Fileset consumes a generated file. The native skyframe implementation was actually quite incorrect in this case: It was adding a skyframe dependency on a FileValue for the output file. Without a transitive dependency on the source files and actions that determine the output file's state, this could never work (and explains why the incremental build would fail). Instead, we now depend on the Artifact corresponding to the output file instead.
This change updates the business logic RecursiveFilesystemTraversalFunction. This approach keeps the business logic of Fileset filesystem traversal centralized in RFTF.
To avoid making weird recursive Skyframe nodes in the output tree, we inline Skyframe dependencies and do direct filesystem operations over the output tree.
There are now three states we can be in when looking up a file:
1. Source file: As before, make a skyframe dep on the corresponding file
2. Top-level file of an output tree: Make a dep on the corresponding Artifact
3. Recursive file under an output directory: Do direct filesystem operations. It doesn't make sense to make Skyframe nodes corresponding to these files. In the future, I think we should consider failing fast on this case.
RELNOTES: None
PiperOrigin-RevId: 184556044
Diffstat (limited to 'src/main/tools/linux-sandbox.h')
0 files changed, 0 insertions, 0 deletions