aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/query2
Commit message (Collapse)AuthorAge
* Parametrize aspect definition with AspectParameters.Gravatar Dmitry Lomov2015-11-02
| | | | | -- MOS_MIGRATED_REVID=106848269
* Introduce QuiescingExecutorGravatar Mark Schaller2015-11-02
| | | | | | | | | | | | This interface (mostly) encapsulates what the ValueVisitor expects from the AbstractQueueVisitor class it currently inherits from. This makes it easier for a future CL to change ValueVisitor's strategy of code reuse from inheritance to composition. RELNOTES: -- MOS_MIGRATED_REVID=106728863
* Implement propagation along dependencies for Skylark aspects.Gravatar Dmitry Lomov2015-11-02
| | | | | -- MOS_MIGRATED_REVID=106694515
* Introduce an AspectClass: a representation of a class of aspects.Gravatar Dmitry Lomov2015-10-22
| | | | | | | For native aspects, AspectClass is a facade for Class<AspectFactory<...>>. -- MOS_MIGRATED_REVID=105986390
* In SkyQueryEnvironment, check TransitiveTraversalValues for errorsGravatar Mark Schaller2015-10-22
| | | | | | | | | | | | | | | In SkyQueryEnvironment, the buildTransitiveClosure method ignored the error messages in successfully evaluated TransitiveTraversalValues, under the belief that any such error messages are also obtainable by calling getMissingAndExceptions. This happens to be true right now, but may not be true in the future. If, in particular, the TransitiveTraversal skyfunction inlines its call to the TargetMarker skyfunction, those error messages won't be available through getMissingAndExceptions. -- MOS_MIGRATED_REVID=105980430
* Make 'blaze query --output=build' 25 times faster.Gravatar Laurent Le Brun2015-10-20
| | | | | -- MOS_MIGRATED_REVID=105854596
* Make recursive package wildcards work in remote repositories.Gravatar Lukacs Berki2015-10-15
| | | | | | | Ideally, PrepareDepsOfPatternFunction and maybe even RecursivePkgFunction would also be changed to take a PackageIdentifier instead of RootedPath because the less places we store the set of roots, the better, but I've done enough refactoring in the past weeks to not be thrilled by the idea of doing more. -- MOS_MIGRATED_REVID=105486561
* Allow other ExecutorService implementations in AbstractQueueVisitorGravatar Mark Schaller2015-10-13
| | | | | | | Previously, only ThreadPoolExecutor implementations were allowed. -- MOS_MIGRATED_REVID=105340237
* Add the ability to filter out attributes when doing queries.Gravatar Miguel Alcon Pinto2015-10-09
| | | | | -- MOS_MIGRATED_REVID=104979750
* Rename PackageManager.getTargetPatternEvaluator to newTargetPatternEval.Gravatar Ulf Adams2015-09-30
| | | | | | | | Also change the semantics to create a new one on every call; inject the offset where we were previously relying on hidden state in the SkyframeExecutor. -- MOS_MIGRATED_REVID=104188580
* Don't crash when building environment groups directlyGravatar Greg Estren2015-09-30
| | | | | | | | | | (following PackageGroup's precedent). Also cleanup: generalize the pattern by which we determine non-configurable target types. -- MOS_MIGRATED_REVID=104125803
* 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 TargetFormatter available for tests.Gravatar Janak Ramakrishnan2015-09-24
| | | | | -- MOS_MIGRATED_REVID=103798663
* Improve performance of Sky query.Gravatar Miguel Alcon Pinto2015-09-24
| | | | | -- MOS_MIGRATED_REVID=103793399
* 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
* Stop throwing an exception if a Package was successfully created but ↵Gravatar Janak Ramakrishnan2015-09-17
| | | | | | | | | | | contains errors. Instead, require callers to process the package and throw if they need to. This allows us to avoid embedding a Package in an exception, which is icky. This also allows us to remove Package#containsTemporaryErrors. Most callers' changes are fairly straightforward. The exception is EnvironmentBackedRecursivePackageProvider, which cannot throw an exception of its own in case of a package with errors (because it doesn't do that in keep_going mode), but whose request for a package with errors *should* shut down the build in case of nokeep_going mode. To do this in Skyframe, we have a new PackageErrorFunction which is to be called only in this situation, and will unconditionally throw. EnvironmentBackedRecursivePackageProvider can then catch this exception and continue on as usual, except that the exception will shut down the thread pool in a nokeep_going build. -- MOS_MIGRATED_REVID=103247761
* Remove commentGravatar Miguel Alcon Pinto2015-09-16
| | | | | | | | | | | | Also includes the following changes: Fix a bug in which the dead code pruner throws if users specify J2ObjC proto classes as entry classes. -- Make skyquery more optimal. -- MOS_MIGRATED_REVID=103213483
* Parse the label syntax "@//a:b" so that eventually we can make that the ↵Gravatar Lukacs Berki2015-09-15
| | | | | | | | | syntax that means "refer to the main repository". There isn't an overarching plan for what we are going to do with the cmdline package, which seems to be separated from the .syntax one in all sorts of awkward ways. -- MOS_MIGRATED_REVID=103088960
* Fix rbuildfiles query operation for broken packages. We use to assume that ↵Gravatar Miguel Alcon Pinto2015-09-11
| | | | | | | all the packages referenced by subinclude files should be in the graph. But this is not the case when the package is in error (The package is in the graph but as an error value, not as a package value). This produced the crash seen in [1] for a simple query like rbuildfiles(broken/BUILD). -- MOS_MIGRATED_REVID=102869135
* 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
* The rbuildfiles operator in blaze query now correctly handles loads and ↵Gravatar John Field2015-09-09
| | | | | | | subincludes of files in subdirectories of a package. -- MOS_MIGRATED_REVID=102659838
* Use AutoProfiler in the Bazel codebase.Gravatar Nathan Harmata2015-09-08
| | | | | -- MOS_MIGRATED_REVID=102584924
* 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
* Fix some warnings.Gravatar Ulf Adams2015-09-04
| | | | | -- MOS_MIGRATED_REVID=102332437
* Code cleanupGravatar Laurent Le Brun2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102239051
* 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
* Move PackageIdentifier to cmdlineGravatar Kristina Chodorow2015-08-31
| | | | | | | | This is necessary to have TargetResolver depend on it without making it depend on the packages target. First step of #389. -- MOS_MIGRATED_REVID=101790345
* Only construct ErrorInfo string when error is not a cycleGravatar Mark Schaller2015-08-28
| | | | | | | | | | | | Occasionally, when there is an error, but it's an acceptable error because it's a cycle, the ErrorInfo string is too large to construct. We should only construct the string for an error when we're going to print it out, which is when it's not a cycle. (We don't expect to see any non-cycle errors though.) -- MOS_MIGRATED_REVID=101697924
* 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
* No-op refactoring of output formatters to re-use common code.Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | This will make it easier for future changes to modify this common code. -- MOS_MIGRATED_REVID=101464103
* Remove unnecessary use of ResolvedTargets in SkyQueryEnvironment.Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | ResolvedTargets#getTargets already doesn't contain any of ResolvedTargets#filteredTargets, and there is a 1-1 mapping between Labels and Targets, so the filtering we were doing was useless. -- MOS_MIGRATED_REVID=101463111
* Improve efficiency of reverse queries for Skyframe by memoizing ↵Gravatar Miguel Alcon Pinto2015-08-24
| | | | | | | getAllowedDeps calls on the same batch call -- MOS_MIGRATED_REVID=101238126
* Fix import for CompactHashSet.Gravatar David Chen2015-08-21
| | | | | -- MOS_MIGRATED_REVID=101204982
* Add rbuildfiles function to queries, only for use when using ↵Gravatar Janak Ramakrishnan2015-08-21
| | | | | | | | | SkyQueryEnvironment. rbuildfiles returns the packages (in the form of BUILD files) that depend on the given source files as BUILD files or subincludes. -- MOS_MIGRATED_REVID=101157700
* Filter out targets not in the universe (as defined by the lack of transitive ↵Gravatar Janak Ramakrishnan2015-08-21
| | | | | | | traversal values) from queries. -- MOS_MIGRATED_REVID=101151407
* Fix output of query --output=buildGravatar Laurent Le Brun2015-08-21
| | | | | | | Implicit attributes start with '_' to make the output parsable. -- MOS_MIGRATED_REVID=101151243
* Make SkyQueryEnvironment more efficient retrieving the labels.Gravatar Miguel Alcon Pinto2015-08-20
| | | | | -- MOS_MIGRATED_REVID=101021838
* Use Set<Target> instead of ResolvedTargets<Target> when saving resolved ↵Gravatar Janak Ramakrishnan2015-08-18
| | | | | | | | | target patterns in query. We never use anything but the getTargets() field, so it's useless to store other things. -- MOS_MIGRATED_REVID=100846573
* Adds TransitiveTraversalFunction that loads transitive deps of a targetGravatar Mark Schaller2015-07-30
| | | | | | | | | Unlike TransitiveTargetFunction, it does not return nested sets of the traversed targets. Used primarily for its side effects of loading the transitive targets into the graph. -- MOS_MIGRATED_REVID=99388411
* Add some useful logging of "blaze query" timing.Gravatar Eric Fellheimer2015-07-29
| | | | | -- MOS_MIGRATED_REVID=99302436
* Throw InterruptedException directly if a query is interrupted, instead of ↵Gravatar Janak Ramakrishnan2015-07-10
| | | | | | | | | wrapping it in a QueryException. QueryException should usually indicate a persistent failure, while an InterruptedException is transient. Wrapping the InterruptedException in a QueryException just obfuscates state. -- MOS_MIGRATED_REVID=97815388
* 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
* Activate interleaved package and transitive target loadingGravatar Mark Schaller2015-07-08
| | | | | | | | Hooks up the recently introduced interleaved loading functions to normal graph loading. -- MOS_MIGRATED_REVID=97679451
* Rollback of commit 13ef26d0817a429bf214d3dc4c5551e616e403fe.Gravatar Laurent Le Brun2015-06-30
| | | | | | | | | | | | | | | | | *** 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