aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe
Commit message (Collapse)AuthorAge
* Use full package identifier in containing package checkGravatar Kristina Chodorow2015-08-12
| | | | | | | Otherwise a @x//a/b will be seen as crossing @y//a's package boundary. -- MOS_MIGRATED_REVID=100465538
* Replace ref equality with .equals for SkyFunctionNamesGravatar Mark Schaller2015-08-11
| | | | | | | Ref equality for same-name SkyFunctionNames is not guaranteed. -- MOS_MIGRATED_REVID=100322275
* Convert invalidated tracking from per-value to per-keyGravatar Mark Schaller2015-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary user of invalidation tracking is the SkyframeBuildView, which monitored which ConfiguredTargetValues were invalidated. It did that so the SkyframeExecutor could limit its search for artifact conflicts to when the set of configured targets in the build changed. For the newly introduced set of dirtied keys, "dirtiedConfiguredTargetKeys" in SkyframeBuildView, to be as useful as the "dirtyConfiguredTargets" set it replaced, the ConfiguredTargetValueInvalidationReceiver must only remove a key from the set if it was found to be clean when it was re-evaluated. If it was rebuilt, then the key must stay in the set, to represent that the set of configured target values has truly changed. This CL introduces a semantic change that hopefully has a small effect, if any. Previously, the informInvalidationReceiver method in InvalidatingNodeVisitor only informed the invalidationReceiver when a non-null value was invalidated. (This is usually, but not always, equivalent to a non-error value. The uncommon exception is that in keep-going builds, some nodes with errors may also have values, and the invalidator would inform the receiver when such a node was invalidated.) Now, the receiver is informed that a node is invalidated regardless of whether its value is null. Because the receiver uses this information to determine whether artifact conflict search has to be rerun, and that search is expensive, it's possible this change will negatively impact performance. However, the only way an extra search could be invoked is if the invalidated configured target nodes are all in error. That seems like it would happen rarely, if at all. Further cleanup of unused SkyValues returned by markDirty to come in a subsequent CL. -- MOS_MIGRATED_REVID=100304744
* Move skylark import dependency registration to after the preprocessor.Gravatar Han-Wen Nienhuys2015-08-10
| | | | | | | RELNOTES: allow load() in subincluded files. -- MOS_MIGRATED_REVID=100125415
* Rephrase the ActionGraph in terms of the WalkableGraph. This should be more ↵Gravatar Eric Fellheimer2015-08-06
| | | | | | | efficient if we need to do many ActionGraph looups. -- MOS_MIGRATED_REVID=100060090
* Factor out import finding code.Gravatar Han-Wen Nienhuys2015-08-06
| | | | | -- MOS_MIGRATED_REVID=100038493
* Create a parameter to GlobFunction to determine whether it should deal with ↵Gravatar Eric Fellheimer2015-08-04
| | | | | | | | | non-pattern sub-expressions via file stat or directory listing. There is an inherent incrementality tradeoff here: A directory listing should be independent of any file edits in the directory, but may be overly conservative if an unrelated file is added or removed. The file stat is overly conservative when the file is modified, since glob() cares only about existence vs. non-existence. -- MOS_MIGRATED_REVID=99838654
* Remove stale comment.Gravatar Nathan Harmata2015-08-04
| | | | | | | RELNOTES: -- MOS_MIGRATED_REVID=99589366
* Fix ClassCastException.Gravatar Nathan Harmata2015-08-04
| | | | | -- MOS_MIGRATED_REVID=99487015
* FilesetEntryValue now overrides .equals and .hashCode.Gravatar Laszlo Csomor2015-07-30
| | | | | | | | | This means Skyframe's change pruning can work more efficiently. Without the overridden implementations we'd compare equal FEVs as inequal and unnecessarily re-evaluate SkyKeys that we could have verified clean. -- MOS_MIGRATED_REVID=99397188
* ActionExecutionValue now overrides .equals and .hashCode.Gravatar Laszlo Csomor2015-07-30
| | | | | | | | | This means Skyframe's change pruning can work more efficiently. Without the overridden implementations we'd compare equal AEVs as inequal and unnecessarily re-evaluate SkyKeys that we could have verified clean. -- MOS_MIGRATED_REVID=99396001
* Adds TransitiveTraversalFunction that loads transitive deps of a targetGravatar Mark Schaller2015-07-30
| | | | | | | | | Unlike TransitiveTargetFunction, it does not return nested sets of the traversed targets. Used primarily for its side effects of loading the transitive targets into the graph. -- MOS_MIGRATED_REVID=99388411
* Extract base class from TransitiveTargetFunctionGravatar Mark Schaller2015-07-30
| | | | | -- MOS_MIGRATED_REVID=99386094
* Cleanup of TransitiveTarget and TargetMarker functionsGravatar Mark Schaller2015-07-30
| | | | | | | | | | Added more information to TargetMarkerFunction documentation. Cleaned up and rearranged some code in TransitiveTargetFunction to help with future refactoring. -- MOS_MIGRATED_REVID=99384291
* Elegantly handle unbounded file symlink resolutions, e.g. 'a' -> 'b' -> ↵Gravatar Nathan Harmata2015-07-29
| | | | | | | 'a/nope'. -- MOS_MIGRATED_REVID=99337668
* Allow modules to specify additional nodes in the graph to be invalidated and ↵Gravatar Janak Ramakrishnan2015-07-29
| | | | | | | | | | | use this functionality to properly invalidate http download nodes if the downloaded zip file doesn't match the specified hash. This still means that the actual files downloaded may not match, but checking all such files may be too expensive. This helps with #336 but before that issue can be closed all remote repositories (git, etc.), should have similar functionality added. -- MOS_MIGRATED_REVID=99317085
* Some additional timing logging for discarding analysis cache, multi group ↵Gravatar Eric Fellheimer2015-07-28
| | | | | | | accounting, and artifact conflicts. -- MOS_MIGRATED_REVID=99217433
* Make some skyframe and lib/skyframe classes public.Gravatar Nathan Harmata2015-07-28
| | | | | -- MOS_MIGRATED_REVID=99197069
* Remove unused constructor and inline create method.Gravatar Janak Ramakrishnan2015-07-27
| | | | | | | -- Change-Id: Ica96bd719fe9d7e152fbe78e71669fddefe12e92 Reviewed-on: https://bazel-review.googlesource.com/#/c/1640/ MOS_MIGRATED_REVID=99182210
* Make the creation of the external package much simpler.Gravatar Lukacs Berki2015-07-23
| | | | | | | A previous change made the loading-time external label resolution unused, thus, now we can do away with a lot of machinery. The only unfortunate side effect is that instead of a nice and clear "No Android SDK found" error message, you'll get a more cryptic "external label //external:android/sdk is unbound" one. I think it's a fair tradeoff. -- MOS_MIGRATED_REVID=98813719
* --Gravatar Michajlo Matijkiw2015-07-21
| | | | MOS_MIGRATED_REVID=98737473
* Invalidate external repository files when the WORKSPACE changesGravatar Kristina Chodorow2015-07-17
| | | | | | | Fixes #236. -- MOS_MIGRATED_REVID=98402890
* Replaced other occurrences of Objects#toStringHelper with ↵Gravatar Googler2015-07-17
| | | | | | | MoreObjects#toStringHelper -- MOS_MIGRATED_REVID=98383075
* Log information about the baseline and new View passed to DiffAwarness#getDiff.Gravatar Nathan Harmata2015-07-17
| | | | | -- MOS_MIGRATED_REVID=98382658
* Actions can now request Skyframe dependencies and bypass action cache checking.Gravatar Laszlo Csomor2015-07-10
| | | | | | | | | | By implementing the SkyframeAwareAction interface an Action gains the power to request Skyframe dependencies after its declared inputs have been built and discovered but before execution. Such actions bypass the action cache check and rely on Skyframe's dependency tracking to decide when to be reexecuted. -- MOS_MIGRATED_REVID=97947856
* Log error description, not implementation detailsGravatar Mark Schaller2015-07-10
| | | | | | | | RecursiveDirectoryTraversalFunction should provide a description of what went wrong to the user instead of logging class names. -- MOS_MIGRATED_REVID=97878795
* Make include() work with remote repositories.Gravatar Lukacs Berki2015-07-10
| | | | | | | This in itself is not very interesting because include() is deprecated, but it paves the way for fetching the appropriate dependencies for the eventual label-based load() statements. -- MOS_MIGRATED_REVID=97849076
* Handle errors from DirectoryListingFunctionGravatar Mark Schaller2015-07-10
| | | | | | | | | | | | | | | | | | | SkyFunctions that call DirectoryListingFunction directly, as in the case of RecursiveDirectoryTraversalFunction, or transitively, as in the case of IncludeParser's call to GlobFunction, had been failing to handle the exceptions that DirectoryListingFunction can throw. DirectoryListingFunction can throw InconsistentFilesystemException directly, but it can also throw IOException and FileOutsidePackageRootsException because of its call to DirectoryListingStateFunction without any of its own error handling. RecursiveFilesystemTraversalFunction also calls DirectoryListingFunction, but is not yet in use. A follow-up CL will take care of its error handling needs. -- MOS_MIGRATED_REVID=97828177
* Add a bit more debugging information in case of a digest mismatch.Gravatar Janak Ramakrishnan2015-07-10
| | | | | -- MOS_MIGRATED_REVID=97782188
* Make globs work in remote repositories.Gravatar Lukacs Berki2015-07-08
| | | | | | | | | | | This involved quite a few changes, mainly changing a bunch of places where we refer to packages by a PathFragment to PackageIdentifier. The only wart is the code in PathPackageLocator: ideally, it would just call into PackageLookupFunction. Unfortunately, it is (through globbing and Parser.include) called from within a Skyframe function, and we don't want to have two eval() calls going on at the same time, so we cannot use that. There is a potential correctness issue there: PathPackageLocator now assumes where external repositories are put and assumes that they are there when it gets control, but my understanding is that the associated RepositoryValue is always evaluated before, so it works out okay. -- MOS_MIGRATED_REVID=97751539
* Reintroduce simple smart negation for query universe loadingGravatar Mark Schaller2015-07-08
| | | | | | | | | | This adds a simple form of smart negation to the target pattern sequence processing done for preloading query universes. The use cases for these sequences are controlled, and in practice these sequences are short, so a quadratic cost is acceptable. -- MOS_MIGRATED_REVID=97698204
* Activate interleaved package and transitive target loadingGravatar Mark Schaller2015-07-08
| | | | | | | | Hooks up the recently introduced interleaved loading functions to normal graph loading. -- MOS_MIGRATED_REVID=97679451
* Rollback of accidentally submitted change.Gravatar Lukacs Berki2015-07-07
| | | | | -- MOS_MIGRATED_REVID=97648982
* Make globs work in remote repositories.Gravatar Lukacs Berki2015-07-07
| | | | | | | | | | | This involved quite a few changes, mainly changing a bunch of places where we refer to packages by a PathFragment to PackageIdentifier. The only wart is the code in PathPackageLocator: ideally, it would just call into PackageLookupFunction. Unfortunately, it is (through globbing and Parser.include) called from within a Skyframe function, and we don't want to have two eval() calls going on at the same time, so we cannot use that. There is a potential correctness issue there: PathPackageLocator now assumes where external repositories are put and assumes that they are there when it gets control, but my understanding is that the associated RepositoryValue is always evaluated before, so it works out okay. -- MOS_MIGRATED_REVID=97647787
* Make the "actual" argument of bind() optional and do not point ↵Gravatar Lukacs Berki2015-07-01
| | | | | | | | | | | //external:android/sdk anywhere so that no Android-specific package is loaded when the user doesn't use an android_sdk_repository rule. To this end, SkyframePackageLoaderWithValueEnvironment.getLoadedTarget() doesn't resolve //external: labels anymore. This was only needed for JVM resolution, which was dealt with by adding and extra RedirectChaser.followRedirect() call to JvmConfigurationLoader. One hack less. On the flip side, BazelConfigurationCollection.collectTransitiveClosure() grew a hack to handle bind(), but that method is awful enough as it is anyway. -- MOS_MIGRATED_REVID=97307779
* Introduce interleaved package and transitive target loadingGravatar Mark Schaller2015-07-01
| | | | | | | | | | Adds SkyFunctions and assorted values that implement interleaved loading of packages and their targets' transitive dependencies. They are not hooked up to any graph loading components, yet. -- MOS_MIGRATED_REVID=97278368
* 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