aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/query2/ConfiguredTargetQueryEnvironment.java
Commit message (Collapse)AuthorAge
* Error out gracefully instead of crashing blaze when --output=transitions is ↵Gravatar juliexxia2018-04-05
| | | | | | used without the --transitions flag PiperOrigin-RevId: 191755762
* Get rid of call to deprecated ConfiguredTarget.getConfiguration()Gravatar juliexxia2018-03-28
| | | | PiperOrigin-RevId: 190777533
* 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
* 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
* 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
* Fix http://b/73496081 which was caused by not filtering on ↵Gravatar juliexxia2018-02-16
| | | | | | aliasconfiguredtargets that are actually ruleconfiguredtargets. PiperOrigin-RevId: 185996274
* 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
* When requesting nodes* look first in target configuration, then host (used ↵Gravatar juliexxia2018-02-07
| | | | | | | | | | | | to be the other way around). This fixes b/72817591 which saw the following - (1) somepath(//foo, //bar) --nohost_deps -> empty query results (2) deps(//foo) --nohost_deps | grep '//bar' -> found //bar This happened because //bar was configured in both the host and the target config. There was no path from //foo-target -> //bar-host because of the --nohost_deps setting (1) but //bar-target did exist in the results of (2) PiperOrigin-RevId: 184868484
* Cleaning up a missed reference to getTarget in ↵Gravatar mjhalupka2018-01-31
| | | | | | ConfiguredTargetQueryEnvironment. Follow up to https://github.com/bazelbuild/bazel/commit/426ab9067374bfe5af033e22153507c3f38e7221 PiperOrigin-RevId: 184049987
* Add a way to get a Target from the WalkableGraph instead of usingGravatar mjhalupka2018-01-30
| | | | | | | | | ConfiguredTarget.getTarget(). Might have reduced performance because we're doing some more lookups in the accessor now. PiperOrigin-RevId: 183864924
* Quick blanket replacement of getTarget().getLabel() with .getLabel(). Some ↵Gravatar Googler2018-01-22
| | | | | | have already been changed to ConfiguredTargetAndTarget so there's fewer classes than I thought there would be. PiperOrigin-RevId: 182839243
* After getting rid of LabelAndConfiguration, simplify some code by providing ↵Gravatar janakr2017-12-28
| | | | | | a ConfiguredTargetKey directly. PiperOrigin-RevId: 180285691
* Get rid of LabelAndConfiguration class: ConfiguredTargetKey contains the ↵Gravatar janakr2017-12-20
| | | | | | same information and is more useful, since it's practically a SkyKey. PiperOrigin-RevId: 179727105
* Add --implicit_deps custom filtering to configuredtargetqueryenvironment.Gravatar juliexxia2017-12-08
| | | | | | This implementation requires adding an interned list of LabelAndConfiguration objects to each RuleConfiguredTarget ('implicit' is an attribute describer, not a dep describer so filtering needs to happen while attribute information still exists). PiperOrigin-RevId: 178411882
* Add --host_deps custom filtering to configuredtargetqueryenvironment.Gravatar juliexxia2017-11-17
| | | | | | | | Notable implementation details: - split the flag into --experimental_post_build_query and --experimental_query_options - allow --nohost_dep filtering to be applied to query targets configured in the host configuration (only returns deps also in the host configuration so allow deps as long as it never sees a transition from a host config to a non-host config) PiperOrigin-RevId: 176165870
* Initial (partial) implementation of configured target query. Activated by ↵Gravatar janakr2017-08-21
passing the --post_build_query flag to a build command, with a query expression as the argument. Bazel then executes this query on the configured target graph as constructed by the build command. Since the prepare graph -> query workflow is how SkyQueryEnvironment works, this is mostly just copying that. Main missing features/code cleanups: * Recursive target patterns (/...) are not supported. * There is no way to specify the configuration of the targets in your query. * Configuration output is totally opaque (just the hash, or null if no configuration). * More generally, no output options. * Some features (visibility, label attrs) not supported. * No edge filtering (host deps, implicit deps). * Aspects are totally ignored. * Graceful failure on errors, edge cases, incompatible flags (like the TAP flags that discard edges). * Code hygiene issues (calling test-only method to get to Skyframe graph, some code duplication across ConfiguredTargetQueryEnvironment and SkyQueryEnvironment). Most of the features I plan to leave to rules-side people, since I think they won't be too hard for a general Blaze developer to implement, and designing the right features and user interfaces for these things is better left to the rules side. PiperOrigin-RevId: 165747829