build: Index | Files

package workspace

import ""


Package Files

local.go workspace.go


const (
    // BUILDFILE is the name of the file that keeps targets


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")

func FindWorkspace Uses

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.

type Stat Uses

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

Stat checks if a file exists or not in a workspace

type Workspace Uses

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

func New Uses

func New(a string) (Workspace, error)

New given a URL returns a workspace

Package workspace imports 9 packages (graph) and is imported by 10 packages. Updated 2018-10-05. Refresh now. Tools for package owners.