aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java
Commit message (Collapse)AuthorAge
* 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
* Rollback of commit b776d6c12e952eb358c1a036cc9d93d8944c4c77.Gravatar Nathan Harmata2016-10-18
| | | | | | | *** Reason for rollback *** -- MOS_MIGRATED_REVID=136448178
* Don't bother getting the not-real FileStateValue for a path whose parent ↵Gravatar Nathan Harmata2016-10-18
| | | | | | | | | doesn't exist. In addition to saving a filesystem operation, this removes a source of a potential filesystem inconsistency. -- MOS_MIGRATED_REVID=136355008
* Rollback of commit 0c7a42a09d85ddffd9b860bcb31e4c43a00632c1.Gravatar Nathan Harmata2016-10-17
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** [] *** Original change description *** Slight refactor of ExternalFilesHelper: -Make FileType and ExternalFileAction public. -Have producers use ExternalFileAction, rather than a boolean, to specify the desired behavior. And a big change in semantics (doesn't affect Bazel): -Replace ExternalFileAction.ERROR_OUT with ExternalFileAction.ASSUME_NON_EXISTENT_AND_IMMUTABLE, which does what it sounds like. This new action, like the old ERROR_OUT, is _not_ used in Bazel. -- MOS_MIGRATED_REVID=136206810
* Slight refactor of ExternalFilesHelper:Gravatar Nathan Harmata2016-10-14
| | | | | | | | | | | -Make FileType and ExternalFileAction public. -Have producers use ExternalFileAction, rather than a boolean, to specify the desired behavior. And a big change in semantics (doesn't affect Bazel): -Replace ExternalFileAction.ERROR_OUT with ExternalFileAction.ASSUME_NON_EXISTENT_AND_IMMUTABLE, which does what it sounds like. This new action, like the old ERROR_OUT, is _not_ used in Bazel. -- MOS_MIGRATED_REVID=136063159
* 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
* Provide descriptive error messages on external mutable source files ↵Gravatar Googler2016-03-29
| | | | | | | | | encountered during a build Currently when evaluating a file or symlink leading to an external mutable object, Blaze throws an exception with unclear messages. The message does not contain the actual path but rather [/]/[] instead. This change updates FileFunction to allow bubbling up the error with the accurate path. -- MOS_MIGRATED_REVID=118381323
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Don't treat external files as immutableGravatar Kristina Chodorow2015-12-08
| | | | | | | | | Fixes #352. RELNOTES: Files in external repositories are now treated as mutable, which will make the correctness guarantees of using external repositories stronger (existent), but may cause performance penalties. -- MOS_MIGRATED_REVID=109676408
* Removed unused FileFunctionException constructorGravatar Michajlo Matijkiw2015-11-13
| | | | | -- MOS_MIGRATED_REVID=107726105
* Fix two uses of generics that are causing errors in Eclipse for me.Gravatar Ulf Adams2015-10-19
| | | | | -- MOS_MIGRATED_REVID=105742091
* Automated [] rollback of [] + merge with []Gravatar Nathan Harmata2015-10-13
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Original CL uncovered a depot issue which was fixed in []. I verified it was the only such issue (see []). *** Original change description *** Rollback of commit f87a414a6bf50613a2c419e53a96f76154f44ae3. *** Reason for rollback *** Rolling back until [] is submitted and we have verified that there are no other breakages *** Original change description *** Handle the case of infinite symlink expansion where a path in a symlink chain is a symlink to an ancestor of a path in the chain. -- MOS_MIGRATED_REVID=105251788
* Refactor cycle related skyvalues to use shared empty valueGravatar Michajlo Matijkiw2015-10-13
| | | | | | | | | | | Previously the cycle values (were supposed to) share a common abstract base class, however usage was inconsistent. Instead refactor to eliminate the specialized value classes, remove the abstract class, and share a common empty placeholder value, which should be useful for future/other current empty values. -- MOS_MIGRATED_REVID=105217399
* Rollback of commit 0f1b041c23e7cc3a2af4bb47a6cd1f3a331b5a4f.Gravatar Shreya Bhattarai2015-10-12
| | | | | | | | | | | | | *** Reason for rollback *** Rolling back until [] is submitted and we have verified that there are no other breakages *** Original change description *** Handle the case of infinite symlink expansion where a path in a symlink chain is a symlink to an ancestor of a path in the chain. -- MOS_MIGRATED_REVID=105080445
* Handle the case of infinite symlink expansion where a path in a symlink ↵Gravatar Nathan Harmata2015-10-09
| | | | | | | chain is a symlink to an ancestor of a path in the chain. -- MOS_MIGRATED_REVID=104969893
* Reintroduce an inconsistency check (albeit, in a weaker form) removed by a ↵Gravatar Nathan Harmata2015-09-30
| | | | | | | previous change that was trying to optimize away a filesystem call. -- MOS_MIGRATED_REVID=104246368
* 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
* Allow Skylark import lookup values to be computed inline in order to avoid ↵Gravatar Janak Ramakrishnan2015-09-24
| | | | | | | reifying them in the Skyframe graph. -- MOS_MIGRATED_REVID=103758591
* Minor simple optimization in FileFunction: don't bother getting a ↵Gravatar Nathan Harmata2015-09-14
| | | | | | | FileStateValue for a path realpath 'parent/child' if 'parent' is known to not exist. This saves a stat for each ancestor path. -- MOS_MIGRATED_REVID=102881929
* Make dangling symlinks in external repositories work to some degree.Gravatar Lukacs Berki2015-08-28
| | | | | | | | | | | | | | | | | 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
* Elegantly handle unbounded file symlink resolutions, e.g. 'a' -> 'b' -> ↵Gravatar Nathan Harmata2015-07-29
| | | | | | | 'a/nope'. -- MOS_MIGRATED_REVID=99337668
* Proper support for the external immutable directory mechanism for symlink ↵Gravatar Nathan Harmata2015-03-25
| | | | | | | chains. -- MOS_MIGRATED_REVID=89511018
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957