/ build / skylark

Index | Files | Exmaples | Directories
go get


Package Files

action.go action_do_nothing.go action_run.go attr.go attrs.go bldy_dict.go context.go files.go format.go funcs.go git.go glob.go hash.go http.go lambda.go nativeRule.go outputs.go pkg.go rule.go skylark.go unpack.go


const (
    Data   configuration = "data"
    Host   configuration = "host"
    Target configuration = "target"

func New

func New(ws workspace.Workspace) (build.VM, error)

New returns a new skylarkVM

func NewBldyDict

func NewBldyDict() bldyDict

NewBldyDict returns a new skylark.StringDict that can be used as a skylark.Value

func WalkDict

func WalkDict(x *skylark.Dict, wf WalkAttrFunc) error

WalkAttrs traverses attributes

type Attribute

type Attribute interface {

    GetDefault() skylark.Value
    HasDefault() bool

Attribute is representation of a definition of an attribute. Use the attr module to create an Attribute. They are only for use with a rule or an aspect.

type BldyFunc

type BldyFunc func(thread *skylark.Thread, args skylark.Tuple, kwargs []skylark.Tuple) (skylark.Value, error)

BldyFunc represents a callable SkylarkFunc that will run by bldy

type CanAllowEmpty

type CanAllowEmpty interface {
    AllowsEmpty() bool
    Empty() skylark.Value

type Converts

type Converts interface {
    Convert(skylark.Value) (skylark.Value, error)

type Rule

type Rule struct {
    SkyFuncLabel string

    Args      skylark.Tuple
    KWArgs    []skylark.Tuple
    SkyFunc   *skylark.Function
    FuncAttrs *skylark.Dict
    Attrs     *skylark.Dict

    Actions []executor.Action
    // contains filtered or unexported fields

Rule is a bazel rule that is implemented in skylark

func (*Rule) Build

func (r *Rule) Build(e *executor.Executor) error

Build builds the skylarkRule

func (*Rule) Dependencies

func (r *Rule) Dependencies() []label.Label

GetDependencies returns the dependencies of the SkylarkRule

func (*Rule) Hash

func (r *Rule) Hash() []byte

Hash returns the calculated hash of a target

func (*Rule) Name

func (r *Rule) Name() string

GetName returns the name of the SkylarkRule

func (*Rule) Outputs

func (r *Rule) Outputs() []string

Installs returns what will be outputed from the execution of the rule

func (*Rule) Platform

func (r *Rule) Platform() label.Label

func (*Rule) Workspace

func (r *Rule) Workspace() workspace.Workspace

type WalkAttrFunc

type WalkAttrFunc func(skylark.Value, Attribute) error