bazel

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package bazel provides integration points with Bazel build system such as running actions query.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCommand means there is an error running Bazel.
	ErrCommand = errors.New("command error")

	// ErrJSON means there is an error unmarshaling JSON.
	ErrJSON = errors.New("json error")
)

Functions

This section is empty.

Types

type Action

type Action struct {
	Arguments []string // A command associated with the action.
}

Action describes a single action in the actions graph.

type ActionSet

type ActionSet struct {
	Actions []*Action // All actions in the graph.
}

ActionSet is the actions graph.

Ref: https://github.com/bazelbuild/bazel/blob/e2cf1361d07a4e6ecdf241addbe2891111cf08b4/src/main/protobuf/analysis_v2.proto#L25 -- NOLINT

func Aquery

func Aquery(targets []string) (*ActionSet, error)

Aquery runs an actions query (aquery) for targets.

func AqueryWithCommand

func AqueryWithCommand(targets []string, newCmd NewCmdFunc) (*ActionSet, error)

AqueryWithCommand runs Bazel actions-query (aquery) for targets. It uses the newCmd function to create exec.Cmd to run Bazel.

type NewCmdFunc

type NewCmdFunc func(name string, args ...string) *exec.Cmd

NewCmdFunc is a constructor for exec.Cmd.

Jump to

Keyboard shortcuts

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