internal

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_QUERY_TEMPLATE = "set({{.Targets}})"
View Source
const (
	Default_FilesetEntry_SymlinkBehavior = FilesetEntry_COPY
)

Default values for FilesetEntry fields.

Variables

View Source
var (
	FilesetEntry_SymlinkBehavior_name = map[int32]string{
		1: "COPY",
		2: "DEREFERENCE",
	}
	FilesetEntry_SymlinkBehavior_value = map[string]int32{
		"COPY":        1,
		"DEREFERENCE": 2,
	}
)

Enum value maps for FilesetEntry_SymlinkBehavior.

View Source
var (
	Attribute_Discriminator_name = map[int32]string{
		1:  "INTEGER",
		2:  "STRING",
		3:  "LABEL",
		4:  "OUTPUT",
		5:  "STRING_LIST",
		6:  "LABEL_LIST",
		7:  "OUTPUT_LIST",
		8:  "DISTRIBUTION_SET",
		9:  "LICENSE",
		10: "STRING_DICT",
		11: "FILESET_ENTRY_LIST",
		12: "LABEL_LIST_DICT",
		13: "STRING_LIST_DICT",
		14: "BOOLEAN",
		15: "TRISTATE",
		16: "INTEGER_LIST",
		18: "UNKNOWN",
		19: "LABEL_DICT_UNARY",
		20: "SELECTOR_LIST",
		21: "LABEL_KEYED_STRING_DICT",
		17: "DEPRECATED_STRING_DICT_UNARY",
	}
	Attribute_Discriminator_value = map[string]int32{
		"INTEGER":                      1,
		"STRING":                       2,
		"LABEL":                        3,
		"OUTPUT":                       4,
		"STRING_LIST":                  5,
		"LABEL_LIST":                   6,
		"OUTPUT_LIST":                  7,
		"DISTRIBUTION_SET":             8,
		"LICENSE":                      9,
		"STRING_DICT":                  10,
		"FILESET_ENTRY_LIST":           11,
		"LABEL_LIST_DICT":              12,
		"STRING_LIST_DICT":             13,
		"BOOLEAN":                      14,
		"TRISTATE":                     15,
		"INTEGER_LIST":                 16,
		"UNKNOWN":                      18,
		"LABEL_DICT_UNARY":             19,
		"SELECTOR_LIST":                20,
		"LABEL_KEYED_STRING_DICT":      21,
		"DEPRECATED_STRING_DICT_UNARY": 17,
	}
)

Enum value maps for Attribute_Discriminator.

View Source
var (
	Attribute_Tristate_name = map[int32]string{
		0: "NO",
		1: "YES",
		2: "AUTO",
	}
	Attribute_Tristate_value = map[string]int32{
		"NO":   0,
		"YES":  1,
		"AUTO": 2,
	}
)

Enum value maps for Attribute_Tristate.

View Source
var (
	Target_Discriminator_name = map[int32]string{
		1: "RULE",
		2: "SOURCE_FILE",
		3: "GENERATED_FILE",
		4: "PACKAGE_GROUP",
		5: "ENVIRONMENT_GROUP",
	}
	Target_Discriminator_value = map[string]int32{
		"RULE":              1,
		"SOURCE_FILE":       2,
		"GENERATED_FILE":    3,
		"PACKAGE_GROUP":     4,
		"ENVIRONMENT_GROUP": 5,
	}
)

Enum value maps for Target_Discriminator.

View Source
var (
	AllowedRuleClassInfo_AllowedRuleClasses_name = map[int32]string{
		1: "ANY",
		2: "SPECIFIED",
	}
	AllowedRuleClassInfo_AllowedRuleClasses_value = map[string]int32{
		"ANY":       1,
		"SPECIFIED": 2,
	}
)

Enum value maps for AllowedRuleClassInfo_AllowedRuleClasses.

View Source
var File_build_proto protoreflect.FileDescriptor
View Source
var Filesystem = &filesystem{}
View Source
var HexArray = []byte("0123456789abcdef")

Functions

func ReadHashFile

func ReadHashFile(filename string) (map[string]string, error)

func WriteHashFile

func WriteHashFile(filename string, data interface{}) (string, error)

func WriteTargetsFile

func WriteTargetsFile(targets map[string]bool, output string)

Types

type AllowedRuleClassInfo

type AllowedRuleClassInfo struct {
	Policy *AllowedRuleClassInfo_AllowedRuleClasses `protobuf:"varint,1,req,name=policy,enum=blaze_query.AllowedRuleClassInfo_AllowedRuleClasses" json:"policy,omitempty"`
	// 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.
	AllowedRuleClass []string `protobuf:"bytes,2,rep,name=allowed_rule_class,json=allowedRuleClass" json:"allowed_rule_class,omitempty"`
	// contains filtered or unexported fields
}

Information about allowed rule classes for a specific attribute of a rule.

func (*AllowedRuleClassInfo) Descriptor deprecated

func (*AllowedRuleClassInfo) Descriptor() ([]byte, []int)

Deprecated: Use AllowedRuleClassInfo.ProtoReflect.Descriptor instead.

func (*AllowedRuleClassInfo) GetAllowedRuleClass

func (x *AllowedRuleClassInfo) GetAllowedRuleClass() []string

func (*AllowedRuleClassInfo) GetPolicy

func (*AllowedRuleClassInfo) ProtoMessage

func (*AllowedRuleClassInfo) ProtoMessage()

func (*AllowedRuleClassInfo) ProtoReflect

func (x *AllowedRuleClassInfo) ProtoReflect() protoreflect.Message

func (*AllowedRuleClassInfo) Reset

func (x *AllowedRuleClassInfo) Reset()

func (*AllowedRuleClassInfo) String

func (x *AllowedRuleClassInfo) String() string

type AllowedRuleClassInfo_AllowedRuleClasses

type AllowedRuleClassInfo_AllowedRuleClasses int32
const (
	AllowedRuleClassInfo_ANY       AllowedRuleClassInfo_AllowedRuleClasses = 1 // Any rule is allowed to be in this attribute
	AllowedRuleClassInfo_SPECIFIED AllowedRuleClassInfo_AllowedRuleClasses = 2 // Only the explicitly listed rules are allowed
)

func (AllowedRuleClassInfo_AllowedRuleClasses) Descriptor

func (AllowedRuleClassInfo_AllowedRuleClasses) Enum

func (AllowedRuleClassInfo_AllowedRuleClasses) EnumDescriptor deprecated

func (AllowedRuleClassInfo_AllowedRuleClasses) EnumDescriptor() ([]byte, []int)

Deprecated: Use AllowedRuleClassInfo_AllowedRuleClasses.Descriptor instead.

func (AllowedRuleClassInfo_AllowedRuleClasses) Number

func (AllowedRuleClassInfo_AllowedRuleClasses) String

func (AllowedRuleClassInfo_AllowedRuleClasses) Type

func (*AllowedRuleClassInfo_AllowedRuleClasses) UnmarshalJSON deprecated

func (x *AllowedRuleClassInfo_AllowedRuleClasses) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type Attribute

type Attribute struct {

	// The name of the attribute
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// Whether the attribute was explicitly specified
	ExplicitlySpecified *bool `protobuf:"varint,13,opt,name=explicitly_specified,json=explicitlySpecified" json:"explicitly_specified,omitempty"`
	// If this attribute has a string value or a string list value, then this
	// may be set to indicate that the value may be treated as a label that
	// isn't a dependency of this attribute's rule.
	Nodep *bool `protobuf:"varint,20,opt,name=nodep" json:"nodep,omitempty"`
	// The type of attribute.  This message is used for all of the different
	// attribute types so the discriminator helps for figuring out what is
	// stored in the message.
	Type *Attribute_Discriminator `protobuf:"varint,2,req,name=type,enum=blaze_query.Attribute_Discriminator" json:"type,omitempty"`
	// If this attribute has an integer value this will be populated.
	// Boolean and TriState also use this field as [0,1] and [-1,0,1]
	// for [false, true] and [auto, no, yes] respectively.
	IntValue *int32 `protobuf:"varint,3,opt,name=int_value,json=intValue" json:"int_value,omitempty"`
	// If the attribute has a string value this will be populated.  Label and
	// path attributes use this field as the value even though the type may
	// be LABEL or something else other than STRING.
	StringValue *string `protobuf:"bytes,5,opt,name=string_value,json=stringValue" json:"string_value,omitempty"`
	// If the attribute has a boolean value this will be populated.
	BooleanValue *bool `protobuf:"varint,14,opt,name=boolean_value,json=booleanValue" json:"boolean_value,omitempty"`
	// If the attribute is a Tristate value, this will be populated.
	TristateValue *Attribute_Tristate `` /* 131-byte string literal not displayed */
	// The value of the attribute has a list of string values (label and path
	// note from STRING applies here as well).
	StringListValue []string `protobuf:"bytes,6,rep,name=string_list_value,json=stringListValue" json:"string_list_value,omitempty"`
	// If this is a license attribute, the license information is stored here.
	License *License `protobuf:"bytes,7,opt,name=license" json:"license,omitempty"`
	// If this is a string dict, each entry will be stored here.
	StringDictValue []*StringDictEntry `protobuf:"bytes,8,rep,name=string_dict_value,json=stringDictValue" json:"string_dict_value,omitempty"`
	// If the attribute is part of a Fileset, the fileset entries are stored in
	// this field.
	FilesetListValue []*FilesetEntry `protobuf:"bytes,9,rep,name=fileset_list_value,json=filesetListValue" json:"fileset_list_value,omitempty"`
	// If this is a label list dict, each entry will be stored here.
	LabelListDictValue []*LabelListDictEntry `protobuf:"bytes,10,rep,name=label_list_dict_value,json=labelListDictValue" json:"label_list_dict_value,omitempty"`
	// If this is a string list dict, each entry will be stored here.
	StringListDictValue []*StringListDictEntry `protobuf:"bytes,11,rep,name=string_list_dict_value,json=stringListDictValue" json:"string_list_dict_value,omitempty"`
	// The value of the attribute has a list of int32 values
	IntListValue []int32 `protobuf:"varint,17,rep,name=int_list_value,json=intListValue" json:"int_list_value,omitempty"`
	// If this is a label dict unary, each entry will be stored here.
	LabelDictUnaryValue []*LabelDictUnaryEntry `protobuf:"bytes,19,rep,name=label_dict_unary_value,json=labelDictUnaryValue" json:"label_dict_unary_value,omitempty"`
	// If this is a label-keyed string dict, each entry will be stored here.
	LabelKeyedStringDictValue []*LabelKeyedStringDictEntry `` /* 136-byte string literal not displayed */
	// If this attribute's value is an expression containing one or more select
	// expressions, then its type is SELECTOR_LIST and a SelectorList will be
	// stored here.
	SelectorList                   *Attribute_SelectorList `protobuf:"bytes,21,opt,name=selector_list,json=selectorList" json:"selector_list,omitempty"`
	DEPRECATEDStringDictUnaryValue [][]byte                `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

A rule attribute. Each attribute must have a type and one of the various value fields populated - for the most part.

Attributes of BOOLEAN and TRISTATE type may set all of the int, bool, and string values for backwards compatibility with clients that expect them to be set.

Attributes of INTEGER, STRING, LABEL, LICENSE, BOOLEAN, and TRISTATE type may set *none* of the values. This can happen if the Attribute message is prepared for a client that doesn't support SELECTOR_LIST, but the rule has a selector list value for the attribute. (Selector lists for attributes of other types--the collection types--are handled differently when prepared for such a client. The possible collection values are gathered together and flattened.)

By checking the type, the appropriate value can be extracted - see the comments on each type for the associated value. The order of lists comes from the blaze parsing. If an attribute is of a list type, the associated list should never be empty.

func (*Attribute) Descriptor deprecated

func (*Attribute) Descriptor() ([]byte, []int)

Deprecated: Use Attribute.ProtoReflect.Descriptor instead.

func (*Attribute) GetBooleanValue

func (x *Attribute) GetBooleanValue() bool

func (*Attribute) GetDEPRECATEDStringDictUnaryValue

func (x *Attribute) GetDEPRECATEDStringDictUnaryValue() [][]byte

func (*Attribute) GetExplicitlySpecified

func (x *Attribute) GetExplicitlySpecified() bool

func (*Attribute) GetFilesetListValue

func (x *Attribute) GetFilesetListValue() []*FilesetEntry

func (*Attribute) GetIntListValue

func (x *Attribute) GetIntListValue() []int32

func (*Attribute) GetIntValue

func (x *Attribute) GetIntValue() int32

func (*Attribute) GetLabelDictUnaryValue

func (x *Attribute) GetLabelDictUnaryValue() []*LabelDictUnaryEntry

func (*Attribute) GetLabelKeyedStringDictValue

func (x *Attribute) GetLabelKeyedStringDictValue() []*LabelKeyedStringDictEntry

func (*Attribute) GetLabelListDictValue

func (x *Attribute) GetLabelListDictValue() []*LabelListDictEntry

func (*Attribute) GetLicense

func (x *Attribute) GetLicense() *License

func (*Attribute) GetName

func (x *Attribute) GetName() string

func (*Attribute) GetNodep

func (x *Attribute) GetNodep() bool

func (*Attribute) GetSelectorList

func (x *Attribute) GetSelectorList() *Attribute_SelectorList

func (*Attribute) GetStringDictValue

func (x *Attribute) GetStringDictValue() []*StringDictEntry

func (*Attribute) GetStringListDictValue

func (x *Attribute) GetStringListDictValue() []*StringListDictEntry

func (*Attribute) GetStringListValue

func (x *Attribute) GetStringListValue() []string

func (*Attribute) GetStringValue

func (x *Attribute) GetStringValue() string

func (*Attribute) GetTristateValue

func (x *Attribute) GetTristateValue() Attribute_Tristate

func (*Attribute) GetType

func (x *Attribute) GetType() Attribute_Discriminator

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) ProtoReflect

func (x *Attribute) ProtoReflect() protoreflect.Message

func (*Attribute) Reset

func (x *Attribute) Reset()

func (*Attribute) String

func (x *Attribute) String() string

type AttributeDefinition

type AttributeDefinition struct {
	Name               *string                  `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` // e.g. "name", "srcs"
	Type               *Attribute_Discriminator `protobuf:"varint,2,req,name=type,enum=blaze_query.Attribute_Discriminator" json:"type,omitempty"`
	Mandatory          *bool                    `protobuf:"varint,3,opt,name=mandatory" json:"mandatory,omitempty"`
	AllowedRuleClasses *AllowedRuleClassInfo    `protobuf:"bytes,4,opt,name=allowed_rule_classes,json=allowedRuleClasses" json:"allowed_rule_classes,omitempty"` // type=label*
	Documentation      *string                  `protobuf:"bytes,5,opt,name=documentation" json:"documentation,omitempty"`
	AllowEmpty         *bool                    `protobuf:"varint,6,opt,name=allow_empty,json=allowEmpty" json:"allow_empty,omitempty"`                  // type=*_list|*_dict
	AllowSingleFile    *bool                    `protobuf:"varint,7,opt,name=allow_single_file,json=allowSingleFile" json:"allow_single_file,omitempty"` // type=label
	Default            *AttributeValue          `protobuf:"bytes,9,opt,name=default" json:"default,omitempty"`                                           // simple (not computed/late-bound) values only
	Executable         *bool                    `protobuf:"varint,10,opt,name=executable" json:"executable,omitempty"`                                   // type=label
	Configurable       *bool                    `protobuf:"varint,11,opt,name=configurable" json:"configurable,omitempty"`
	Nodep              *bool                    `protobuf:"varint,12,opt,name=nodep" json:"nodep,omitempty"`                            // label-valued edge does not establish a dependency
	CfgIsHost          *bool                    `protobuf:"varint,13,opt,name=cfg_is_host,json=cfgIsHost" json:"cfg_is_host,omitempty"` // edge entails a transition to "host" configuration
	// contains filtered or unexported fields
}

This message represents a single attribute of a single rule. See https://bazel.build/rules/lib/attr.

func (*AttributeDefinition) Descriptor deprecated

func (*AttributeDefinition) Descriptor() ([]byte, []int)

Deprecated: Use AttributeDefinition.ProtoReflect.Descriptor instead.

func (*AttributeDefinition) GetAllowEmpty

func (x *AttributeDefinition) GetAllowEmpty() bool

func (*AttributeDefinition) GetAllowSingleFile

func (x *AttributeDefinition) GetAllowSingleFile() bool

func (*AttributeDefinition) GetAllowedRuleClasses

func (x *AttributeDefinition) GetAllowedRuleClasses() *AllowedRuleClassInfo

func (*AttributeDefinition) GetCfgIsHost

func (x *AttributeDefinition) GetCfgIsHost() bool

func (*AttributeDefinition) GetConfigurable

func (x *AttributeDefinition) GetConfigurable() bool

func (*AttributeDefinition) GetDefault

func (x *AttributeDefinition) GetDefault() *AttributeValue

func (*AttributeDefinition) GetDocumentation

func (x *AttributeDefinition) GetDocumentation() string

func (*AttributeDefinition) GetExecutable

func (x *AttributeDefinition) GetExecutable() bool

func (*AttributeDefinition) GetMandatory

func (x *AttributeDefinition) GetMandatory() bool

func (*AttributeDefinition) GetName

func (x *AttributeDefinition) GetName() string

func (*AttributeDefinition) GetNodep

func (x *AttributeDefinition) GetNodep() bool

func (*AttributeDefinition) GetType

func (*AttributeDefinition) ProtoMessage

func (*AttributeDefinition) ProtoMessage()

func (*AttributeDefinition) ProtoReflect

func (x *AttributeDefinition) ProtoReflect() protoreflect.Message

func (*AttributeDefinition) Reset

func (x *AttributeDefinition) Reset()

func (*AttributeDefinition) String

func (x *AttributeDefinition) String() string

type AttributeValue

type AttributeValue struct {
	Int     *int32                      `protobuf:"varint,1,opt,name=int" json:"int,omitempty"`      // type=int|tristate
	String_ *string                     `protobuf:"bytes,2,opt,name=string" json:"string,omitempty"` // type=string|label|output
	Bool    *bool                       `protobuf:"varint,3,opt,name=bool" json:"bool,omitempty"`    // type=bool
	List    []*AttributeValue           `protobuf:"bytes,4,rep,name=list" json:"list,omitempty"`     // type=*_list|distrib
	Dict    []*AttributeValue_DictEntry `protobuf:"bytes,5,rep,name=dict" json:"dict,omitempty"`     // type=*_dict
	// contains filtered or unexported fields
}

An AttributeValue represents the value of an attribute. A single field, determined by the attribute type, is populated.

It is used only for AttributeDefinition.default. Attribute and SelectorEntry do their own thing for unfortunate historical reasons.

func (*AttributeValue) Descriptor deprecated

func (*AttributeValue) Descriptor() ([]byte, []int)

Deprecated: Use AttributeValue.ProtoReflect.Descriptor instead.

func (*AttributeValue) GetBool

func (x *AttributeValue) GetBool() bool

func (*AttributeValue) GetDict

func (x *AttributeValue) GetDict() []*AttributeValue_DictEntry

func (*AttributeValue) GetInt

func (x *AttributeValue) GetInt() int32

func (*AttributeValue) GetList

func (x *AttributeValue) GetList() []*AttributeValue

func (*AttributeValue) GetString_

func (x *AttributeValue) GetString_() string

func (*AttributeValue) ProtoMessage

func (*AttributeValue) ProtoMessage()

func (*AttributeValue) ProtoReflect

func (x *AttributeValue) ProtoReflect() protoreflect.Message

func (*AttributeValue) Reset

func (x *AttributeValue) Reset()

func (*AttributeValue) String

func (x *AttributeValue) String() string

type AttributeValue_DictEntry

type AttributeValue_DictEntry struct {
	Key   *string         `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Value *AttributeValue `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*AttributeValue_DictEntry) Descriptor deprecated

func (*AttributeValue_DictEntry) Descriptor() ([]byte, []int)

Deprecated: Use AttributeValue_DictEntry.ProtoReflect.Descriptor instead.

func (*AttributeValue_DictEntry) GetKey

func (x *AttributeValue_DictEntry) GetKey() string

func (*AttributeValue_DictEntry) GetValue

func (*AttributeValue_DictEntry) ProtoMessage

func (*AttributeValue_DictEntry) ProtoMessage()

func (*AttributeValue_DictEntry) ProtoReflect

func (x *AttributeValue_DictEntry) ProtoReflect() protoreflect.Message

func (*AttributeValue_DictEntry) Reset

func (x *AttributeValue_DictEntry) Reset()

func (*AttributeValue_DictEntry) String

func (x *AttributeValue_DictEntry) String() string

type Attribute_Discriminator

type Attribute_Discriminator int32

Indicates the type of attribute.

const (
	Attribute_INTEGER                      Attribute_Discriminator = 1  // int_value
	Attribute_STRING                       Attribute_Discriminator = 2  // string_value
	Attribute_LABEL                        Attribute_Discriminator = 3  // string_value
	Attribute_OUTPUT                       Attribute_Discriminator = 4  // string_value
	Attribute_STRING_LIST                  Attribute_Discriminator = 5  // string_list_value
	Attribute_LABEL_LIST                   Attribute_Discriminator = 6  // string_list_value
	Attribute_OUTPUT_LIST                  Attribute_Discriminator = 7  // string_list_value
	Attribute_DISTRIBUTION_SET             Attribute_Discriminator = 8  // string_list_value - order is unimportant
	Attribute_LICENSE                      Attribute_Discriminator = 9  // license
	Attribute_STRING_DICT                  Attribute_Discriminator = 10 // string_dict_value
	Attribute_FILESET_ENTRY_LIST           Attribute_Discriminator = 11 // fileset_list_value
	Attribute_LABEL_LIST_DICT              Attribute_Discriminator = 12 // label_list_dict_value
	Attribute_STRING_LIST_DICT             Attribute_Discriminator = 13 // string_list_dict_value
	Attribute_BOOLEAN                      Attribute_Discriminator = 14 // int, bool and string value
	Attribute_TRISTATE                     Attribute_Discriminator = 15 // tristate, int and string value
	Attribute_INTEGER_LIST                 Attribute_Discriminator = 16 // int_list_value
	Attribute_UNKNOWN                      Attribute_Discriminator = 18 // unknown type, use only for build extensions
	Attribute_LABEL_DICT_UNARY             Attribute_Discriminator = 19 // label_dict_unary_value
	Attribute_SELECTOR_LIST                Attribute_Discriminator = 20 // selector_list
	Attribute_LABEL_KEYED_STRING_DICT      Attribute_Discriminator = 21 // label_keyed_string_dict
	Attribute_DEPRECATED_STRING_DICT_UNARY Attribute_Discriminator = 17
)

func (Attribute_Discriminator) Descriptor

func (Attribute_Discriminator) Enum

func (Attribute_Discriminator) EnumDescriptor deprecated

func (Attribute_Discriminator) EnumDescriptor() ([]byte, []int)

Deprecated: Use Attribute_Discriminator.Descriptor instead.

func (Attribute_Discriminator) Number

func (Attribute_Discriminator) String

func (x Attribute_Discriminator) String() string

func (Attribute_Discriminator) Type

func (*Attribute_Discriminator) UnmarshalJSON deprecated

func (x *Attribute_Discriminator) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type Attribute_Selector

type Attribute_Selector struct {

	// The list of (label, value) pairs in the map that defines the selector.
	// At this time, this cannot be empty, i.e. a selector has at least one
	// entry.
	Entries []*Attribute_SelectorEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
	// Whether or not this has any default values.
	HasDefaultValue *bool `protobuf:"varint,2,opt,name=has_default_value,json=hasDefaultValue" json:"has_default_value,omitempty"`
	// The error message when no condition matches.
	NoMatchError *string `protobuf:"bytes,3,opt,name=no_match_error,json=noMatchError" json:"no_match_error,omitempty"`
	// contains filtered or unexported fields
}

func (*Attribute_Selector) Descriptor deprecated

func (*Attribute_Selector) Descriptor() ([]byte, []int)

Deprecated: Use Attribute_Selector.ProtoReflect.Descriptor instead.

func (*Attribute_Selector) GetEntries

func (x *Attribute_Selector) GetEntries() []*Attribute_SelectorEntry

func (*Attribute_Selector) GetHasDefaultValue

func (x *Attribute_Selector) GetHasDefaultValue() bool

func (*Attribute_Selector) GetNoMatchError

func (x *Attribute_Selector) GetNoMatchError() string

func (*Attribute_Selector) ProtoMessage

func (*Attribute_Selector) ProtoMessage()

func (*Attribute_Selector) ProtoReflect

func (x *Attribute_Selector) ProtoReflect() protoreflect.Message

func (*Attribute_Selector) Reset

func (x *Attribute_Selector) Reset()

func (*Attribute_Selector) String

func (x *Attribute_Selector) String() string

type Attribute_SelectorEntry

type Attribute_SelectorEntry struct {

	// The key of the selector entry. At this time, this is the label of a
	// config_setting rule, or the pseudo-label "//conditions:default".
	Label *string `protobuf:"bytes,1,opt,name=label" json:"label,omitempty"`
	// True if the entry's value is the default value for the type as a
	// result of the condition value being specified as None (ie:
	// {"//condition": None}).
	IsDefaultValue *bool `protobuf:"varint,16,opt,name=is_default_value,json=isDefaultValue" json:"is_default_value,omitempty"`
	// Exactly one of the following fields (except for glob_criteria) must be
	// populated - note that the BOOLEAN and TRISTATE caveat in Attribute's
	// comment does not apply here. The type field in the SelectorList
	// containing this entry indicates which of these fields is populated,
	// in accordance with the comments on Discriminator enum values above.
	// (To be explicit: BOOLEAN populates the boolean_value field and TRISTATE
	// populates the tristate_value field.)
	IntValue                       *int32                       `protobuf:"varint,2,opt,name=int_value,json=intValue" json:"int_value,omitempty"`
	StringValue                    *string                      `protobuf:"bytes,3,opt,name=string_value,json=stringValue" json:"string_value,omitempty"`
	BooleanValue                   *bool                        `protobuf:"varint,4,opt,name=boolean_value,json=booleanValue" json:"boolean_value,omitempty"`
	TristateValue                  *Attribute_Tristate          `` /* 130-byte string literal not displayed */
	StringListValue                []string                     `protobuf:"bytes,6,rep,name=string_list_value,json=stringListValue" json:"string_list_value,omitempty"`
	License                        *License                     `protobuf:"bytes,7,opt,name=license" json:"license,omitempty"`
	StringDictValue                []*StringDictEntry           `protobuf:"bytes,8,rep,name=string_dict_value,json=stringDictValue" json:"string_dict_value,omitempty"`
	FilesetListValue               []*FilesetEntry              `protobuf:"bytes,9,rep,name=fileset_list_value,json=filesetListValue" json:"fileset_list_value,omitempty"`
	LabelListDictValue             []*LabelListDictEntry        `protobuf:"bytes,10,rep,name=label_list_dict_value,json=labelListDictValue" json:"label_list_dict_value,omitempty"`
	StringListDictValue            []*StringListDictEntry       `protobuf:"bytes,11,rep,name=string_list_dict_value,json=stringListDictValue" json:"string_list_dict_value,omitempty"`
	IntListValue                   []int32                      `protobuf:"varint,13,rep,name=int_list_value,json=intListValue" json:"int_list_value,omitempty"`
	LabelDictUnaryValue            []*LabelDictUnaryEntry       `protobuf:"bytes,15,rep,name=label_dict_unary_value,json=labelDictUnaryValue" json:"label_dict_unary_value,omitempty"`
	LabelKeyedStringDictValue      []*LabelKeyedStringDictEntry `` /* 136-byte string literal not displayed */
	DEPRECATEDStringDictUnaryValue [][]byte                     `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Attribute_SelectorEntry) Descriptor deprecated

func (*Attribute_SelectorEntry) Descriptor() ([]byte, []int)

Deprecated: Use Attribute_SelectorEntry.ProtoReflect.Descriptor instead.

func (*Attribute_SelectorEntry) GetBooleanValue

func (x *Attribute_SelectorEntry) GetBooleanValue() bool

func (*Attribute_SelectorEntry) GetDEPRECATEDStringDictUnaryValue

func (x *Attribute_SelectorEntry) GetDEPRECATEDStringDictUnaryValue() [][]byte

func (*Attribute_SelectorEntry) GetFilesetListValue

func (x *Attribute_SelectorEntry) GetFilesetListValue() []*FilesetEntry

func (*Attribute_SelectorEntry) GetIntListValue

func (x *Attribute_SelectorEntry) GetIntListValue() []int32

func (*Attribute_SelectorEntry) GetIntValue

func (x *Attribute_SelectorEntry) GetIntValue() int32

func (*Attribute_SelectorEntry) GetIsDefaultValue

func (x *Attribute_SelectorEntry) GetIsDefaultValue() bool

func (*Attribute_SelectorEntry) GetLabel

func (x *Attribute_SelectorEntry) GetLabel() string

func (*Attribute_SelectorEntry) GetLabelDictUnaryValue

func (x *Attribute_SelectorEntry) GetLabelDictUnaryValue() []*LabelDictUnaryEntry

func (*Attribute_SelectorEntry) GetLabelKeyedStringDictValue

func (x *Attribute_SelectorEntry) GetLabelKeyedStringDictValue() []*LabelKeyedStringDictEntry

func (*Attribute_SelectorEntry) GetLabelListDictValue

func (x *Attribute_SelectorEntry) GetLabelListDictValue() []*LabelListDictEntry

func (*Attribute_SelectorEntry) GetLicense

func (x *Attribute_SelectorEntry) GetLicense() *License

func (*Attribute_SelectorEntry) GetStringDictValue

func (x *Attribute_SelectorEntry) GetStringDictValue() []*StringDictEntry

func (*Attribute_SelectorEntry) GetStringListDictValue

func (x *Attribute_SelectorEntry) GetStringListDictValue() []*StringListDictEntry

func (*Attribute_SelectorEntry) GetStringListValue

func (x *Attribute_SelectorEntry) GetStringListValue() []string

func (*Attribute_SelectorEntry) GetStringValue

func (x *Attribute_SelectorEntry) GetStringValue() string

func (*Attribute_SelectorEntry) GetTristateValue

func (x *Attribute_SelectorEntry) GetTristateValue() Attribute_Tristate

func (*Attribute_SelectorEntry) ProtoMessage

func (*Attribute_SelectorEntry) ProtoMessage()

func (*Attribute_SelectorEntry) ProtoReflect

func (x *Attribute_SelectorEntry) ProtoReflect() protoreflect.Message

func (*Attribute_SelectorEntry) Reset

func (x *Attribute_SelectorEntry) Reset()

func (*Attribute_SelectorEntry) String

func (x *Attribute_SelectorEntry) String() string

type Attribute_SelectorList

type Attribute_SelectorList struct {

	// The type that this selector list evaluates to, and the type that each
	// selector in the list evaluates to. At this time, this cannot be
	// SELECTOR_LIST, i.e. selector lists do not nest.
	Type *Attribute_Discriminator `protobuf:"varint,1,opt,name=type,enum=blaze_query.Attribute_Discriminator" json:"type,omitempty"`
	// The list of selector elements in this selector list. At this time, this
	// cannot be empty, i.e. a selector list is never empty.
	Elements []*Attribute_Selector `protobuf:"bytes,2,rep,name=elements" json:"elements,omitempty"`
	// contains filtered or unexported fields
}

func (*Attribute_SelectorList) Descriptor deprecated

func (*Attribute_SelectorList) Descriptor() ([]byte, []int)

Deprecated: Use Attribute_SelectorList.ProtoReflect.Descriptor instead.

func (*Attribute_SelectorList) GetElements

func (x *Attribute_SelectorList) GetElements() []*Attribute_Selector

func (*Attribute_SelectorList) GetType

func (*Attribute_SelectorList) ProtoMessage

func (*Attribute_SelectorList) ProtoMessage()

func (*Attribute_SelectorList) ProtoReflect

func (x *Attribute_SelectorList) ProtoReflect() protoreflect.Message

func (*Attribute_SelectorList) Reset

func (x *Attribute_SelectorList) Reset()

func (*Attribute_SelectorList) String

func (x *Attribute_SelectorList) String() string

type Attribute_Tristate

type Attribute_Tristate int32

Values for the TriState field type.

const (
	Attribute_NO   Attribute_Tristate = 0
	Attribute_YES  Attribute_Tristate = 1
	Attribute_AUTO Attribute_Tristate = 2
)

func (Attribute_Tristate) Descriptor

func (Attribute_Tristate) Enum

func (Attribute_Tristate) EnumDescriptor deprecated

func (Attribute_Tristate) EnumDescriptor() ([]byte, []int)

Deprecated: Use Attribute_Tristate.Descriptor instead.

func (Attribute_Tristate) Number

func (Attribute_Tristate) String

func (x Attribute_Tristate) String() string

func (Attribute_Tristate) Type

func (*Attribute_Tristate) UnmarshalJSON deprecated

func (x *Attribute_Tristate) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type Bazel

type Bazel interface {
	SetArguments([]string)
	SetStartupArgs([]string)
	WriteToStderr(v bool)
	WriteToStdout(v bool)
	Info() (map[string]string, error)
	Query(args ...string) ([]*Target, error)
	Build(args ...string) (*bytes.Buffer, error)
	Test(args ...string) (*bytes.Buffer, error)
	Run(args ...string) (*exec.Cmd, *bytes.Buffer, error)
	Wait() error
	Cancel()
}

func NewBazel

func NewBazel(path string, workingDirectory string) Bazel

type BazelClient

type BazelClient interface {
	QueryAllTargets() ([]*Target, error)
	QueryAllSourceFileTargets() (map[string]*BazelSourceFileTarget, error)
	QueryTarget(queryTemplate string, targets map[string]bool) ([]*Target, error)
}

func NewBazelClient

func NewBazelClient(filesystem fs.FS, workingDirectory string, bazelPath string, verbose bool, keepGoing bool,
	displayElapsedTime bool, startupOptions string, commandOptions string) BazelClient

type BazelRule

type BazelRule interface {
	Digest() ([]byte, error)
	RuleInputList() []string
	Name() string
}

type BazelSourceFileTarget

type BazelSourceFileTarget interface {
	Name() *string
	Digest() []byte
}

func NewBazelSourceFileTarget

func NewBazelSourceFileTarget(name string, digest []byte, workingDirectory string) (BazelSourceFileTarget, error)

type BuildLanguage

type BuildLanguage struct {

	// Only contains documented rule definitions
	Rule []*RuleDefinition `protobuf:"bytes,1,rep,name=rule" json:"rule,omitempty"`
	// contains filtered or unexported fields
}

func (*BuildLanguage) Descriptor deprecated

func (*BuildLanguage) Descriptor() ([]byte, []int)

Deprecated: Use BuildLanguage.ProtoReflect.Descriptor instead.

func (*BuildLanguage) GetRule

func (x *BuildLanguage) GetRule() []*RuleDefinition

func (*BuildLanguage) ProtoMessage

func (*BuildLanguage) ProtoMessage()

func (*BuildLanguage) ProtoReflect

func (x *BuildLanguage) ProtoReflect() protoreflect.Message

func (*BuildLanguage) Reset

func (x *BuildLanguage) Reset()

func (*BuildLanguage) String

func (x *BuildLanguage) String() string

type CacheOptions

type CacheOptions struct {
}

type EnvironmentGroup

type EnvironmentGroup struct {

	// The name of the environment group.
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// The environments that belong to this group (as labels).
	Environment []string `protobuf:"bytes,2,rep,name=environment" json:"environment,omitempty"`
	// The member environments that rules implicitly support if not otherwise
	// specified.
	Default []string `protobuf:"bytes,3,rep,name=default" json:"default,omitempty"`
	// contains filtered or unexported fields
}

An environment group.

func (*EnvironmentGroup) Descriptor deprecated

func (*EnvironmentGroup) Descriptor() ([]byte, []int)

Deprecated: Use EnvironmentGroup.ProtoReflect.Descriptor instead.

func (*EnvironmentGroup) GetDefault

func (x *EnvironmentGroup) GetDefault() []string

func (*EnvironmentGroup) GetEnvironment

func (x *EnvironmentGroup) GetEnvironment() []string

func (*EnvironmentGroup) GetName

func (x *EnvironmentGroup) GetName() string

func (*EnvironmentGroup) ProtoMessage

func (*EnvironmentGroup) ProtoMessage()

func (*EnvironmentGroup) ProtoReflect

func (x *EnvironmentGroup) ProtoReflect() protoreflect.Message

func (*EnvironmentGroup) Reset

func (x *EnvironmentGroup) Reset()

func (*EnvironmentGroup) String

func (x *EnvironmentGroup) String() string

type FilesetEntry

type FilesetEntry struct {

	// The label pointing to the source target where files are copied from.
	Source *string `protobuf:"bytes,1,req,name=source" json:"source,omitempty"`
	// The relative path within the fileset rule where files will be mapped.
	DestinationDirectory *string `protobuf:"bytes,2,req,name=destination_directory,json=destinationDirectory" json:"destination_directory,omitempty"`
	// Whether the files= attribute was specified. This is necessary because
	// no files= attribute and files=[] mean different things.
	FilesPresent *bool `protobuf:"varint,7,opt,name=files_present,json=filesPresent" json:"files_present,omitempty"`
	// A list of file labels to include from the source directory.
	File []string `protobuf:"bytes,3,rep,name=file" json:"file,omitempty"`
	// If this is a fileset entry representing files within the rule
	// package, this lists relative paths to files that should be excluded from
	// the set.  This cannot contain values if 'file' also has values.
	Exclude []string `protobuf:"bytes,4,rep,name=exclude" json:"exclude,omitempty"`
	// This field is optional because there will be some time when the new
	// PB is used by tools depending on blaze query, but the new blaze version
	// is not yet released.
	// TODO(bazel-team): Make this field required once a version of Blaze is
	// released that outputs this field.
	SymlinkBehavior *FilesetEntry_SymlinkBehavior `` /* 152-byte string literal not displayed */
	// The prefix to strip from the path of the files in this FilesetEntry. Note
	// that no value and the empty string as the value mean different things here.
	StripPrefix *string `protobuf:"bytes,6,opt,name=strip_prefix,json=stripPrefix" json:"strip_prefix,omitempty"`
	// contains filtered or unexported fields
}

Represents an entry attribute of a Fileset rule in a build file.

func (*FilesetEntry) Descriptor deprecated

func (*FilesetEntry) Descriptor() ([]byte, []int)

Deprecated: Use FilesetEntry.ProtoReflect.Descriptor instead.

func (*FilesetEntry) GetDestinationDirectory

func (x *FilesetEntry) GetDestinationDirectory() string

func (*FilesetEntry) GetExclude

func (x *FilesetEntry) GetExclude() []string

func (*FilesetEntry) GetFile

func (x *FilesetEntry) GetFile() []string

func (*FilesetEntry) GetFilesPresent

func (x *FilesetEntry) GetFilesPresent() bool

func (*FilesetEntry) GetSource

func (x *FilesetEntry) GetSource() string

func (*FilesetEntry) GetStripPrefix

func (x *FilesetEntry) GetStripPrefix() string

func (*FilesetEntry) GetSymlinkBehavior

func (x *FilesetEntry) GetSymlinkBehavior() FilesetEntry_SymlinkBehavior

func (*FilesetEntry) ProtoMessage

func (*FilesetEntry) ProtoMessage()

func (*FilesetEntry) ProtoReflect

func (x *FilesetEntry) ProtoReflect() protoreflect.Message

func (*FilesetEntry) Reset

func (x *FilesetEntry) Reset()

func (*FilesetEntry) String

func (x *FilesetEntry) String() string

type FilesetEntry_SymlinkBehavior

type FilesetEntry_SymlinkBehavior int32

Indicates what to do when a source file is actually a symlink.

const (
	FilesetEntry_COPY        FilesetEntry_SymlinkBehavior = 1
	FilesetEntry_DEREFERENCE FilesetEntry_SymlinkBehavior = 2
)

func (FilesetEntry_SymlinkBehavior) Descriptor

func (FilesetEntry_SymlinkBehavior) Enum

func (FilesetEntry_SymlinkBehavior) EnumDescriptor deprecated

func (FilesetEntry_SymlinkBehavior) EnumDescriptor() ([]byte, []int)

Deprecated: Use FilesetEntry_SymlinkBehavior.Descriptor instead.

func (FilesetEntry_SymlinkBehavior) Number

func (FilesetEntry_SymlinkBehavior) String

func (FilesetEntry_SymlinkBehavior) Type

func (*FilesetEntry_SymlinkBehavior) UnmarshalJSON deprecated

func (x *FilesetEntry_SymlinkBehavior) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type GeneratedFile

type GeneratedFile struct {

	// The name of the generated file (a label).
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// The label of the target that generates the file.
	GeneratingRule *string `protobuf:"bytes,2,req,name=generating_rule,json=generatingRule" json:"generating_rule,omitempty"`
	// The path, line number, and column number of the output file (not a label).
	Location *string `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"`
	// contains filtered or unexported fields
}

A file that is the output of a build rule.

func (*GeneratedFile) Descriptor deprecated

func (*GeneratedFile) Descriptor() ([]byte, []int)

Deprecated: Use GeneratedFile.ProtoReflect.Descriptor instead.

func (*GeneratedFile) GetGeneratingRule

func (x *GeneratedFile) GetGeneratingRule() string

func (*GeneratedFile) GetLocation

func (x *GeneratedFile) GetLocation() string

func (*GeneratedFile) GetName

func (x *GeneratedFile) GetName() string

func (*GeneratedFile) ProtoMessage

func (*GeneratedFile) ProtoMessage()

func (*GeneratedFile) ProtoReflect

func (x *GeneratedFile) ProtoReflect() protoreflect.Message

func (*GeneratedFile) Reset

func (x *GeneratedFile) Reset()

func (*GeneratedFile) String

func (x *GeneratedFile) String() string

type GitClient

type GitClient interface {
	Checkout(hash string) (string, error)
}

func NewGitClient

func NewGitClient(dir string) GitClient

type LabelDictUnaryEntry

type LabelDictUnaryEntry struct {
	Key   *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*LabelDictUnaryEntry) Descriptor deprecated

func (*LabelDictUnaryEntry) Descriptor() ([]byte, []int)

Deprecated: Use LabelDictUnaryEntry.ProtoReflect.Descriptor instead.

func (*LabelDictUnaryEntry) GetKey

func (x *LabelDictUnaryEntry) GetKey() string

func (*LabelDictUnaryEntry) GetValue

func (x *LabelDictUnaryEntry) GetValue() string

func (*LabelDictUnaryEntry) ProtoMessage

func (*LabelDictUnaryEntry) ProtoMessage()

func (*LabelDictUnaryEntry) ProtoReflect

func (x *LabelDictUnaryEntry) ProtoReflect() protoreflect.Message

func (*LabelDictUnaryEntry) Reset

func (x *LabelDictUnaryEntry) Reset()

func (*LabelDictUnaryEntry) String

func (x *LabelDictUnaryEntry) String() string

type LabelKeyedStringDictEntry

type LabelKeyedStringDictEntry struct {
	Key   *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*LabelKeyedStringDictEntry) Descriptor deprecated

func (*LabelKeyedStringDictEntry) Descriptor() ([]byte, []int)

Deprecated: Use LabelKeyedStringDictEntry.ProtoReflect.Descriptor instead.

func (*LabelKeyedStringDictEntry) GetKey

func (x *LabelKeyedStringDictEntry) GetKey() string

func (*LabelKeyedStringDictEntry) GetValue

func (x *LabelKeyedStringDictEntry) GetValue() string

func (*LabelKeyedStringDictEntry) ProtoMessage

func (*LabelKeyedStringDictEntry) ProtoMessage()

func (*LabelKeyedStringDictEntry) ProtoReflect

func (*LabelKeyedStringDictEntry) Reset

func (x *LabelKeyedStringDictEntry) Reset()

func (*LabelKeyedStringDictEntry) String

func (x *LabelKeyedStringDictEntry) String() string

type LabelListDictEntry

type LabelListDictEntry struct {
	Key   *string  `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*LabelListDictEntry) Descriptor deprecated

func (*LabelListDictEntry) Descriptor() ([]byte, []int)

Deprecated: Use LabelListDictEntry.ProtoReflect.Descriptor instead.

func (*LabelListDictEntry) GetKey

func (x *LabelListDictEntry) GetKey() string

func (*LabelListDictEntry) GetValue

func (x *LabelListDictEntry) GetValue() []string

func (*LabelListDictEntry) ProtoMessage

func (*LabelListDictEntry) ProtoMessage()

func (*LabelListDictEntry) ProtoReflect

func (x *LabelListDictEntry) ProtoReflect() protoreflect.Message

func (*LabelListDictEntry) Reset

func (x *LabelListDictEntry) Reset()

func (*LabelListDictEntry) String

func (x *LabelListDictEntry) String() string

type License

type License struct {
	LicenseType []string `protobuf:"bytes,1,rep,name=license_type,json=licenseType" json:"license_type,omitempty"`
	Exception   []string `protobuf:"bytes,2,rep,name=exception" json:"exception,omitempty"`
	// contains filtered or unexported fields
}

func (*License) Descriptor deprecated

func (*License) Descriptor() ([]byte, []int)

Deprecated: Use License.ProtoReflect.Descriptor instead.

func (*License) GetException

func (x *License) GetException() []string

func (*License) GetLicenseType

func (x *License) GetLicenseType() []string

func (*License) ProtoMessage

func (*License) ProtoMessage()

func (*License) ProtoReflect

func (x *License) ProtoReflect() protoreflect.Message

func (*License) Reset

func (x *License) Reset()

func (*License) String

func (x *License) String() string

type PackageGroup

type PackageGroup struct {

	// The name of the package group
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// The list of packages as specified in the BUILD file. Currently this is
	// only a list of packages, but some time in the future, there might be
	// some type of wildcard mechanism.
	ContainedPackage []string `protobuf:"bytes,2,rep,name=contained_package,json=containedPackage" json:"contained_package,omitempty"`
	// The list of sub package groups included in this one.
	IncludedPackageGroup []string `protobuf:"bytes,3,rep,name=included_package_group,json=includedPackageGroup" json:"included_package_group,omitempty"`
	// contains filtered or unexported fields
}

A package group. Aside from the name, it contains the list of packages present in the group (as specified in the BUILD file).

func (*PackageGroup) Descriptor deprecated

func (*PackageGroup) Descriptor() ([]byte, []int)

Deprecated: Use PackageGroup.ProtoReflect.Descriptor instead.

func (*PackageGroup) GetContainedPackage

func (x *PackageGroup) GetContainedPackage() []string

func (*PackageGroup) GetIncludedPackageGroup

func (x *PackageGroup) GetIncludedPackageGroup() []string

func (*PackageGroup) GetName

func (x *PackageGroup) GetName() string

func (*PackageGroup) ProtoMessage

func (*PackageGroup) ProtoMessage()

func (*PackageGroup) ProtoReflect

func (x *PackageGroup) ProtoReflect() protoreflect.Message

func (*PackageGroup) Reset

func (x *PackageGroup) Reset()

func (*PackageGroup) String

func (x *PackageGroup) String() string

type ProtoDelimitedReader added in v0.0.5

type ProtoDelimitedReader struct {
	// contains filtered or unexported fields
}

func NewReader added in v0.0.5

func NewReader(r io.Reader) *ProtoDelimitedReader

func (*ProtoDelimitedReader) Next added in v0.0.5

func (r *ProtoDelimitedReader) Next() ([]byte, error)

func (*ProtoDelimitedReader) ReadTargets added in v0.0.5

func (r *ProtoDelimitedReader) ReadTargets() ([]*Target, error)

type QueryResult

type QueryResult struct {

	// All of the targets returned by the blaze query.
	Target []*Target `protobuf:"bytes,1,rep,name=target" json:"target,omitempty"`
	// contains filtered or unexported fields
}

Container for all of the blaze query results.

func (*QueryResult) Descriptor deprecated

func (*QueryResult) Descriptor() ([]byte, []int)

Deprecated: Use QueryResult.ProtoReflect.Descriptor instead.

func (*QueryResult) GetTarget

func (x *QueryResult) GetTarget() []*Target

func (*QueryResult) ProtoMessage

func (*QueryResult) ProtoMessage()

func (*QueryResult) ProtoReflect

func (x *QueryResult) ProtoReflect() protoreflect.Message

func (*QueryResult) Reset

func (x *QueryResult) Reset()

func (*QueryResult) String

func (x *QueryResult) String() string

type Rule

type Rule struct {

	// The name of the rule (formatted as an absolute label, e.g. //foo/bar:baz).
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// The rule class (e.g., java_library)
	RuleClass *string `protobuf:"bytes,2,req,name=rule_class,json=ruleClass" json:"rule_class,omitempty"`
	// The BUILD file and line number of the location (formatted as
	// <absolute_path>:<line_number>:<column_number>) in the rule's package's
	// BUILD file where the rule instance was instantiated. The line number will
	// be that of a rule invocation or macro call (that in turn invoked a
	// rule). See
	// https://bazel.build/rules/macros#macro-creation
	Location *string `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"`
	// All of the attributes that describe the rule.
	Attribute []*Attribute `protobuf:"bytes,4,rep,name=attribute" json:"attribute,omitempty"`
	// All of the inputs to the rule (formatted as absolute labels). These are
	// predecessors in the dependency graph.
	RuleInput []string `protobuf:"bytes,5,rep,name=rule_input,json=ruleInput" json:"rule_input,omitempty"`
	// All of the outputs of the rule (formatted as absolute labels). These are
	// successors in the dependency graph.
	RuleOutput []string `protobuf:"bytes,6,rep,name=rule_output,json=ruleOutput" json:"rule_output,omitempty"`
	// The set of all "features" inherited from the rule's package declaration.
	DefaultSetting []string `protobuf:"bytes,7,rep,name=default_setting,json=defaultSetting" json:"default_setting,omitempty"`
	// The rule's class's public by default value.
	DEPRECATEDPublicByDefault *bool `` /* 134-byte string literal not displayed */
	DEPRECATEDIsSkylark       *bool `protobuf:"varint,10,opt,name=DEPRECATED_is_skylark,json=DEPRECATEDIsSkylark" json:"DEPRECATED_is_skylark,omitempty"`
	// Hash encapsulating the behavior of this Starlark rule. Any change to this
	// rule's definition that could change its behavior will be reflected here.
	SkylarkEnvironmentHashCode *string `` /* 137-byte string literal not displayed */
	// The Starlark call stack at the moment the rule was instantiated.
	// Each entry has the form "file:line:col: function".
	// The outermost stack frame ("<toplevel>", the BUILD file) appears first;
	// the frame for the rule function itself is omitted.
	// The file name may be relative to package's source root directory.
	//
	// Requires --proto:instantiation_stack=true.
	InstantiationStack []string `protobuf:"bytes,13,rep,name=instantiation_stack,json=instantiationStack" json:"instantiation_stack,omitempty"`
	// The Starlark call stack for the definition of the rule class of this
	// particular rule instance. If empty, either populating the field was not
	// enabled on the command line with the --proto:definition_stack flag or the
	// rule is a native one.
	DefinitionStack []string `protobuf:"bytes,14,rep,name=definition_stack,json=definitionStack" json:"definition_stack,omitempty"`
	// contains filtered or unexported fields
}

A rule instance (e.g., cc_library foo, java_binary bar).

func (*Rule) Descriptor deprecated

func (*Rule) Descriptor() ([]byte, []int)

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetAttribute

func (x *Rule) GetAttribute() []*Attribute

func (*Rule) GetDEPRECATEDIsSkylark

func (x *Rule) GetDEPRECATEDIsSkylark() bool

func (*Rule) GetDEPRECATEDPublicByDefault

func (x *Rule) GetDEPRECATEDPublicByDefault() bool

func (*Rule) GetDefaultSetting

func (x *Rule) GetDefaultSetting() []string

func (*Rule) GetDefinitionStack

func (x *Rule) GetDefinitionStack() []string

func (*Rule) GetInstantiationStack

func (x *Rule) GetInstantiationStack() []string

func (*Rule) GetLocation

func (x *Rule) GetLocation() string

func (*Rule) GetName

func (x *Rule) GetName() string

func (*Rule) GetRuleClass

func (x *Rule) GetRuleClass() string

func (*Rule) GetRuleInput

func (x *Rule) GetRuleInput() []string

func (*Rule) GetRuleOutput

func (x *Rule) GetRuleOutput() []string

func (*Rule) GetSkylarkEnvironmentHashCode

func (x *Rule) GetSkylarkEnvironmentHashCode() string

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

func (x *Rule) ProtoReflect() protoreflect.Message

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

type RuleDefinition

type RuleDefinition struct {
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// Only contains documented attributes
	Attribute     []*AttributeDefinition `protobuf:"bytes,2,rep,name=attribute" json:"attribute,omitempty"`
	Documentation *string                `protobuf:"bytes,3,opt,name=documentation" json:"documentation,omitempty"`
	// Only for build extensions: label to file that defines the extension
	Label *string `protobuf:"bytes,4,opt,name=label" json:"label,omitempty"`
	// contains filtered or unexported fields
}

func (*RuleDefinition) Descriptor deprecated

func (*RuleDefinition) Descriptor() ([]byte, []int)

Deprecated: Use RuleDefinition.ProtoReflect.Descriptor instead.

func (*RuleDefinition) GetAttribute

func (x *RuleDefinition) GetAttribute() []*AttributeDefinition

func (*RuleDefinition) GetDocumentation

func (x *RuleDefinition) GetDocumentation() string

func (*RuleDefinition) GetLabel

func (x *RuleDefinition) GetLabel() string

func (*RuleDefinition) GetName

func (x *RuleDefinition) GetName() string

func (*RuleDefinition) ProtoMessage

func (*RuleDefinition) ProtoMessage()

func (*RuleDefinition) ProtoReflect

func (x *RuleDefinition) ProtoReflect() protoreflect.Message

func (*RuleDefinition) Reset

func (x *RuleDefinition) Reset()

func (*RuleDefinition) String

func (x *RuleDefinition) String() string

type RuleProvider

type RuleProvider interface {
	GetRule(rule *Rule) BazelRule
}

func NewRuleProvider

func NewRuleProvider() RuleProvider

type RuleSummary

type RuleSummary struct {
	Rule       *Rule   `protobuf:"bytes,1,req,name=rule" json:"rule,omitempty"`
	Dependency []*Rule `protobuf:"bytes,2,rep,name=dependency" json:"dependency,omitempty"`
	Location   *string `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"`
	// contains filtered or unexported fields
}

Summary of all transitive dependencies of 'rule,' where each dependent rule is included only once in the 'dependency' field. Gives complete information to analyze the single build target labeled rule.name, including optional location of target in BUILD file.

func (*RuleSummary) Descriptor deprecated

func (*RuleSummary) Descriptor() ([]byte, []int)

Deprecated: Use RuleSummary.ProtoReflect.Descriptor instead.

func (*RuleSummary) GetDependency

func (x *RuleSummary) GetDependency() []*Rule

func (*RuleSummary) GetLocation

func (x *RuleSummary) GetLocation() string

func (*RuleSummary) GetRule

func (x *RuleSummary) GetRule() *Rule

func (*RuleSummary) ProtoMessage

func (*RuleSummary) ProtoMessage()

func (*RuleSummary) ProtoReflect

func (x *RuleSummary) ProtoReflect() protoreflect.Message

func (*RuleSummary) Reset

func (x *RuleSummary) Reset()

func (*RuleSummary) String

func (x *RuleSummary) String() string

type SourceFile

type SourceFile struct {

	// The name of the source file (a label).
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// The location of the source file.  This is a path with a line number and a
	// column number not a label in the build system.
	Location *string `protobuf:"bytes,2,opt,name=location" json:"location,omitempty"`
	// Labels of .bzl (Starlark) files that are transitively loaded in this BUILD
	// file. This is present only when the SourceFile represents a BUILD file that
	// loaded .bzl files.
	// TODO(bazel-team): Rename this field.
	Subinclude []string `protobuf:"bytes,3,rep,name=subinclude" json:"subinclude,omitempty"`
	// Labels of package groups that are mentioned in the visibility declaration
	// for this source file.
	PackageGroup []string `protobuf:"bytes,4,rep,name=package_group,json=packageGroup" json:"package_group,omitempty"`
	// Labels mentioned in the visibility declaration (including :__pkg__ and
	// //visibility: ones)
	VisibilityLabel []string `protobuf:"bytes,5,rep,name=visibility_label,json=visibilityLabel" json:"visibility_label,omitempty"`
	// The package-level features enabled for this package. Only present if the
	// SourceFile represents a BUILD file.
	Feature []string `protobuf:"bytes,6,rep,name=feature" json:"feature,omitempty"`
	// License attribute for the file.
	License *License `protobuf:"bytes,8,opt,name=license" json:"license,omitempty"`
	// True if the package contains an error. Only present if the SourceFile
	// represents a BUILD file.
	PackageContainsErrors *bool `protobuf:"varint,9,opt,name=package_contains_errors,json=packageContainsErrors" json:"package_contains_errors,omitempty"`
	// contains filtered or unexported fields
}

A file that is an input into the build system. Next-Id: 10

func (*SourceFile) Descriptor deprecated

func (*SourceFile) Descriptor() ([]byte, []int)

Deprecated: Use SourceFile.ProtoReflect.Descriptor instead.

func (*SourceFile) GetFeature

func (x *SourceFile) GetFeature() []string

func (*SourceFile) GetLicense

func (x *SourceFile) GetLicense() *License

func (*SourceFile) GetLocation

func (x *SourceFile) GetLocation() string

func (*SourceFile) GetName

func (x *SourceFile) GetName() string

func (*SourceFile) GetPackageContainsErrors

func (x *SourceFile) GetPackageContainsErrors() bool

func (*SourceFile) GetPackageGroup

func (x *SourceFile) GetPackageGroup() []string

func (*SourceFile) GetSubinclude

func (x *SourceFile) GetSubinclude() []string

func (*SourceFile) GetVisibilityLabel

func (x *SourceFile) GetVisibilityLabel() []string

func (*SourceFile) ProtoMessage

func (*SourceFile) ProtoMessage()

func (*SourceFile) ProtoReflect

func (x *SourceFile) ProtoReflect() protoreflect.Message

func (*SourceFile) Reset

func (x *SourceFile) Reset()

func (*SourceFile) String

func (x *SourceFile) String() string

type StringDictEntry

type StringDictEntry struct {
	Key   *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*StringDictEntry) Descriptor deprecated

func (*StringDictEntry) Descriptor() ([]byte, []int)

Deprecated: Use StringDictEntry.ProtoReflect.Descriptor instead.

func (*StringDictEntry) GetKey

func (x *StringDictEntry) GetKey() string

func (*StringDictEntry) GetValue

func (x *StringDictEntry) GetValue() string

func (*StringDictEntry) ProtoMessage

func (*StringDictEntry) ProtoMessage()

func (*StringDictEntry) ProtoReflect

func (x *StringDictEntry) ProtoReflect() protoreflect.Message

func (*StringDictEntry) Reset

func (x *StringDictEntry) Reset()

func (*StringDictEntry) String

func (x *StringDictEntry) String() string

type StringListDictEntry

type StringListDictEntry struct {
	Key   *string  `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Value []string `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*StringListDictEntry) Descriptor deprecated

func (*StringListDictEntry) Descriptor() ([]byte, []int)

Deprecated: Use StringListDictEntry.ProtoReflect.Descriptor instead.

func (*StringListDictEntry) GetKey

func (x *StringListDictEntry) GetKey() string

func (*StringListDictEntry) GetValue

func (x *StringListDictEntry) GetValue() []string

func (*StringListDictEntry) ProtoMessage

func (*StringListDictEntry) ProtoMessage()

func (*StringListDictEntry) ProtoReflect

func (x *StringListDictEntry) ProtoReflect() protoreflect.Message

func (*StringListDictEntry) Reset

func (x *StringListDictEntry) Reset()

func (*StringListDictEntry) String

func (x *StringListDictEntry) String() string

type Target

type Target struct {

	// The type of target contained in the message.
	Type *Target_Discriminator `protobuf:"varint,1,req,name=type,enum=blaze_query.Target_Discriminator" json:"type,omitempty"`
	// If this target represents a rule, the rule is stored here.
	Rule *Rule `protobuf:"bytes,2,opt,name=rule" json:"rule,omitempty"`
	// A file that is not generated by the build system (version controlled
	// or created by the test harness).
	SourceFile *SourceFile `protobuf:"bytes,3,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"`
	// A generated file that is the output of a rule.
	GeneratedFile *GeneratedFile `protobuf:"bytes,4,opt,name=generated_file,json=generatedFile" json:"generated_file,omitempty"`
	// A package group.
	PackageGroup *PackageGroup `protobuf:"bytes,5,opt,name=package_group,json=packageGroup" json:"package_group,omitempty"`
	// An environment group.
	EnvironmentGroup *EnvironmentGroup `protobuf:"bytes,6,opt,name=environment_group,json=environmentGroup" json:"environment_group,omitempty"`
	// contains filtered or unexported fields
}

A target from a blaze query execution. Similar to the Attribute message, the Discriminator is used to determine which field contains information. For any given type, only one of these can be populated in a single Target.

func (*Target) Descriptor deprecated

func (*Target) Descriptor() ([]byte, []int)

Deprecated: Use Target.ProtoReflect.Descriptor instead.

func (*Target) GetEnvironmentGroup

func (x *Target) GetEnvironmentGroup() *EnvironmentGroup

func (*Target) GetGeneratedFile

func (x *Target) GetGeneratedFile() *GeneratedFile

func (*Target) GetPackageGroup

func (x *Target) GetPackageGroup() *PackageGroup

func (*Target) GetRule

func (x *Target) GetRule() *Rule

func (*Target) GetSourceFile

func (x *Target) GetSourceFile() *SourceFile

func (*Target) GetType

func (x *Target) GetType() Target_Discriminator

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) ProtoReflect

func (x *Target) ProtoReflect() protoreflect.Message

func (*Target) Reset

func (x *Target) Reset()

func (*Target) String

func (x *Target) String() string

type TargetHashingClient

type TargetHashingClient interface {
	HashAllBazelTargetsAndSourcefiles(seedFilePaths map[string]bool) (map[string]string, error)
	GetImpactedTargets(startHashes map[string]string, endHashes map[string]string) (map[string]bool, error)
	GetNames(targets []*Target) map[string]bool
}

func NewTargetHashingClient

func NewTargetHashingClient(client BazelClient, filesystem fs.FS, ruleProvider RuleProvider) TargetHashingClient

type Target_Discriminator

type Target_Discriminator int32
const (
	Target_RULE              Target_Discriminator = 1
	Target_SOURCE_FILE       Target_Discriminator = 2
	Target_GENERATED_FILE    Target_Discriminator = 3
	Target_PACKAGE_GROUP     Target_Discriminator = 4
	Target_ENVIRONMENT_GROUP Target_Discriminator = 5
)

func (Target_Discriminator) Descriptor

func (Target_Discriminator) Enum

func (Target_Discriminator) EnumDescriptor deprecated

func (Target_Discriminator) EnumDescriptor() ([]byte, []int)

Deprecated: Use Target_Discriminator.Descriptor instead.

func (Target_Discriminator) Number

func (Target_Discriminator) String

func (x Target_Discriminator) String() string

func (Target_Discriminator) Type

func (*Target_Discriminator) UnmarshalJSON deprecated

func (x *Target_Discriminator) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL