From 586ef002d25f177076f6990d4ca8360993704357 Mon Sep 17 00:00:00 2001 From: twerth Date: Thu, 22 Feb 2018 10:07:49 -0800 Subject: Move newly created protos to analysis package. These may be reused by configured query, so rather move it early before consumers starts depending on the old name. RELNOTES: None PiperOrigin-RevId: 186633754 --- src/main/protobuf/BUILD | 2 +- src/main/protobuf/action_graph.proto | 157 ----------------------------------- src/main/protobuf/analysis.proto | 157 +++++++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+), 158 deletions(-) delete mode 100644 src/main/protobuf/action_graph.proto create mode 100644 src/main/protobuf/analysis.proto (limited to 'src/main/protobuf') diff --git a/src/main/protobuf/BUILD b/src/main/protobuf/BUILD index cdb557a374..2223fb5a4e 100644 --- a/src/main/protobuf/BUILD +++ b/src/main/protobuf/BUILD @@ -14,7 +14,7 @@ exports_files( FILES = [ "action_cache", - "action_graph", + "analysis", "android_deploy_info", "bazel_flags", "build", diff --git a/src/main/protobuf/action_graph.proto b/src/main/protobuf/action_graph.proto deleted file mode 100644 index fdb49d79ca..0000000000 --- a/src/main/protobuf/action_graph.proto +++ /dev/null @@ -1,157 +0,0 @@ -// 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 action_graph; - -option java_package = "com.google.devtools.build.lib.actions"; -option java_outer_classname = "ActionGraphProtos"; - -// 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 action graph. - 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 action graph. - 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 action graph. - 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 action graph. - 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 action graph. - 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 action graph. - string id = 1; - - // The mnemonic representing the build configuration. - string mnemonic = 2; - - // The platform string. - string platform_name = 3; -} - -message KeyValuePair { - // The variable name. - string key = 1; - - // The variable value. - string value = 2; -} diff --git a/src/main/protobuf/analysis.proto b/src/main/protobuf/analysis.proto new file mode 100644 index 0000000000..ec7e7fd679 --- /dev/null +++ b/src/main/protobuf/analysis.proto @@ -0,0 +1,157 @@ +// 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"; + +// 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; +} + +message KeyValuePair { + // The variable name. + string key = 1; + + // The variable value. + string value = 2; +} -- cgit v1.2.3