This repository has been archived by the owner on Sep 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dependency on Bazel's build.proto.
Fixes #4 -- MOS_MIGRATED_REVID=119722062
- Loading branch information
1 parent
9407f39
commit 833e33f
Showing
11 changed files
with
113 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// Copyright 2014 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 = "proto2"; | ||
|
||
package skydoc; | ||
|
||
message Attribute { | ||
// Indicates the type of attribute. | ||
enum Discriminator { | ||
INTEGER = 1; // int_value | ||
STRING = 2; // string_value | ||
LABEL = 3; // string_value | ||
OUTPUT = 4; // string_value | ||
STRING_LIST = 5; // string_list_value | ||
LABEL_LIST = 6; // string_list_value | ||
OUTPUT_LIST = 7; // string_list_value | ||
DISTRIBUTION_SET = 8; // string_list_value - order is unimportant | ||
LICENSE = 9; // license | ||
STRING_DICT = 10; // string_dict_value | ||
FILESET_ENTRY_LIST = 11; // fileset_list_value | ||
LABEL_LIST_DICT = 12; // label_list_dict_value | ||
STRING_LIST_DICT = 13; // string_list_dict_value | ||
BOOLEAN = 14; // int, bool and string value | ||
TRISTATE = 15; // tristate, int and string value | ||
INTEGER_LIST = 16; // int_list_value | ||
STRING_DICT_UNARY = 17; // string_dict_unary_value | ||
UNKNOWN = 18; // unknown type, use only for build extensions | ||
LABEL_DICT_UNARY = 19; // label_dict_unary_value | ||
SELECTOR_LIST = 20; // selector_list | ||
NAME = 21; // name, use only for the name attribute | ||
} | ||
} | ||
|
||
// Information about allowed rule classes for a specific attribute of a rule. | ||
message AllowedRuleClassInfo { | ||
enum AllowedRuleClasses { | ||
ANY = 1; // Any rule is allowed to be in this attribute | ||
SPECIFIED = 2; // Only the explicitly listed rules are allowed | ||
} | ||
|
||
required AllowedRuleClasses policy = 1; | ||
|
||
// Rule class names of rules allowed in this attribute, e.g "cc_library", | ||
// "py_binary". Only present if the allowed_rule_classes field is set to | ||
// SPECIFIED. | ||
repeated string allowed_rule_class = 2; | ||
} | ||
|
||
// This message represents a single attribute of a single rule. | ||
message AttributeDefinition { | ||
|
||
// Rule name, e.g. "cc_library" | ||
required string name = 1; | ||
required Attribute.Discriminator type = 2; | ||
required bool mandatory = 3; | ||
|
||
// Only present for attributes of type LABEL and LABEL_LIST. | ||
optional AllowedRuleClassInfo allowed_rule_classes = 4; | ||
|
||
optional string documentation = 5; | ||
} | ||
|
||
message RuleDefinition { | ||
required string name = 1; | ||
// Only contains documented attributes | ||
repeated AttributeDefinition attribute = 2; | ||
|
||
optional string documentation = 3; | ||
|
||
optional string example_documentation = 4; | ||
|
||
} | ||
|
||
message BuildLanguage { | ||
// Only contains documented rule definitions | ||
repeated RuleDefinition rule = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters