aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java
Commit message (Collapse)AuthorAge
* @AutoCodec TransitiveTraversalValue, DirectoryListingStateValue.Gravatar janakr2018-03-06
| | | | PiperOrigin-RevId: 188077900
* 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
* Have TransitiveTraversalValues store kind of targets which have errors when ↵Gravatar Googler2017-05-16
| | | | | | | computing TransitiveTraversalValues. RELNOTES: None PiperOrigin-RevId: 156138657
* Make SkyKey an interface, and start the migration of not creating SkyKey ↵Gravatar janakr2017-05-04
| | | | | | wrapper objects: for OwnedArtifacts, which are the most numerous during builds, and for Labels for TransitiveTraversalValues, which are the most numerous during queries. PiperOrigin-RevId: 154989520
* Retain target kind in TransitiveTraversalValueGravatar Googler2017-04-28
| | | | | | | | | | | | Introduces two sub-classes to TransitiveTraversalValue to store target references and errors separately. Target kind is retained in the TransitiveTraversalValues for all targets without errors. Interner now interns values for all built-in targets without errors. RELNOTES: None PiperOrigin-RevId: 154421161
* Extract a set of advertised providers into a separate class.Gravatar Dmitry Lomov2017-01-10
| | | | | | -- PiperOrigin-RevId: 143991903 MOS_MIGRATED_REVID=143991903
* Canonicalize some TransitiveTraversalValue objects -- those corresponding to ↵Gravatar Janak Ramakrishnan2016-06-29
| | | | | | | | | error-free built-in rules, and to non-rules. This should save memory, as well as CPU for built-in rules, since we don't have to make sets out of their providers more than once. Also fix a bug in the equality check where we weren't comparing the canHaveAnyProvider field properly. -- MOS_MIGRATED_REVID=126121351
* Tweak TransitiveTraversalValue's constructor's visibilityGravatar Michajlo Matijkiw2016-05-24
| | | | | -- MOS_MIGRATED_REVID=123035454
* Make aspects work through bind(). Gravatar Lukacs Berki2016-04-22
| | | | | | | | | | | bind() is assumed to be able to provide any provider. This is suboptimal, but beats the alternative of traversing the dependency graph to an arbitrary depth. The reason for the removal of the iteration ability in TransitiveInfoCollection is that now aspects can be attached to BindConfiguredTarget, too, which is not a RuleConfiguredTarget. Whereas I could have implemented the iterator, it was used only in BindConfiguredTarget anyway, so there didn't seem to be much reason to. Some work towards #952. -- MOS_MIGRATED_REVID=120549877
* Don't keep packages in the default repository around after loading.Gravatar Brian Silverman2016-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, this would get thrown when referring to the same package from both the main and default repositories: java.lang.IllegalArgumentException: Multiple entries with same key: tools/cpp=/home/brian/971-Robot-Code and tools/cpp=/home/brian/971-Robot-Code at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:136) at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:98) at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:84) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:295) at com.google.devtools.build.lib.buildtool.BuildTool.transformPackageRoots(BuildTool.java:301) at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:209) at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:334) at com.google.devtools.build.lib.runtime.commands.TestCommand.doTest(TestCommand.java:119) at com.google.devtools.build.lib.runtime.commands.TestCommand.exec(TestCommand.java:104) at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:371) at com.google.devtools.build.lib.runtime.BlazeRuntime$3.exec(BlazeRuntime.java:1016) at com.google.devtools.build.lib.server.RPCService.executeRequest(RPCService.java:65) at com.google.devtools.build.lib.server.RPCServer.executeRequest(RPCServer.java:434) at com.google.devtools.build.lib.server.RPCServer.serve(RPCServer.java:229) at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:975) at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:772) at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:55) And this would get thrown for any packages in the main repository loaded from other repositories: java.lang.RuntimeException: Unrecoverable error while evaluating node 'PACKAGE:@//tools/build_rules/go/toolchain' (requested by nodes ) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:982) at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:499) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Invalid BUILD file name for package '@//tools/build_rules/go/toolchain': /home/brian/bazel/tools/build_rules/go/toolchain/BUILD at com.google.devtools.build.lib.packages.Package.finishInit(Package.java:299) at com.google.devtools.build.lib.packages.Package$Builder.finishBuild(Package.java:1308) at com.google.devtools.build.lib.skyframe.PackageFunction.compute(PackageFunction.java:501) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:933) ... 4 more Sponsor's comment: note the abundance of new Label.resolveRepositoryRelative() calls. They are ugly, but it's only making existing ugliness explicit. Yes, we should fix it, especially in the implementation of configurable attributes. Refs #940 -- Change-Id: I8bd7f7b00bec58a7157507595421bc50c81b404c Reviewed-on: https://bazel-review.googlesource.com/#/c/2591 MOS_MIGRATED_REVID=117429733
* Use static creation method for SkyKey. This allows interning SkyKeys as they ↵Gravatar Janak Ramakrishnan2016-03-03
| | | | | | | are created, as opposed to when they are requested from the ParallelEvaluator. That delay can lead to large memory spikes and churn. -- MOS_MIGRATED_REVID=116224565
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Share SkyKey interning between evaluation and deserialization.Gravatar Eric Fellheimer2015-10-27
| | | | | -- MOS_MIGRATED_REVID=106323413
* Memoize TRANSITIVE_TRAVERSAL nodes to save memory.Gravatar Miguel Alcon Pinto2015-10-22
| | | | | -- MOS_MIGRATED_REVID=105994907
* Retain first error message during transitive traversalGravatar Mark Schaller2015-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, a TransitiveTraversalFunction computed a value that contained an exception only if the exception resulted from a failure to load the function's immediate target. If the target had transitive dependencies on other targets, those other targets would be loaded, but any errors resulting from loading those targets would not be retained. SkyQueryEnvironment impromperly used a SkyFrame mechanism (which was solely intended to ensure equivalent semantics between keep-going and no-keep-going evaluations) to discover errors in the set of transitive children of TransitiveTraversal nodes. In order to transition SkyQueryEnvironment away from that mechanism, this CL changes TransitiveTraversalFunction to remember the first error message encountered while loading its target and its transitive dependencies. By remembering just the error message as a string, and not the full exception object, this also helps TransitiveTraversalValue have more consistent equality semantics for change-pruning. -- MOS_MIGRATED_REVID=105977182
* Clean up Aspect checks in query tests.Gravatar Eric Fellheimer2015-09-28
| | | | | -- MOS_MIGRATED_REVID=103977080
* 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
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Check argument isn't null when creating TransitiveTraversalValue error valuesGravatar Michajlo Matijkiw2015-08-31
| | | | | -- MOS_MIGRATED_REVID=101812326
* Implement hashCode, equals for TransitiveTraversalValue and related SkyValuesGravatar Mark Schaller2015-08-24
| | | | | -- MOS_MIGRATED_REVID=101233095
* 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