bazel

package
v0.0.0-...-e600795 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package bazel implements the loading of Bazel files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {

	// WorkspaceName contains the name of the workspace (if any).
	WorkspaceName core.WorkspaceName

	// BuildTargets contains the output build targets.
	BuildTargets core.BuildTargets
	// contains filtered or unexported fields
}

func NewBuild

func NewBuild(sourceFileReader SourceFileReader) *Build

func (*Build) ExecBuildFile

func (self *Build) ExecBuildFile(buildFileLabel core.Label) error

ExecBuildFile executes the BUILD[.bazel] file specified by buildFileLabel. It should be called at most once for each BUILD[.bazel] file.

func (*Build) ExecWorkspaceFile

func (self *Build) ExecWorkspaceFile() error

ExecWorkspaceFile executes the WORKSPACE file (which always has label //:WORKSPACE). It should be called exactly once, before ExecBuildFile is called.

type ContextImpl

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

func GetContextImpl

func GetContextImpl(thread *starlark.Thread) *ContextImpl

TODO(vtl): Maybe get rid of this. We only need this when we need to access the Build, which is when we need it to do a load, but maybe that should be a part of Context.

func (*ContextImpl) BuildTargets

func (self *ContextImpl) BuildTargets() core.BuildTargets

func (*ContextImpl) FileType

func (self *ContextImpl) FileType() core.FileType

func (*ContextImpl) Label

func (self *ContextImpl) Label() core.Label

func (*ContextImpl) SetWorkspaceName

func (self *ContextImpl) SetWorkspaceName(workspaceName core.WorkspaceName) error

func (*ContextImpl) WorkspaceName

func (self *ContextImpl) WorkspaceName() core.WorkspaceName

type SourceFileReader

type SourceFileReader func(sourceFileLabel core.Label) ([]byte, error)

func GetSourceFileReader

func GetSourceFileReader(workspaceDir string, outputBase string) SourceFileReader

Directories

Path Synopsis
Package builtins provides the initial globals (builtins) for executing a Bazel file.
Package builtins provides the initial globals (builtins) for executing a Bazel file.
args
Package args contains various helpers for extracting/processing starlark arguments.
Package args contains various helpers for extracting/processing starlark arguments.
functions
Package functions contains implementations of various Bazel (non-rule) functions.
Package functions contains implementations of various Bazel (non-rule) functions.
rules
Package rules contains implementations of Bazel build rules (only callable from BUILD[.bazel] files).
Package rules contains implementations of Bazel build rules (only callable from BUILD[.bazel] files).
workspace_rules
Package workspace_rules contains implementations of Bazel workspace rules (only callable from WORKSPACE files).
Package workspace_rules contains implementations of Bazel workspace rules (only callable from WORKSPACE files).
Package core contains core Bazel concepts.
Package core contains core Bazel concepts.
Package utils contains various utility functions for working with Bazel (build files).
Package utils contains various utility functions for working with Bazel (build files).

Jump to

Keyboard shortcuts

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