aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/query2/output/ProtoOutputFormatter.java
Commit message (Collapse)AuthorAge
* Rename FakeSubincludeTarget to more appropriate name FakeLoadTarget (thanks ↵Gravatar juliexxia2017-10-26
| | | | | | | @ccalvarin) RELNOTES: None. PiperOrigin-RevId: 173463794
* Remove ErrorSensingEventHandler#resetErrors().Gravatar lberki2017-06-12
| | | | | | | The call sites in QueryEnvironment implementations were not needed because QueryEnvironments are always made afresh. RELNOTES: None. PiperOrigin-RevId: 158698881
* Delete STRING_DICT_UNARYGravatar michajlo2017-03-31
| | | | | | | This isn't used anymore, it's the same as STRING_DICT, deleting so no one tries to use it. PiperOrigin-RevId: 151738915
* Description redacted.Gravatar Nathan Harmata2017-03-09
| | | | | | -- PiperOrigin-RevId: 149585165 MOS_MIGRATED_REVID=149585165
* Rollback of commit 822c37816ac669e51bec3853b41849a19ec5e230.Gravatar Nathan Harmata2017-03-01
| | | | | | -- PiperOrigin-RevId: 148844518 MOS_MIGRATED_REVID=148844518
* Reimplement blaze query using an async evaluation model. Use a concurrent ↵Gravatar Nathan Harmata2017-02-28
| | | | | | | | | | | | | | | | | | | backend for SkyQueryEnvironment's implementation in order to achieve parallelism. Advantages: -New design has no flaws that the old design had. -Code is structured so that deadlocks due to thread starvation are impossible (yup!). Disadvantages: -The meat of this change needs to all be in a single CL because every single QueryFunction and QueryExpression needs to be rewritten in the async style. Still TODO: -Fully embrace the async model in all QueryFunctions (e.g. 'rdeps', 'allpaths'). -Use concurrency in BlazeQueryEnvironment to achieve parallel evaluation for (non SkyQuery) 'blaze query' and genquery. -- PiperOrigin-RevId: 148690279 MOS_MIGRATED_REVID=148690279
* Add the LABEL_KEYED_STRING_DICT type for attributes.Gravatar Michael Staib2017-02-24
| | | | | | | | | This enables both native and Skylark rules to declare attributes which have labels/Targets as keys, and have string values. -- PiperOrigin-RevId: 148365033 MOS_MIGRATED_REVID=148365033
* Introduce a failFast mode to OutputFormatterCallback#close.Gravatar Nathan Harmata2016-11-18
| | | | | -- MOS_MIGRATED_REVID=139508838
* bazel query: Gravatar Greg Estren2016-10-28
| | | | | | | | | - Extend https://github.com/bazelbuild/bazel/commit/83ffb5e7bc034ea2dd1e957249079b3884a9450d to --output=xml, --output=proto, too. This makes query much more resilient against freezing / OOMing from "select() + select() + select() + ..." patterns. - Make the above logic accessible to any output type. - Move AggregatingAttributeMapper.flattenAttributeValues to ProtoOutputFormatter, since this is really a utility method for ProtoOutputFormatter. -- MOS_MIGRATED_REVID=137429116
* Make a method in ProtoOutputFormatter visible for tests.Gravatar Janak Ramakrishnan2016-10-10
| | | | | -- MOS_MIGRATED_REVID=135495077
* Unify AbstractBlazeQueryEnvironment#evaluateQuery with its subclass ↵Gravatar Nathan Harmata2016-10-04
| | | | | | | overrides. Also, have AbstractBlazeQueryEnvironment#evaluateQuery take an OutputFormatterCallback instance rather than a Callback instance. This is more sensible since the latter is only intended to be used intra-query, while the former is intended for usage in end-to-end query evaluation. This lets us slightly simplify QueryCommand, by shifting the responsibility for managing the OutputFormatterCallback to AbstractBlazeQueryEnvironment#evaluateQuery. -- MOS_MIGRATED_REVID=134827588
* Don't force PrintStream on streaming output formattersGravatar Michajlo Matijkiw2016-09-30
| | | | | | | | Usually an OutputStream will do. Forgo the extra layer of indirection and stream directly to the output. -- MOS_MIGRATED_REVID=134682243
* Introduce a new method on the StreamedFormatter interface for creating a ↵Gravatar Nathan Harmata2016-09-21
| | | | | | | callback for streaming a precomputed result. -- MOS_MIGRATED_REVID=133720742
* Added support for null terminated queries.Gravatar Andreas Bergmeier2016-08-10
| | | | | | | | Closes #1496. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/1496 MOS_MIGRATED_REVID=129846158
* Remove GlobList formatting logicGravatar Michajlo Matijkiw2016-07-18
| | | | | | | Isn't strictly necessary, remove it before anyone decides they want to use it. -- MOS_MIGRATED_REVID=127585617
* Remove not-quite necessary serialization bitsGravatar Michajlo Matijkiw2016-07-15
| | | | | | | What we really are doing here is formatting. -- MOS_MIGRATED_REVID=127481183
* Slight refactor of OutputFormatter interface: separate the specification of ↵Gravatar Nathan Harmata2016-06-16
| | | | | | | potentially-relevant options from the creation of the callback. -- MOS_MIGRATED_REVID=124981132
* Thread through a map of the attributes which we have serialized into ↵Gravatar Shreya Bhattarai2016-05-17
| | | | | | | postProcess(). -- MOS_MIGRATED_REVID=122542545
* Clean up javadoc links.Gravatar Shreya Bhattarai2016-05-09
| | | | | -- MOS_MIGRATED_REVID=121680610
* Allow ProtoOutputFormatter to filter aspect attributesGravatar Michajlo Matijkiw2016-04-15
| | | | | -- MOS_MIGRATED_REVID=119902657
* Properly filter out Aspect attributes when `blaze query` requests ↵Gravatar Dmitry Lomov2016-01-22
| | | | | | | | | --noimplicit_deps and/or --nohost_deps. RELNOTES: --noimplicit_deps and --nohost_deps work correctly for Aspect attributes. -- MOS_MIGRATED_REVID=112724917
* Refactor dependency filtering out of Rule class.Gravatar Dmitry Lomov2016-01-22
| | | | | -- MOS_MIGRATED_REVID=112717648
* Allow more flexibility on proto output formatter.Gravatar Miguel Alcon Pinto2016-01-21
| | | | | -- MOS_MIGRATED_REVID=112681274
* Allow to filter attributes based on the rule of the attribute.Gravatar Miguel Alcon Pinto2016-01-11
| | | | | -- MOS_MIGRATED_REVID=111854804
* Permit proto serialization of configured attribute valuesGravatar Mark Schaller2016-01-04
| | | | | | | | | This commit adds proto messages that represent configurable values, and modifies attribute value serialization code to handle those values, which are called SelectorLists. -- MOS_MIGRATED_REVID=111149272
* Minor cleanup to AttributeSerializer, ProtoOutputFormatterGravatar Mark Schaller2015-12-16
| | | | | | | | Makes "explicitlySpecified" a primitive boolean instead of a boxed Boolean. Minor formatting changes to ProtoOutputFormatter. -- MOS_MIGRATED_REVID=110360334
* Allow output formatters to work in stream mode.Gravatar Miguel Alcon Pinto2015-12-10
| | | | | -- MOS_MIGRATED_REVID=109908202
* Rollback of commit 8e7da8704dba78dba47fbaa0eafce3a91c2deb13.Gravatar Peter Schmitt2015-12-01
| | | | | | | *** Reason for rollback *** -- MOS_MIGRATED_REVID=109005097
* Extract Attribute serialization logicGravatar Michajlo Matijkiw2015-11-20
| | | | | -- MOS_MIGRATED_REVID=108368348
* Allow output formatters to work in stream mode.Gravatar Miguel Alcon Pinto2015-11-19
| | | | | -- MOS_MIGRATED_REVID=108142169
* Add the ability to filter out attributes when doing queries.Gravatar Miguel Alcon Pinto2015-10-09
| | | | | -- MOS_MIGRATED_REVID=104979750
* 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
* Make aspect resolver and dependencyFilter transient, as they are not ↵Gravatar Miguel Alcon Pinto2015-09-23
| | | | | | | serializable. -- MOS_MIGRATED_REVID=103678330
* 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
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* Don't expose includeGlobs in PackageSerializer public interfaceGravatar Michajlo Matijkiw2015-09-11
| | | | | | | | We always set this false when calling from outside PackageSerializer. Hide it away since we don't need it and so that we don't get tempted. -- MOS_MIGRATED_REVID=102864146
* Refactor Skylark Environment-sGravatar Francois-Rene Rideau2015-09-11
| | | | | | | | | | | | | | | | | | | | Make Environment-s freezable: Introduce a class Mutability as a revokable capability to mutate objects in an Environment. For now, only Environment-s carry this capability. Make sure that every Mutability is revoked in the same function that create... This reinstates a change that previously rolled-back because it broke the serializability of SkylarkLookupValue. Bad news: serializing it succeeds for the wrong reason, because a SkylarkEnvironment was stored as a result (now an Environment.Extension) that was Serializable but inherited its bindings from an Environment (now an Environment.BaseExtension) which wasn't Serializable. Apparently, Java doesn't try to serialize the bindings then (or at least doesn't error out when it fails), because these bindings map variable names to pretty arbitrary objects, and a lot of those we find in practice aren't Serializable. Thus the current code passes the same tests as the previous code, but obviously the serialization is just as ineffective as it used to be. -- MOS_MIGRATED_REVID=102776694
* Stop serializing/deserializing Locations as part of PackagesGravatar Michajlo Matijkiw2015-09-11
| | | | | | | | | | | | They're not cheap to serialize or reconstitute and we don't really need them. This does leave some odd ends around, in particular i decided to keep deserialization context around as i can picture use for it soon. Also return non-null values from all of EmptyLocation's method since while the javadocs declare that LineAndColumn and Path can be null, there does exist code which does not take this into account, this is for another change. -- MOS_MIGRATED_REVID=102758810
* Add an attribute to proto and xml query outputs to mark packages that are in ↵Gravatar Miguel Alcon Pinto2015-09-08
| | | | | | | error. -- MOS_MIGRATED_REVID=102582717
* Rollback of commit 5a94e59f02833f9142bad9203acd72626b089535.Gravatar Janak Ramakrishnan2015-09-08
| | | | | | | | | *** Reason for rollback *** Breaks serialization of SkyValues. -- MOS_MIGRATED_REVID=102457225
* Refactor Skylark Environment-sGravatar Francois-Rene Rideau2015-09-08
| | | | | | | | | | | | | | | | | Make Environment-s freezable: Introduce a class Mutability as a revokable capability to mutate objects in an Environment. For now, only Environment-s carry this capability. Make sure that every Mutability is revoked in the same function that creates it, so no Environment is left open for modification after being created and exported; exceptions for tests, the shell and initialization contexts. Unify Environment, SkylarkEnvironment and EvaluationContext into Environment. Have a notion of Frame for the bindings + parent + mutability. Replace the updateAndPropagate mechanism by a dynamicFrame. Simplify ValidationEnvironment, that is now always deduced from the Environment. -- MOS_MIGRATED_REVID=102363438
* Make full location serialization for packages optionalGravatar Michajlo Matijkiw2015-08-31
| | | | | | | | | | Finding start/end line/col for locations takes some cpu work. As locations are quite common this cpu work adds up. Instead make it possible to only serialize the bare minimum location (start and end offset), the rest can be derived from the original file if necessary. -- MOS_MIGRATED_REVID=101966365
* Replace query option --order_results with --order_output, which can take ↵Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | | | | | three values for a given output formatter: 'no', 'deps', or 'full'. A fourth value, 'auto', means either 'deps' or 'full' depending on the formatter. The option 'no' is equivalent to --noorder_results. 'full' means that output will be deterministically ordered, using alphabetization if necessary. 'deps' means that graph order will be preserved (where applicable), but further efforts to order the output may not be undertaken. 'auto' is equivalent to 'full' for all output formatters except for proto, minrank, maxrank, and graph, for which it is equivalent to 'deps'. The purpose of this cl is to enable genquery to force completely deterministic output, which requires that it be able to specify a total ordering on the graph that is consistent across runs. Which ordering doesn't matter very much, so depending on the output formatter, or even within the same one, there may be some groups of nodes that are ordered alphabetically, and some reverse alphabetically. -- MOS_MIGRATED_REVID=101512292
* Add --proto:default_values option for blaze query, which can be used to supressGravatar Googler2015-07-08
| | | | | | | | | including attributes not explicitly specified in the output. Works for output=proto and has same semantics as --xml:default_values has for output=xml. -- MOS_MIGRATED_REVID=97710199
* Description redacted.Gravatar Lukacs Berki2015-06-10
| | | | | -- MOS_MIGRATED_REVID=95615442
* Add --with_aspect_deps flag to blaze query. This flag should produce ↵Gravatar Lukacs Berki2015-06-05
| | | | | | | | | | | | | additional information about aspect dependencies when --output is set to {xml, proto}. One quirk of this CL is that if BUILD files of direct dependencies are added both under <subinclude> and <load>. Any better ideas are appreciated. As a drive-by fix, if for some reason a package reports the same label as a both subinclude and a Skylark dependency, it will only be reported once in the proto output. RELNOTES[NEW]: added --with_aspect_deps to blaze query, that prints additional information about aspects of target when --output is set to {xml, proto, record}. -- MOS_MIGRATED_REVID=95272042
* Add environment_group support for query.Gravatar Greg Estren2015-04-27
| | | | | -- MOS_MIGRATED_REVID=91997659
* Merge PackageSerializer's and ProtoOutputFormatter's duplicatedGravatar Greg Estren2015-03-25
| | | | | | | | | | | | | | | | serialization logic. Among other things, this fixes an out-of-sync bug where ProtoOutputFormatter's version knew how to handle configurable attributes while PackageSerializer's version crashed. The merged logic preserves ProtoOutputFormatter's semantics: configurable attributes work, but their values are merged together into a flattened list, so the original select structure can't be reproduced later. -- MOS_MIGRATED_REVID=89435116
* RELNOTES[NEW]: Added --relative_locations flag to the query command to make ↵Gravatar Damien Martin-Guillerez2015-03-13
| | | | | | | | | the locations of build files relative to the workspace root with protobuf and XML outputs Protobuf and XML outputs of query are non-deterministic. This flag is a first step to make genquery deterministic accross machine. -- MOS_MIGRATED_REVID=88428100
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957