workspace

package
v0.0.0-...-d04b29a Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BUILDFILE is the name of the file that keeps targets
	BUILDFILE = "BUILD"
)

Variables

View Source
var (
	// ErrNotAWorkspace is returned when the given URL is not a workspace
	ErrNotAWorkspace = errors.New("workspace: given url is not a workspace")
	// ErrNotAbsolute is returned when a url is not absolute
	ErrNotAbsolute = errors.New("workspace: local urls should be absolute paths")
)

Functions

func FindWorkspace

func FindWorkspace(a string, stat Stat) (string, error)

FindWorkspace looks for recursively for WORKSPACE file in each parent directory. If it fails to find anything it will return the fist directory with .git

A workspace is a directory on your filesystem that contains the source files for the software you want to build, as well as symbolic links to directories that contain the build outputs. Each workspace directory has a text file named WORKSPACE which may be empty, or may contain references to external dependencies required to build the outputs. https://docs.bazel.build/versions/master/build-ref.html#workspace

Types

type Stat

type Stat func(string) (os.FileInfo, error)

Stat checks if a file exists or not in a workspace

type Workspace

type Workspace interface {
	AbsPath() string
	Buildfile(label.Label) string
	File(label.Label) string
	PackageDir(label.Label) string
	LoadBuildfile(label.Label) ([]byte, error)
}

Workspace is a Bazel workspace https://docs.bazel.build/versions/master/be/workspace.html

func New

func New(a string) (Workspace, error)

New given a URL returns a workspace

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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