| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
--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
|
|
|
|
|
|
| |
of several CLs which implement proto output with cquery.
PiperOrigin-RevId: 191460698
|
|
|
|
| |
PiperOrigin-RevId: 185908325
|
|
|
|
|
|
|
| |
"context" object to be passed along. Also make some query internals public, for use in fancy QueryExpressionVisitor implementations.
RELNOTES: None
PiperOrigin-RevId: 184014063
|
|
|
|
|
|
|
|
|
|
|
| |
It was previously sending each label individually over gRPC, where each call
has a lot of overhead.
This makes queries with a large amount of output _a lot_ faster. For an example
query where all packages are already loaded, I observe a difference of ~3.5s
before this change to ~1.6s after this change.
PiperOrigin-RevId: 177426957
|
|
|
|
|
|
|
|
|
| |
Split collect, concurrent, vfs, windows into package-level BUILD files.
Move clock classes out of "util", into their own Java package.
Move CompactHashSet into its own Java package to break a dependency cycle.
Give nestedset and inmemoryfs their own package-level BUILD files.
PiperOrigin-RevId: 167702127
|
|
|
|
|
|
|
|
|
|
| |
roots
It also changes a few accessors of utility methods in Skyframe library. It
refactors the QueryExpressionMapper to use a general QueryExpressionVisitor.
RELNOTES: None
PiperOrigin-RevId: 165534908
|
|
|
|
|
|
|
|
|
|
|
| |
If --incompatible_descriptive_string_representations is passed, labels are converted
to strings using `repr` differently: `Label("//package:name")` instead of
`"//package:name"`
This CL doesn't affect representations of other object types but provides the
necessary infrastructure for it.
PiperOrigin-RevId: 160955284
|
|
|
|
|
|
|
| |
It's now easier to customize Printer if in different situations objects should
be printed differently. Also its API is cleaner now. Names of methods of SkylarkValue objects now reflect names of Skylark functions: SkylarkValue#repr and SkylarkPrintableValue#str.
PiperOrigin-RevId: 160635154
|
|
|
|
|
|
|
| |
With a few manual fixes for readability.
RELNOTES: None.
PiperOrigin-RevId: 160582556
|
|
|
|
|
|
|
|
| |
types when running query output. Instead, simply return a list of list types, each list type being the concatenation of each of the possible outputs in each select.
RELNOTES:
Make querying attributes formed by selector lists of list types more efficient by no longer listing every possible combination of attribute value but by more compactly storing the possible values of the list.
PiperOrigin-RevId: 160326041
|
|
|
|
|
|
|
|
|
|
| |
Subinclude targets' packages are the package containing the load
statement. Subinclude targets' labels are the bzl files they refer to.
The latter has the appropriate package to display for --output=package.
Fixes #3122.
PiperOrigin-RevId: 159750840
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Tickled a hidden bug in Blaze query.
RELNOTES: None
PiperOrigin-RevId: 159718294
|
|
|
|
|
|
| |
RELNOTES[INC]: The --output=location flag to 'bazel query' cannot be used with query expressions that involve the 'buildfiles' or 'loadfiles' operators. This also applies to 'genquery' rules.
PiperOrigin-RevId: 159259061
|
|
|
|
|
|
|
| |
Fixes #3122.
RELNOTES: bazel query --output package now displays packages from external repository with the format "@reponame//package". Packages in the main repository continue to have the format "package".
PiperOrigin-RevId: 158327492
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, attributes with select() were completely skipped.
This doesn't attempt to merge "trivial" selects, e.g. even though:
attr = [":foo"] + select({"//conditions:default": [":bar"]})
always resolves to:
attr = [":foo", ":bar"]
this change still produces:
attr = [":foo"] + [":bar"]
We could merge these in a future change, if desired. But it's not
even clear that's desired. There's conceptual value in keeping the
lists separate since that's how they were originally written. That
gives users a cue to maybe refactor their rules.
RELNOTES[NEW]: "query --output=build" now includes select()s
PiperOrigin-RevId: 152956939
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 149585165
MOS_MIGRATED_REVID=149585165
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 148844518
MOS_MIGRATED_REVID=148844518
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 148643993
MOS_MIGRATED_REVID=148643993
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This overrides the traditional has(String name, Type<>T> type)
with has(String name) and removes the type check outright from
isConfigurable.
Ideally we'd remove the old version in this same change. But there
are enough uses of it that that's not a risk-free change and
is safer as followup changes.
--
PiperOrigin-RevId: 147513593
MOS_MIGRATED_REVID=147513593
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The name attribute gets special treatment in the codebase, in that
it's not simply yet another attribute but stored in it's own field.
Thus, every callside dealing with attributes needs to be aware of
this special case and explicitly handle the name attribute. It's
easy to see that this can lead to bugs. For example, querying for
the name attribute is currently broken due the querying code not
being aware of the special case [1].
Discussions with experienced bazel developers came to the conclusion
that there is no need (anymore) to treat the name attribute specially
and thus we decided it's best to remove the special treatment and
handle the name attribute as any other attribute.
This change removes the handling of name attributes and also adds a test
case to verify that bug [1] is fixed.
[1] https://github.com/bazelbuild/bazel/issues/278
--
PiperOrigin-RevId: 147446345
MOS_MIGRATED_REVID=147446345
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=139508838
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Fixes #1863
--
MOS_MIGRATED_REVID=134767527
|
|
|
|
|
|
|
|
| |
Usually an OutputStream will do. Forgo the extra layer of indirection and
stream directly to the output.
--
MOS_MIGRATED_REVID=134682243
|
|
|
|
|
|
|
| |
FIXED=31439098
--
MOS_MIGRATED_REVID=133751771
|
|
|
|
|
|
|
| |
callback for streaming a precomputed result.
--
MOS_MIGRATED_REVID=133720742
|
|
|
|
|
|
|
|
| |
Closes #1496.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/1496
MOS_MIGRATED_REVID=129846158
|
|
|
|
|
|
|
| |
potentially-relevant options from the creation of the callback.
--
MOS_MIGRATED_REVID=124981132
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=119655452
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This is in preparation of implementing dependency filtering correctly
for aspects.
--
MOS_MIGRATED_REVID=112721440
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=112717648
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=109908202
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
--
MOS_MIGRATED_REVID=109005097
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=108368348
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=108142169
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=105854596
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103798663
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This will make it easier for future changes to modify this common code.
--
MOS_MIGRATED_REVID=101464103
|
|
|
|
|
|
|
| |
Implicit attributes start with '_' to make the output parsable.
--
MOS_MIGRATED_REVID=101151243
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks 'blaze query'
*** Original change description ***
Skylark: write labels readably
Write a label as Label("//x:x") instead of merely "//x:x", so it can be read
and evaluated back, as per the Python convention. However, the OutputFormatter
for BUILD files still needs to output "//x:x".
--
MOS_MIGRATED_REVID=97156166
|
|
|
|
|
|
|
|
|
| |
Write a label as Label("//x:x") instead of merely "//x:x", so it can be read
and evaluated back, as per the Python convention. However, the OutputFormatter
for BUILD files still needs to output "//x:x".
--
MOS_MIGRATED_REVID=96209979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move printing code from EvalUtils to Printer.
Rename functions in Printer:
printValue becomes str or print,
prettyPrintValue becomes repr or write,
formatString becomes format,
makeFormattable becomes strFormattable,
prettyPrintValues becomes listString.
write being self-sufficient is made the reference,
and print is the one that is a wrapper around write,
rather than the other way around, avoiding mutual recursion.
--
MOS_MIGRATED_REVID=95897834
|