aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunction.java
Commit message (Collapse)AuthorAge
* Introduce --strict_fileset_output which treats all output Artifacts ↵Gravatar felly2018-07-18
| | | | | | encountered in a Fileset as a regular file. PiperOrigin-RevId: 205152271
* Stop requiring the creation and storage of FileStateValues within ↵Gravatar kush2018-07-12
| | | | | | | | | ResolvedFile objects. While this does not eliminate the need for stat operation yet, it gets rid of one usage of the stat result (and is also a self contained change) RELNOTES: None PiperOrigin-RevId: 204417559
* Make the FileArtifactvalue of generated targets available via the ↵Gravatar kush2018-07-11
| | | | | | | | | | | | | | FilesetOutputSymlink whenever available. In this change I'm simply plumbing the FileArtifactValue we requested within RecursiveFilesystemTraversalFunction to the FilesetOutputSymlink. This does not work when the targets are output directories (or symlink to output dirs). The main scenarios this happens is when: 1. Fileset depends on the output dir created by a genrule. 2. Fileset depends on a GoAppengineBinary which creates an output dir. 3. Fileset depends on another Fileset in the non-recommended way (Fileset.entry.files = [<another_fileset>]) instead of the recommended way (FilesetEntry.srcdir = <another_fileset>). RELNOTES: None PiperOrigin-RevId: 204209612
* Refactoring: uses OutputService for ActionFileSystem injectionGravatar shahan2018-06-18
| | | | | | Moves more Action-oriented from skyframe package, which has become very unwieldy, to action package. This is needed to avoid circular dependencies caused when build-base is needed for skyframe. PiperOrigin-RevId: 200996982
* Refactoring: makes the code simpler by deleting Metadata and InputArtifactData.Gravatar shahan2018-06-06
| | | | | | (minor) ActionFS now implements MetadataProvider.getInput PiperOrigin-RevId: 199575194
* Replace LegacySkyKey by AbstractSkyKey or custom SkyKeys. AbstractSkyKey ↵Gravatar janakr2018-03-02
| | | | | | | | doesn't save memory in the 32-bit case, but makes it easier for people to see how many SkyKeys we have. There's some unnecessary interning in tests, but it was easier to copypasta and doesn't harm anything, I think. PiperOrigin-RevId: 187694309
* 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
* Rename relativePath -> rootRelativePath in Root and friends.Gravatar tomlu2018-01-19
| | | | | | This makes it clearer that the path fragments in question are relative *to the root*. Confusingly, when the root is absolute, the root relative fragment is also absolute. This makes it a tiny bit clearer that the path fragment may be absolute. PiperOrigin-RevId: 182544893
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Make FileSymlinkException and InconsistentFSException IOExceptionsGravatar ulfjack2018-01-12
| | | | | | | Most places handle them the same way as IOException, which seems like a safe default. The places that do care can still throw or catch the more specific type. PiperOrigin-RevId: 181719688
* 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
* Stop blaze crash due to a symlink cycle or unbounded expansion encounteredGravatar kush2017-08-30
| | | | | | | while traversing filesets. RELNOTES: None PiperOrigin-RevId: 166913262
* 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
* Refactor the Event class; always construct through static methods.Gravatar Ulf Adams2016-04-21
| | | | | -- MOS_MIGRATED_REVID=120418505
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Cleanup: use int instead of Integer in the RecursiveFilesystemTraversal classes.Gravatar Laszlo Csomor2015-12-07
| | | | | -- MOS_MIGRATED_REVID=109579490
* RecursiveFilesystemTraversalFunction now tracks changes in symlinked directory.Gravatar Laszlo Csomor2015-12-07
| | | | | | | | | | | | We achieve this by computing the directory symlink's metadata hash, which the Google-internal Fileset rule writes in the fileset_manifest file, from the hashes of all files under it. This adds complexity but is necessary, because the symlink's FileStateValue remains the same even if the directory's contents change, so the FileStateValue alone is inadequate to compute the metadata for the fileset_manifest. -- MOS_MIGRATED_REVID=109577723
* 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
* 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