Documentation
¶
Overview ¶
Package core contains the core Bazelisk logic, as well as abstractions for Bazel repositories.
Index ¶
- func GetAspectVersions() ([]string, error)
- func GetBazelVersions(bazelFork string) ([]string, error)
- func InitializeStartupFlags(args []string) ([]string, []string, error)
- func SeparateBazelFlags(command string, args []string) ([]string, []string, error)
- type Bazel
- type BazelInstallation
- type Bazelisk
- func (bazelisk *Bazelisk) GetBazelInstallation(repos *core.Repositories, config config.Config) (*BazelInstallation, error)
- func (bazelisk *Bazelisk) GetBazelVersion(config config.Config) (string, error)
- func (bazelisk *Bazelisk) Run(args []string, repos *core.Repositories, streams ioutils.Streams, env []string, ...) error
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAspectVersions ¶
func GetBazelVersions ¶
func InitializeStartupFlags ¶
Initializes start-up flags from args and returns args without start-up flags
Types ¶
type Bazel ¶
type Bazel interface {
WithEnv(env []string) Bazel
AQuery(expr string, bazelFlags []string) (*analysis.ActionGraphContainer, error)
BazelDashDashVersion() (string, error)
GetBazelInstallation() (*BazelInstallation, error)
BazelFlagsAsProto() ([]byte, error)
HandleReenteringAspect(streams ioutils.Streams, args []string, aspectLockVersion bool) (bool, error)
RunCommand(streams ioutils.Streams, wd *string, command ...string) error
InitializeBazelFlags() error
IsBazelFlag(command string, flag string) (bool, error)
Flags() (map[string]*flags.FlagInfo, error)
AbsPathRelativeToWorkspace(relativePath string) (string, error)
AddBazelFlags(cmd *cobra.Command) error
WorkspaceRoot() string
MakeBazelCommand(ctx context.Context, args []string, streams ioutils.Streams, env []string, wd *string) (*exec.Cmd, error)
}
var NoWorkspaceRoot Bazel = &bazel{}
This is a special case where we run Bazel without a workspace (e.g., version).
var WorkspaceFromWd Bazel = findWorkspace()
type BazelInstallation ¶ added in v1.202541.2
BazelInstallation provides a summary of a single install of `bazel`
type Bazelisk ¶
type Bazelisk struct {
// Set to true in getBazelVersionAndUrl() if this aspect binary is not the user's configured
// version and should re-enter another aspect binary of a different version
AspectShouldReenter bool
// contains filtered or unexported fields
}
func NewBazelisk ¶
func (*Bazelisk) GetBazelInstallation ¶ added in v1.202541.2
func (bazelisk *Bazelisk) GetBazelInstallation(repos *core.Repositories, config config.Config) (*BazelInstallation, error)
GetBazelInstallation provides a mechanism to find the `bazel` binary to execute, as well as its version
func (*Bazelisk) GetBazelVersion ¶ added in v1.202541.2
GetBazelVersion returns the Bazel version that should be used. MODIFIED: to use *Bazelisk instance
type Output ¶
func ParseOutputs ¶
func ParseOutputs(agc *analysis.ActionGraphContainer) []Output
ParseOutputs reads the proto result of AQuery and extracts the output file paths with their generator mnemonics.
Click to show internal directories.
Click to hide internal directories.