aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe
Commit message (Collapse)AuthorAge
* Relax invariant that an action's inputs discovered during execution must be ↵Gravatar Janak Ramakrishnan2015-07-01
| | | | | | | | | included in the action's inputs as found during the input discovery phase. We still require that no new metadata be discovered -- in other words, the "new" inputs are likely just symlinks to old inputs, with different nominal paths. -- MOS_MIGRATED_REVID=97257026
* Move dependency declaration out of finally block.Gravatar Janak Ramakrishnan2015-07-01
| | | | | | | This means that we will not declare additional dependencies if the action fails to execute, but that's correct -- if the action fails to execute, its inputs aren't updated, so there's nothing we'd discover. -- MOS_MIGRATED_REVID=97255120
* Skylark: only allow rules that are exportedGravatar Francois-Rene Rideau2015-06-30
| | | | | | | | | | For the purpose of package serialization (that will be necessary for caching), only accept to use RuleFunction-s (as defined by skylark's rule() function) that have been exported from a .bzl file with foo = rule(...), using a finalization pass that walks exported identifiers and blesses RuleFunction-s. -- MOS_MIGRATED_REVID=97236441
* Extract RecursiveDirectoryTraversalFunction from RecursivePkgFunctionGravatar Mark Schaller2015-06-30
| | | | | | | | | | RecursivePkgFunction has a nice framework for doing work across a directory structure that would be nice to have access to when writing other similar SkyFunctions. This extracts that general framework, and changes RecursivePkgFunction into a specialization of it. -- MOS_MIGRATED_REVID=97231974
* Remove BuildConfiguration.cacheKey() and replace .shortCacheKey() with a ↵Gravatar Lukacs Berki2015-06-29
| | | | | | | | | | | .checksum() method that is computed from the checksum of the build options. Also remove Fragment.cacheKey() and Fragment.getName(). The reasoning is that within a single build, if two BuildConfigurations share the same BuildOptions, they must be the same because BuildConfiguration can only be a function of BuildOptions, specific targets (which stay the same during a build) and BlazeDirectories (which stay the same during the lifetime of a server). Between different builds if the configurations are recreated, they will always be considered different because Java reference equality (==) is used for comparing BuildConfigurations. Also remove "Serializable" tags from configuration-related things. -- MOS_MIGRATED_REVID=97107881
* Make split configuration transitions work with Bazel.Gravatar Lukacs Berki2015-06-29
| | | | | | | Creating the split configurations in Bazel uncovered an incrementality issue: ConfigurationFactory.hostConfigCache kept state between builds untracked by Skyframe, which is not good, and therefore had to be fixed. -- MOS_MIGRATED_REVID=97106917
* Refactor HOST configuration transitions to be dynamic-configuration friendly.Gravatar Greg Estren2015-06-29
| | | | | | | | | Dynamic configuration transitions require access to Skyframe (since they instantiate BuildConfigurations as Skyframe nodes). There are various places in Bazel where static transitions are done with no convenient Skyframe access. This cl shuffles host transitions, in particular, to places that are more amenable. This change also assumes one host configuration per invocation. While this isn't strictly true (each target configuration can have its own host, and multiple target configurations are possible per build), we don't leverage that functionality in any meaningful way today. So until we have a proper interface for multiple host configurations, let's not block dynamic config progress on it. -- MOS_MIGRATED_REVID=97008479
* Refactoring of SkyframeTargetPatternEvaluator. Now instead of making ↵Gravatar Marian Lobur2015-06-29
| | | | | | | separate calls to skyframeExecutor for each target patterns, all of them are computed in one call. -- MOS_MIGRATED_REVID=96973513
* Remove unused SkyFunctionName isComputed.Gravatar Michajlo Matijkiw2015-06-26
| | | | | | | | | Removing since we don't appear to need it. Replaced SkyFunctionName.computed with create to simplify changing everything. Moved all constructors using new to use create for consistency. Chose create over new since it was less changes. -- MOS_MIGRATED_REVID=96914199
* Make generate_workspace dump transitive dependencies for Maven artifactsGravatar Kristina Chodorow2015-06-25
| | | | | | | | | | | This moves the WORKSPACE-parsing code out of WorkspaceFileFunction.java so generate_workspace can parse a WORKSPACE into an ExternalPackage without having to muck with Skyframe. Addresses issue #89. -- MOS_MIGRATED_REVID=96777708
* Refactor reusable target parsing functions from RPPBTPRGravatar Mark Schaller2015-06-23
| | | | | | | | Adds them to TargetPatternResolverUtil alongside other useful target parsing utility functions. -- MOS_MIGRATED_REVID=96611975
* Extract, reuse excluded directory assertionGravatar Mark Schaller2015-06-23
| | | | | | | Also adds tests for it. -- MOS_MIGRATED_REVID=96572991
* Doc cleanup for PDOPV, re: its change pruning behaviorGravatar Mark Schaller2015-06-23
| | | | | -- MOS_MIGRATED_REVID=96439703
* Make MissingDepException staticGravatar Mark Schaller2015-06-23
| | | | | | | No need for it to be otherwise. -- MOS_MIGRATED_REVID=96437024
* Log SkyKeys detected changed across buildsGravatar Michajlo Matijkiw2015-06-23
| | | | | | | | Similar to previous approach, except diff-awareness agnostic. Log SkyKeys as is for simplicity- this is all for human consumption anyway. -- MOS_MIGRATED_REVID=96428248
* Renaming ExecutorShutdownUtil to ExecutorUtil, since it doesn't just do ↵Gravatar Eric Fellheimer2015-06-19
| | | | | | | shutdown operations. -- MOS_MIGRATED_REVID=96351438
* Add some utilities and relax some visibility restrictions to make ↵Gravatar Janak Ramakrishnan2015-06-19
| | | | | | | alternative include scanning implementations possible. -- MOS_MIGRATED_REVID=96337469
* Rollback of commit 14b437bf749baf0488cfc7e4ed7589dc4af9bec3.Gravatar Mark Schaller2015-06-19
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** [] *** Original change description *** Implement smart negation for target pattern sequences This change uses the types of target patterns, and the order they appear in the sequence, to construct a more efficiently processable sequence of target pattern keys. Redundant patterns are eliminated and negated TargetsBelowDirectory patterns are excluded from higher-up positive patterns. -- MOS_MIGRATED_REVID=96317483
* Minimal RecursivePkgValue#toString() for debug purposesGravatar Michajlo Matijkiw2015-06-19
| | | | | -- MOS_MIGRATED_REVID=96312993
* Print an error message when an @foo dep isn't foundGravatar Kristina Chodorow2015-06-17
| | | | | | | | | TransitiveTargetFunction only prints an error message if the package names match, so it was just exiting with "loading failed" when there was an error with external dependencies. -- MOS_MIGRATED_REVID=96204337
* Get jdk.WORKSPACE into the default WORKSPACE file by reading it as a Java ↵Gravatar Lukacs Berki2015-06-15
| | | | | | | | | | | resource, then passing it to the parser as a string instead of putting it into embedded_binaries then passing a Path to it to the parser. This makes the upcoming default WORKSPACE rules for Android much more palatable. In particular, Android rules won't need to be special cased when building the Bazel binary because the contents are self-contained in BazelRuleClassProvider (and the jdk.WORKSPACE file, which is a simple Java resource) Even better would be not to use a string, but some kind of structured data, but that's probably more effort than it's worth. -- MOS_MIGRATED_REVID=95983199
* Consider pkg in error on any symlink cycle in depsGravatar Mark Schaller2015-06-15
| | | | | | | | | | | | While evaluating a package value, whether the package should be in error was checked several times for different kinds of symlink cycle deps: subincluded target's package, subincluded target, and glob. But each check overrode the result of previous checks. Now, the error state is a big OR of the results of each cycle check, not just the last one (which happened to be for globs). -- MOS_MIGRATED_REVID=95854169
* More descriptive error message on ActionMetadataHandler#injectDigest failureGravatar Michajlo Matijkiw2015-06-15
| | | | | -- MOS_MIGRATED_REVID=95852975
* Remove Path from Location, ParserInputSource and bunch of other low-level ↵Gravatar Lukacs Berki2015-06-12
| | | | | | | | | | | | | | | | | classes. This makes the code cleaner because a lot of places never read the file and thus never needed a Path in the first place. I got to this change in a bit convoluted way: - I wanted the default tools in Android rules to point to //external: - I wanted to make sure that that doesn't cause an error is no Android rules are built, thus I had to add some binding for them in the default WORKSPACE file - I wanted the Android rules not to depend on Bazel core with an eye towards eventually moving them to a separate jar / Skylark code - The default WORKSPACE file is currently composed from files extracted by the Bazel launcher which would make the Android rules depend on a very core mechanism - I couldn't simply pass in jdk.WORKSPACE as a String because Location, ParserInputSource and a bunch of other things needed a Path, which a simple string doesn't have. Thus, this change. -- MOS_MIGRATED_REVID=95828839
* Cleanup findTargetsBeneathDirectoryGravatar Mark Schaller2015-06-11
| | | | | | | | | | Improves local variable names, moves building of excluded path fragments outside of the package path entries loop, and moves the explanatory comment for the no-targets-found check up to where the check is performed. -- MOS_MIGRATED_REVID=95660427
* Handle exceptions encountered resolving packages during the execution phaseGravatar Michajlo Matijkiw2015-06-10
| | | | | | | | | | | | | | Currently we may do lookups of not-already-cached packages during the execution phase for actions that discover inputs. Exceptions encountered during this would go unhandled and result in a crash. Here we introduce PackageRootResolutionException which wraps these exceptions and triggers an ActionExecutionException which is cleanly handled in the exec phase. As part of this change SkyframeActionExecutor#getArtifactRoots(...) will fail properly on errors getting package roots. -- MOS_MIGRATED_REVID=95578891
* Don't be unnecessarily conservative about marking FileStateKeys and ↵Gravatar Nathan Harmata2015-06-09
| | | | | | | DirectoryListingStateKeys as dirty. Note that the two previous "concerns" of cycles and errors (which weren't actually concerns) are now obsolete anyway. -- MOS_MIGRATED_REVID=95441624
* Remove superfluous throws clause.Gravatar Nathan Harmata2015-06-08
| | | | | -- MOS_MIGRATED_REVID=95320780
* Add debugging for mysterious crash.Gravatar Janak Ramakrishnan2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95227410
* Unregister previously registered directories when they are deleted. This is ↵Gravatar Nathan Harmata2015-06-05
| | | | | | | important because the directory's inode could be reused for another directory in the future, and we would get WatchEvents for that new directory which would be problematic if we hadn't noted it yet. -- MOS_MIGRATED_REVID=95214882
* Properly handle exceptions that RecursivePkgFunction can encounter, instead ↵Gravatar Janak Ramakrishnan2015-06-03
| | | | | | | | | | | of silently swallowing them. The old behavior was simply incorrect on --keep_going builds because it meant any directory with an uncaught error caused all of its ancestors to not have any values. It wasn't noticed because SkyframeTargetPatternEvaluator was overly permissive in the errors it expects. We also use a singleton for the empty RecursivePkgValue which might have a negligible (beneficial) memory impact. -- MOS_MIGRATED_REVID=95037551
* Implement smart negation for target pattern sequencesGravatar Mark Schaller2015-06-01
| | | | | | | | | | | This change uses the types of target patterns, and the order they appear in the sequence, to construct a more efficiently processable sequence of target pattern keys. Redundant patterns are eliminated and negated TargetsBelowDirectory patterns are excluded from higher-up positive patterns. -- MOS_MIGRATED_REVID=94909360
* Make the PackageFunction cache an actual Cache.Gravatar Eric Fellheimer2015-05-27
| | | | | -- MOS_MIGRATED_REVID=94569621
* Add an entry to TransitiveTargetValue that tracks theGravatar Greg Estren2015-05-27
| | | | | | | | | | | | | | | | configuration fragments needed by a rule's transitive closure. Also add a Skyframe BuildConfiguration node. Memory and performance profiling shows no noticeable performance hit in loading or analysis and a 0.35% memory increase for moderately sized (by Google standards) build graphs when these are depended upon in ConfiguredTargetFunction. -- MOS_MIGRATED_REVID=94517099
* Minor refactoring to SkyframeExecutor progress receiver.Gravatar Eric Fellheimer2015-05-27
| | | | | -- MOS_MIGRATED_REVID=94506006
* Add runfiles to metadata caches and make them isFile awareGravatar Michajlo Matijkiw2015-05-26
| | | | | -- MOS_MIGRATED_REVID=94318260
* Quiet error-checking by implementing hash code for object that already had ↵Gravatar Janak Ramakrishnan2015-05-22
| | | | | | | hash code implementation from super class. -- MOS_MIGRATED_REVID=94297315
* Allow @repo//foo:bar targets in BUILD filesGravatar Kristina Chodorow2015-05-22
| | | | | | | | This allows you to use @repo//... syntax outside of the WORKSPACE file, which makes it easier to use external dependencies. -- MOS_MIGRATED_REVID=94275085
* Add a hidden flag which allows us to set the size of the legacy globbing ↵Gravatar Eric Fellheimer2015-05-22
| | | | | | | thread pool. -- MOS_MIGRATED_REVID=94236393
* Move target pattern parsing to key construction timeGravatar Mark Schaller2015-05-21
| | | | | | | | | | | | So that a subsequent commit can take advantage of semantic information known only after target patterns have been parsed, this commit moves parsing from pattern evaluation time to pattern key construction time. This leads toward more efficient processing of target patterns in target pattern sequence evaluation. -- MOS_MIGRATED_REVID=94025646
* Teach skyframe about excluded directories, pathsGravatar Mark Schaller2015-05-21
| | | | | | | | | | | | RecursivePkgFunction now expects both a rooted path to load packages beneath and a set of paths to exclude. This also augments existing machinery to deliver this set of paths to exclude. This leads toward more efficient processing of target patterns in target pattern sequence evaluation. -- MOS_MIGRATED_REVID=94020331
* Rename skyframe's TargetPattern to TargetPatternKeyGravatar Mark Schaller2015-05-21
| | | | | | | | There were two TargetPattern types, one in cmdline and one in skyframe. This made things more confusing than they needed to be. -- MOS_MIGRATED_REVID=94005358
* Fix WORKSPACE file existence hermeticityGravatar Kristina Chodorow2015-05-18
| | | | | -- MOS_MIGRATED_REVID=93901785
* Deleted little-used PackageLoadedEvent.Gravatar Eric Fellheimer2015-05-18
| | | | | -- MOS_MIGRATED_REVID=93881974
* Add some basic logging around DiffAwarenessGravatar Michajlo Matijkiw2015-05-18
| | | | | | | | Some simple logging to tell us what strategy we are using and how many files we detect as modified. Useful for debugging slow (or fast) builds. -- MOS_MIGRATED_REVID=93745644
* Allow globs to be used outside of the skyframe package.Gravatar Janak Ramakrishnan2015-05-15
| | | | | -- MOS_MIGRATED_REVID=93647914
* Add a SingleCycleReporter for analysis phase cycles, which can (only) occur ↵Gravatar Nathan Harmata2015-05-15
| | | | | | | | | due to configurations. RELNOTES: -- MOS_MIGRATED_REVID=93543318
* We are trying to merge same copies of the aspect, when target is declared in ↵Gravatar Marian Lobur2015-05-15
| | | | | | | different attributes, to which we have attached aspect. -- MOS_MIGRATED_REVID=93412457
* Clean up some overly permissive permissions in FileStateValue.Gravatar Janak Ramakrishnan2015-05-07
| | | | | -- MOS_MIGRATED_REVID=92944321
* Track BUILD file changes on new_ repositoriesGravatar Kristina Chodorow2015-05-07
| | | | | | | | I noticed, while writing http://bazel.io/docs/cpp.html#including-external-libraries-an-example, that the BUILD file didn't get reparsed when it changed. This fixes that. -- MOS_MIGRATED_REVID=92921670