aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/query2
Commit message (Collapse)AuthorAge
* Order Skyframe evaluations in a priority queue, with all children of a given ↵Gravatar janakr2018-08-13
| | | | | | | | node having the same priority, later enqueueings having higher priority, re-enqueued nodes having highest priority, and new root nodes having lowest priority. Experimentally, this can save significant RAM (1.4G in some builds!) while not affecting speed. Also do a semi-drive-by deleting ExecutorFactory parameter to AbstractQueueVisitor, since it was always AbstractQueueVisitor.EXECUTOR_FACTORY. PiperOrigin-RevId: 208560889
* Batch all DependencyResolver#getTarget calls. This leads to some duplicate ↵Gravatar janakr2018-08-09
| | | | | | iteration, but that should be cheap, while requesting packages sequentially can hurt... PiperOrigin-RevId: 208126130
* Add a comment clarifying the soundness of not doing edge filtering during ↵Gravatar nharmata2018-08-08
| | | | | | | the DTC construction of the universe argument to 'rdeps'. RELNOTES: None PiperOrigin-RevId: 207884395
* Sort the rule attribute list in ProtoOutputFormatter by name to cure some queryGravatar Googler2018-08-07
| | | | | | | | | | | and genquery non-determinism. This approach relies on there never being two attributes with the same name. I added the inOrder() to the test without my change commented and observed flaky failures. I then uncommented my change and saw consistent passes. RELNOTES: Sort attribute lists in proto-form query output to fix non-deterministic genquery output. PiperOrigin-RevId: 207743773
* Add text output to aquery.Gravatar twerth2018-08-02
| | | | | | RELNOTES[NEW]: The aquery command now supports --output=text. PiperOrigin-RevId: 207096607
* Some code cleanups and improvements around the various DTC visitor ↵Gravatar nharmata2018-07-30
| | | | | | | | | | | implementations in SkyQuery: (1) Get rid of the 'errorReporter' param used in the two unbounded 'deps' implementations. In practice, this callback is always used right alongside the normal query callback. So we can re-implement it as a single, composite callback. (2) Revert the recent change to processResultsAndReturnTargets (and restore the old method name). It general, it's a bad idea to return Targets outside that method, because it means we aren't respecting the MultisetSemaphore<PackageIdentifier>. Along with (1), this fixes a real issue where DepsUnboundedVisitor#processPartialResults was using Targets (and thus keeping their Packages live in memory) outside of the package semaphore. RELNOTES: None PiperOrigin-RevId: 206606747
* Fix crash bug in SkyQuery rdeps when there's a dependency edge filter.Gravatar nharmata2018-07-27
| | | | | RELNOTES: None PiperOrigin-RevId: 206368137
* Annotate conditional edges with corresponding conditions in `queryGravatar dhananjayn2018-07-23
| | | | | | | | | | | --output graph`. Implementation: AIUI, currently the "edges' conditions" are lost [1] when the larger graph is initially constructed. It now does a second pass over dependency subgraph to find all the conditional edges and annotates them in dot output. This can be easily extended in other forms of output, but for now it only annotates edges in dot output. [1]: https://github.com/bazelbuild/bazel/blob/32e9fee4e2192a340d0b1823538bf8e9fdf92b65/src/main/java/com/google/devtools/build/lib/query2/output/OutputFormatter.java#L745-L770 PiperOrigin-RevId: 205685823
* Add aquery as proper command to Bazel.Gravatar twerth2018-07-18
| | | | | RELNOTES: Add aquery command to get analysis time information about the action graph. PiperOrigin-RevId: 205064145
* Move output option down to specific query option.Gravatar twerth2018-07-12
| | | | | | | | They're different anyway and we will need this to set a different default value for aquery. RELNOTES: None PiperOrigin-RevId: 204259933
* Use generic classes instead of cquery specific class.Gravatar twerth2018-07-10
| | | | | | | Also introduce NamedThreadSafeOutputFormatterCallback for common code. RELNOTES: None PiperOrigin-RevId: 203932877
* Remove an unused method.Gravatar lberki2018-07-09
| | | | | | RELNOTES: None. PiperOrigin-RevId: 203720055
* Replace instances of Blaze with Bazel.Gravatar Dan Fabulich2018-07-05
| | | | | | | PiperOrigin-RevId: 203300374 Change-Id: Iaa47f870ab2e0cad40a202aad2c7f9430f73c856 PiperOrigin-RevId: 203407392
* Allow uniquifiers to throw QueryExceptions.Gravatar shreyax2018-07-02
| | | | | RELNOTES: None. PiperOrigin-RevId: 202961077
* Split common functionality out of ConfiguredTargetQueryEnvironment.Gravatar twerth2018-06-28
| | | | | | | This will allow us to reuse the code for the action graph query in a later CL. RELNOTES: None PiperOrigin-RevId: 202500176
* Add ConfiguredTargetValueAccessor.Gravatar twerth2018-06-22
| | | | | | | | This will be necessary for the action graph query which operates on ConfiguredTargetValue's. RELNOTES: None PiperOrigin-RevId: 201657526
* Rename the implicit attribute used to store toolchain dependencies.Gravatar jcater2018-06-21
| | | | PiperOrigin-RevId: 201565941
* Rename VariableContext to the more general purpose QueryExpressionContext ↵Gravatar shreyax2018-06-12
| | | | | | and thread it through to graph traversal functions. Some other light refactorings as well. PiperOrigin-RevId: 200292556
* Split TargetPatternEvaluator into two interfacesGravatar ulfjack2018-06-12
| | | | | | | | | | | | | | | | | - the TargetPatternPreloader is still used for query in all its forms - the remaining TargetPatternEvaluator part is no longer used except in tests - also make both implementations stateless and pass the offset to the methods instead; note that they both modify the underlying skyframe graph, so there are side effects to the calls even if there's no direct state anymore The intent is to migrate the relevant tests to LoadingPhaseRunnerTest (which could also now be renamed since it's not doing a loading phase), and then delete the TargetPatternEvaluator interface. This depends on the previous commit that removed the last direct use of TPE from an internal command. PiperOrigin-RevId: 200198067
* Introduce generic post analysis build tool.Gravatar twerth2018-06-11
| | | | | | | This is the first step on the way to a proper action graph query command. RELNOTES: None PiperOrigin-RevId: 200026440
* Fix bug in skyframe-based test-suite expansionGravatar ulfjack2018-06-07
| | | | | | | | | | It was tracking filtered tests and then applying the filter at the next higher level. I also added a bunch of comments - we actually have four implementations of test suite expansion, and they are not consistent. Sorry about that. PiperOrigin-RevId: 199629485
* Refactoring: makes the code simpler by deleting Metadata and InputArtifactData.Gravatar shahan2018-06-06
| | | | | | (minor) ActionFS now implements MetadataProvider.getInput PiperOrigin-RevId: 199575194
* Use a new RecursivePackageProvider to ask skyframe for the correct package ↵Gravatar juliexxia2018-06-01
| | | | | | nodes in ConfiguredTargetQueryEnvironemnt. This lets us support recursive target patterns with cquery. PiperOrigin-RevId: 198879650
* Fix b/80260450 which saw cquery --output=proto crashing on alias configured ↵Gravatar juliexxia2018-05-29
| | | | | | | targets. Along the way, update ConfiguredTargetAccessor to return the correct Target (the alias, not the actual) when dealing with AliasedConfiguredTargets. RELNOTES: None. PiperOrigin-RevId: 198445580
* Refactor root cause reporting in ConfiguredTargetFunctionGravatar ulfjack2018-05-29
| | | | | | We now track Causes instead of plain Labels, which will allow us to do better reporting in the future. Add basic tests. PiperOrigin-RevId: 198380468
* Implement unbounded deps() using ParallelVisitor for SkyQuery.Gravatar shreyax2018-05-25
| | | | PiperOrigin-RevId: 198074986
* Unfork SplitTransition / PatchTransition invocations.Gravatar gregce2018-05-24
| | | | | | Part of https://docs.google.com/document/d/1_UJKmAQ9EE8i3Pl0il3YLTYr-Q9EKYYyLatt2zohfyM/edit# PiperOrigin-RevId: 197890685
* Rename PatchTransition.apply to PatchTransiton.patch.Gravatar gregce2018-05-23
| | | | | | | This unclashes with the incoming ConfigurationTransition.apply method described in https://docs.google.com/document/d/1_UJKmAQ9EE8i3Pl0il3YLTYr-Q9EKYYyLatt2zohfyM/edit#heading=h.96gongkwg852. PiperOrigin-RevId: 197769784
* Move various visitor classes into their own classes. ParallelSkyQueryUtils ↵Gravatar shreyax2018-05-18
| | | | | | is currently quite large and hard to navigate. Also, rename AbstractRdepsVisitor to AbstractEdgeVisitor as there is nothing specific about rdeps involved. PiperOrigin-RevId: 197177966
* Include broken packages in rbuildfiles responseGravatar mschaller2018-05-16
| | | | | | | | | | Also allow overrides for SkyQuery's getBuildFileTargetsForPackageKeysAndProcessViaCallback. Lastly, some cleanup in ParallelSkyQueryUtils. RELNOTES: SkyQuery's rbuildfiles now returns targets corresponding to broken packages. PiperOrigin-RevId: 196868692
* Use ConcurrentHashMap directly instead of MapMaker.Gravatar Googler2018-05-03
| | | | | RELNOTES: None. PiperOrigin-RevId: 195280015
* Declare QueryEnvironment#getBuildFiles to throw InterruptedExceptionGravatar shreyax2018-05-02
| | | | PiperOrigin-RevId: 195171169
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-02
| | | | PiperOrigin-RevId: 195100670
* Delete dead non-parallel getRBuildFiles codeGravatar mschaller2018-05-01
| | | | | | | Only the parallel implementation is now used. RELNOTES: None. PiperOrigin-RevId: 195001035
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194985157
* Resolve selects in the attributes of targets for cquery's --output=proto formatGravatar juliexxia2018-05-01
| | | | PiperOrigin-RevId: 194967939
* Remove use of bare Immutable{List,Map,Set} Builder classes.Gravatar jcater2018-04-20
| | | | | | Always use the more-qualified class name for clarity at the site of use. There are too many classes named Builder. PiperOrigin-RevId: 193649193
* Add the capability to register a trimming RuleTransitionFactory.Gravatar mstaib2018-04-19
| | | | | | | | | | This RuleTransitionFactory will be applied to all targets after other transitions, and is intended to be used to manually trim the configuration based on tagging of that target. This is a stopgap feature until automatic trimming of configuration can be implemented. RELNOTES: None. PiperOrigin-RevId: 193573013
* Move CTQE methods into a more organized order and update some javadocs. No ↵Gravatar juliexxia2018-04-19
| | | | | | actual code changing going on here. PiperOrigin-RevId: 193559578
* Perform the TTV-land DTC visitation during SkyQuery's internal parallel ↵Gravatar nharmata2018-04-13
| | | | | | | | | visitation of the DTC of the 'universe' argument of the 'rdeps' function. TTVs alone are sufficient. RELNOTES: None PiperOrigin-RevId: 192801683
* Provide parallel implementations of bounded allrdeps and rdeps.Gravatar nharmata2018-04-12
| | | | | RELNOTES: None PiperOrigin-RevId: 192681579
* Create a new proto output formatter for cquery. Also add flag ↵Gravatar juliexxia2018-04-11
| | | | | | --[no]proto:include_configurations which when used, makes cquery proto output appear exactly like query proto output so tools that are already using this can seamlessly transition. PiperOrigin-RevId: 192470626
* Fix bug in SkyQuery's parallel allrdeps with --nohost_deps.Gravatar nharmata2018-04-10
| | | | | | | | | The was that the presence of invalid dependency edges would incorrectly cause 'allrdeps' to not visit targets. Concrete example: if --nohost_deps was set and T1 depended on T via a host edge and T2 depended on T via a non-host edge then 'allrdeps(T)' might incorrectly not contain T2. Along with fixing the bug, refactor ParallelVisitor's deduping logic: instead of deduping visitations inside #getVisitResult, dedupe them before adding them to #processingQueue. This should be a strict, small, performance win, especially for trivial visitations (e.g. RBuildFilesVisitor). RELNOTES: None PiperOrigin-RevId: 192327607
* Remove lock around DiGraph in BlazeQueryEnvironmentGravatar dbabkin2018-04-10
| | | | | | | | | - New lock introduced around Node.succs and Node.preds. These locks always hold in direction Node.succs -> Node.preds that's why reordering deadlock never happens. - All logic related to changing collection implementation from ArrayList to CompactHasSet and vise versa encapsulated in dedicated class ConcurrentCollectionWrapper. - Remove some code related to removing node from DiGraph to Node. RELNOTES:none PiperOrigin-RevId: 192282628
* Fix check-then-act race for some function potentially returning multiple ↵Gravatar shreyax2018-04-05
| | | | | | targets. PiperOrigin-RevId: 191774693
* Error out gracefully instead of crashing blaze when --output=transitions is ↵Gravatar juliexxia2018-04-05
| | | | | | used without the --transitions flag PiperOrigin-RevId: 191755762
* Expose build file label retrieval as a protected member.Gravatar shreyax2018-04-05
| | | | PiperOrigin-RevId: 191752718
* Make code much easier to read without misleading variable name and negation.Gravatar twerth2018-04-05
| | | | | RELNOTES: None PiperOrigin-RevId: 191709934
* Move proto-related options up a level to common query options. This is part ↵Gravatar juliexxia2018-04-03
| | | | | | of several CLs which implement proto output with cquery. PiperOrigin-RevId: 191460698
* Make RuleClass serializable and remove Environment from it, since it was ↵Gravatar janakr2018-03-30
| | | | | | | | only being used for the transitive hash code and transitive label of its globals, which can be passed in explicitly. Assert along the way that the transitive label of its globals is always non-null. That is currently the case, although there seems to be no hard invariant of the system that it is true. Might as well tighten it now. PiperOrigin-RevId: 191103310