aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/query2
Commit message (Collapse)AuthorAge
* 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
* Put configuration checksum into BuildOptions$OptionsDiffForReconstruction ↵Gravatar janakr2018-03-28
| | | | | | | | and make it available to ConfiguredTarget. Also give BuildConfigurationValue.Key the same toString() that BuildConfiguration had, so we recover how we used to print out ConfiguredTarget labels in debugging. This may have a tiny bit of overhead in serialization, but we'll cross that bridge when we come to it. Could just make the string a constant. PiperOrigin-RevId: 190787145
* Get rid of call to deprecated ConfiguredTarget.getConfiguration()Gravatar juliexxia2018-03-28
| | | | PiperOrigin-RevId: 190777533
* Remove categories from Bazel options.Gravatar ccalvarin2018-03-28
| | | | | | | | | These have all had a chance to be categorized with the OptionDocumentationCategory enum, and the help output already uses the enum-grouped format. The "incompatible changes" category has meaning for --all_incompatible_changes and will be removed separately. RELNOTES: None. PiperOrigin-RevId: 190773778
* Remove ConfiguredTargetKey#of(ConfiguredTarget), since it calls ↵Gravatar janakr2018-03-27
| | | | | | ConfiguredTarget#getConfiguration. PiperOrigin-RevId: 190676253
* Move the default cquery output format to its own callback and standardize ↵Gravatar juliexxia2018-03-27
| | | | | | cquery output callback logic PiperOrigin-RevId: 190667120
* Get rid of some more #getConfiguration calls.Gravatar janakr2018-03-26
| | | | PiperOrigin-RevId: 190502786
* As promised in an earlier commit, remove subinclude machinery from ↵Gravatar nharmata2018-03-26
| | | | | | | | | PackageFactory, Package, PackageFunction, and also all things that make use of Package#getSubincludeLabels. This code is completely dead, and has been for a while. RELNOTES: None PiperOrigin-RevId: 190486792
* Deprecate TransitiveInfoCollection#getConfiguration(), adding two new ↵Gravatar janakr2018-03-26
| | | | | | | | methods, TransitiveInfoCollection#getConfigurationKey() and ConfiguredTarget#getConfigurationChecksum(). These methods currently delegate to #getConfiguration(), but in the future they won't. I hope to get rid of #getConfigurationChecksum(), but I may have to fold the checksum into BuildConfigurationValue.Key or leave it as a separate field in ConfiguredTarget. Transform a representative (random?) selection of #getConfiguration calls, to show that it's pretty much possible everywhere. PiperOrigin-RevId: 190474978
* Create a new output formatter for cquery which output transition information ↵Gravatar juliexxia2018-03-23
| | | | | | in either a FULL or LITE version. Trigger new output with the new --transitions cquery flag in the new CqueryOptions class. PiperOrigin-RevId: 190278664
* Remove overloaded function in QueryEnvironmentFactoryGravatar dbabkin2018-03-22
| | | | | RELNOTES: none PiperOrigin-RevId: 190046225
* Split PackageProvider to TargetProvider and CachingPackageLocatorGravatar dbabkin2018-03-21
| | | | | | | No need to pass instance of PackageProvider there as two more general interfaces required separately. RELNOTES:none PiperOrigin-RevId: 189895042
* Modify CTQEnvironment and associated files to handle AliasConfiguredTargets. ↵Gravatar juliexxia2018-03-15
| | | | | | Always handle AliasConfiguredTargets as separate nodes from their "actual" value. This is helpful in understanding certain query results e.g. somepath. PiperOrigin-RevId: 189196863
* Remove cycle error reporting from query results since they're not strictly ↵Gravatar juliexxia2018-03-09
| | | | | | relevant and only trigger when the implicit or explicit max depth > 20 which is confusing. PiperOrigin-RevId: 188559702
* Prevent aspects with the same attributes but different names from outputting ↵Gravatar juliexxia2018-02-28
| | | | | | duplicates of those attributes in query's proto output format. PiperOrigin-RevId: 187387578
* Add --proto:output_rule_attrs flag to blaze query to enable filtering of ↵Gravatar Googler2018-02-28
| | | | | | | | output to given attributes. RELNOTES[NEW]: blaze query: use --proto:output_rule_attrs to filter for given attributes PiperOrigin-RevId: 187364996
* Fix http://b/73496081 which was caused by not filtering on ↵Gravatar juliexxia2018-02-16
| | | | | | aliasconfiguredtargets that are actually ruleconfiguredtargets. PiperOrigin-RevId: 185996274
* Fix query output formatter documentation for github issue #1121Gravatar juliexxia2018-02-15
| | | | PiperOrigin-RevId: 185908325
* Implement the config(expr, word) cquery function.Gravatar juliexxia2018-02-13
| | | | | | | expr - the expression to be evaluated word - the configuration (represented by the strings 'host', 'target', or 'null') to try to find the result(s) of 'expr' in. If some but not all results of expr can be found in the specified config, then the subset that can be is returned. If no results of expr can be found in the specified config, then an error is thrown. PiperOrigin-RevId: 185572590