okbuck

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: MPL-2.0 Imports: 9 Imported by: 2

Documentation

Overview

Package okbuck implements the analyzer for OkBuck. https://github.com/uber/okbuck.

A `BuildTarget` in OkBuck is defined as a Build Target by OkBuck which is in in the format of `//src/build:target`. OkBuck defines this as a string used to identify a Build Rule.

This package is implemented by externally calling the `okbuck` build tool.

FAQ

1. Why is analyzing manifest files not a supported strategy as it is for other tools?

`.buckconfig` can be used to discover cells but the `repository` field which defines cells is not required . `BUCK` files are written in Skylark (a dialect of Python) and are impossible to statically analyze. `buck audit` provides json formatted data for dependency and input information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discover

func Discover(dir string, opts map[string]interface{}) ([]module.Module, error)

Discover searches for `buckw` executables in the present directory.

Types

type Analyzer

type Analyzer struct {
	Module  module.Module
	Setup   okbuck.OkBuck
	Options Options
}

Analyzer defines a OkBuck analyzer.

func New

func New(module module.Module) (*Analyzer, error)

New constructs a new OkBuck analyzer from a module.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze() (graph.Deps, error)

Analyze analyzes an OkBuck build target and its dependencies.

func (*Analyzer) Build

func (a *Analyzer) Build() error

Build is not implemented.

func (*Analyzer) Clean

func (a *Analyzer) Clean() error

Clean is not implemented.

func (*Analyzer) IsBuilt

func (a *Analyzer) IsBuilt() (bool, error)

IsBuilt is not implemented.

type Options added in v0.7.19

type Options struct {
	ClassPath string `mapstructure:"classpath"` // Specify the classpath to target for a specific configurations dependencies.
}

Options sets analyzer options for Go modules.

Jump to

Keyboard shortcuts

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