|  | // Copyright 2018 The Bazel Authors. All rights reserved. | 
|  | // | 
|  | // Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | // you may not use this file except in compliance with the License. | 
|  | // You may obtain a copy of the License at | 
|  | // | 
|  | //    http://www.apache.org/licenses/LICENSE-2.0 | 
|  | // | 
|  | // Unless required by applicable law or agreed to in writing, software | 
|  | // distributed under the License is distributed on an "AS IS" BASIS, | 
|  | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | // See the License for the specific language governing permissions and | 
|  | // limitations under the License. | 
|  |  | 
|  | syntax = "proto3"; | 
|  |  | 
|  | package analysis; | 
|  |  | 
|  | option java_package = "com.google.devtools.build.lib.analysis"; | 
|  | option java_outer_classname = "AnalysisProtos"; | 
|  |  | 
|  | import "src/main/protobuf/build.proto"; | 
|  |  | 
|  | // Container for the action graph properties. | 
|  | message ActionGraphContainer { | 
|  | repeated Artifact artifacts = 1; | 
|  | repeated Action actions = 2; | 
|  | repeated Target targets = 3; | 
|  | repeated DepSetOfFiles dep_set_of_files = 4; | 
|  | repeated Configuration configuration = 5; | 
|  | repeated AspectDescriptor aspect_descriptors = 6; | 
|  | repeated RuleClass rule_classes = 7; | 
|  | } | 
|  |  | 
|  | // Represents a single artifact, whether it's a source file or a derived output | 
|  | // file. | 
|  | message Artifact { | 
|  | // Identifier for this artifact; this is an opaque string, only valid for this | 
|  | // particular dump of the analysis. | 
|  | string id = 1; | 
|  |  | 
|  | // The relative path of the file within the execution root. | 
|  | string exec_path = 2; | 
|  |  | 
|  | // True iff the artifact is a tree artifact, i.e. the above exec_path refers | 
|  | // a directory. | 
|  | bool is_tree_artifact = 3; | 
|  | } | 
|  |  | 
|  | // Represents a single action, which is a function from Artifact(s) to | 
|  | // Artifact(s). | 
|  | message Action { | 
|  | // The target that was responsible for the creation of the action. | 
|  | string target_id = 1; | 
|  |  | 
|  | // The aspects that were responsible for the creation of the action (if any). | 
|  | repeated string aspect_descriptor_ids = 2; | 
|  |  | 
|  | // Encodes all significant behavior that might affect the output. The key | 
|  | // must change if the work performed by the execution of this action changes. | 
|  | // Note that the key doesn't include checksums of the input files. | 
|  | string action_key = 3; | 
|  |  | 
|  | // The mnemonic for this kind of action. | 
|  | string mnemonic = 4; | 
|  |  | 
|  | // The configuration under which this action is executed. | 
|  | string configuration_id = 5; | 
|  |  | 
|  | // The command line arguments of the action. This will be only set if | 
|  | // explicitly requested. | 
|  | repeated string arguments = 6; | 
|  |  | 
|  | // The list of environment variables to be set before executing the command. | 
|  | repeated KeyValuePair environment_variables = 7; | 
|  |  | 
|  | // The set of input dep sets that the action depends upon. If the action does | 
|  | // input discovery, the contents of this set might change during execution. | 
|  | repeated string input_dep_set_ids = 8; | 
|  |  | 
|  | // The list of Artifact IDs that represent the output files that this action | 
|  | // will generate. | 
|  | repeated string output_ids = 9; | 
|  |  | 
|  | // True iff the action does input discovery during execution. | 
|  | bool discovers_inputs = 10; | 
|  | } | 
|  |  | 
|  | // Represents a single target (without configuration information) that is | 
|  | // associated with an action. | 
|  | message Target { | 
|  | // Identifier for this target; this is an opaque string, only valid for this | 
|  | // particular dump of the analysis. | 
|  | string id = 1; | 
|  |  | 
|  | // Label of the target, e.g. //foo:bar. | 
|  | string label = 2; | 
|  |  | 
|  | // Class of the rule. | 
|  | string rule_class_id = 3; | 
|  | } | 
|  |  | 
|  | message RuleClass { | 
|  | // Identifier for this rule class; this is an opaque string, only valid for | 
|  | // this particular dump of the analysis. | 
|  | string id = 1; | 
|  |  | 
|  | // Name of the rule class, e.g. cc_library. | 
|  | string name = 2; | 
|  | } | 
|  |  | 
|  | // Represents an invocation specific descriptor of an aspect. | 
|  | message AspectDescriptor { | 
|  | // Identifier for this aspect descriptor; this is an opaque string, only valid | 
|  | // for the particular dump of the analysis. | 
|  | string id = 1; | 
|  |  | 
|  | // The name of the corresponding aspect. For native aspects, it's the Java | 
|  | // class name, for Skylark aspects it's the bzl file followed by a % sign | 
|  | // followed by the name of the aspect. | 
|  | string name = 2; | 
|  |  | 
|  | // The list of parameters bound to a particular invocation of that aspect on | 
|  | // a target. Note that aspects can be executed multiple times on the same | 
|  | // target in different order. | 
|  | repeated KeyValuePair parameters = 3; | 
|  | } | 
|  |  | 
|  | message DepSetOfFiles { | 
|  | // Identifier for this named set of files; this is an opaque string, only | 
|  | // valid for the particular dump of the analysis. | 
|  | string id = 1; | 
|  |  | 
|  | // Other transitively included named set of files. | 
|  | repeated string transitive_dep_set_ids = 2; | 
|  |  | 
|  | // The list of input artifact IDs that are immediately contained in this set. | 
|  | repeated string direct_artifact_ids = 3; | 
|  | } | 
|  |  | 
|  | message Configuration { | 
|  | // Identifier for this configuration; this is an opaque string, only valid for | 
|  | // the particular dump of the analysis. | 
|  | string id = 1; | 
|  |  | 
|  | // The mnemonic representing the build configuration. | 
|  | string mnemonic = 2; | 
|  |  | 
|  | // The platform string. | 
|  | string platform_name = 3; | 
|  |  | 
|  | // The checksum representation of the configuration options; | 
|  | string checksum = 4; | 
|  | } | 
|  |  | 
|  | message KeyValuePair { | 
|  | // The variable name. | 
|  | string key = 1; | 
|  |  | 
|  | // The variable value. | 
|  | string value = 2; | 
|  | } | 
|  |  | 
|  | message ConfiguredTarget { | 
|  | // The target. We use blaze_query.Target defined in build.proto instead of | 
|  | // the Target defined in this file because blaze_query.Target is much heavier | 
|  | // and will output proto results similar to what users are familiar with from | 
|  | // regular blaze query. | 
|  | blaze_query.Target target = 1; | 
|  |  | 
|  | // The configuration | 
|  | Configuration configuration = 2; | 
|  | } | 
|  |  | 
|  | // Container for cquery results | 
|  | message CqueryResult { | 
|  | // All the configuredtargets returns by cquery | 
|  | repeated ConfiguredTarget results = 1; | 
|  | } |