aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunction.java
Commit message (Collapse)AuthorAge
* Fix Fileset incrementality bug when Fileset consumes a generated file. The ↵Gravatar felly2018-02-05
| | | | | | | | | | | | | | | | 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
* Remove unused "pattern" feature in RecursiveFilesystemTraversalFunction.Gravatar felly2018-01-29
| | | | PiperOrigin-RevId: 183731563
* Fix usages of PathFragment segments that will become inefficient.Gravatar tomlu2018-01-19
| | | | | | | An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient. RELNOTES: None PiperOrigin-RevId: 182553098
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Couple of Fileset micro-optimizations:Gravatar kush2017-10-06
| | | | | | | | 1. Prevent a redundant map.get() in SkyframeFilesetManifestAction#establishSkyframeDependencies 2. Make a more memory efficient FilesetEntrykey instead of reusing the LegacySkyKey. RELNOTES: none PiperOrigin-RevId: 171222499
* Fix the strict-ordering of symlinks created with Filesets which was ↵Gravatar kush2017-10-06
| | | | | | | inadvartently lost due to https://github.com/bazelbuild/bazel/commit/d8ba904a3b0598e97601bc670840e39f21799ead RELNOTES: none PiperOrigin-RevId: 171204884
* Stop the transitive duplication of FilesetTraversalParams when Filesets are ↵Gravatar kush2017-09-25
| | | | | | | nested. RELNOTES: None PiperOrigin-RevId: 169723791
* Fix skyframe-native filesets to honor 'excludes' while in a directory traversal.Gravatar kush2017-08-17
| | | | | RELNOTES: None PiperOrigin-RevId: 165465128
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* Allow Skyframe graph lookups and value retrievals to throw InterruptedException.Gravatar Janak Ramakrishnan2016-08-16
| | | | | | | The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer. -- MOS_MIGRATED_REVID=130327770
* Avoid unnecessarily nesting FilesetTraversalParams if the nesting adds no ↵Gravatar Janak Ramakrishnan2016-08-02
| | | | | | | information. -- MOS_MIGRATED_REVID=129012839
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Refactor: ResolvedFile.getMetadata is now .getMetadataHash.Gravatar Laszlo Csomor2015-12-07
| | | | | | | | | | This is a subtle change that'll go a long way: there's a bug in the handling of directory symlinks (changes in the link target are not picked up) which I'll fix by combining the metadata hashes of all items in the directory, and use that as the directory symlink's metadata hash. -- MOS_MIGRATED_REVID=109564943
* Refactor ResolvedFile implementors: remove unnecessary Optional<> wrappers.Gravatar Laszlo Csomor2015-12-07
| | | | | | | Also remove unnecessary `type` members; they are constant. -- MOS_MIGRATED_REVID=109560348
* Refactoring: RecursiveFilesystemTraversalValue.ResolvedFile is now an interface.Gravatar Laszlo Csomor2015-12-04
| | | | | | | | | | | | | | This CL changes the class structure, moving from inheritance to implementation and composition. In particular, it turns the abstract base class ResolvedFile into an interface which the earlier subclasses now simply implement rather than extending it. This change makes the code cleaner: implementors may write more complicated getters (and that's my plan to do in a subsequent CL) instead of just returning the members. -- MOS_MIGRATED_REVID=109405650
* Fix a bug in the Google-internal rule "Fileset" (not in Bazel).Gravatar Laszlo Csomor2015-12-02
| | | | | -- MOS_MIGRATED_REVID=109195426
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Add the option to match by regexp in RecursiveFilesystemTraversal.Gravatar Janak Ramakrishnan2015-04-21
| | | | | -- MOS_MIGRATED_REVID=91642690
* Introduce a PackageBoundaryMode enum to FilesetTraversalParams.Gravatar Laszlo Csomor2015-02-12
| | | | | | | | | | | | | | This enables the introduction of a third behavior mode when RecursiveFilesystemTraversalFunction encounters a package boundary: on top of the existing cross/no-cross behavior, it can now bail out with an error. This is preparatory work to support Skyframe-native Filesets. The CL also contains a couple of prettifying cleanups (in ActionCacheChecker and in FilesetManifestAction). -- MOS_MIGRATED_REVID=86185105
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957