Documentation ¶
Index ¶
- Constants
- Variables
- func IsAddrMatcher(m Matcher) bool
- func IsLabelMatcher(m Matcher) bool
- func IsMatcherExplicit(m Matcher) bool
- func LabelValidate(s string) error
- func NewTargetNotFoundError(target string, targets specer) error
- func ParsePkgAddr(s string, validate bool) (string, error)
- func SortOutputsForHashing(names []string) []string
- type AstNode
- type Cache
- type DepExpr
- type DepFile
- type DepMode
- type DepTarget
- type Deps
- type ExprTool
- type GenSource
- type HostTool
- type IntersectResult
- type KindMatcher
- func (a KindMatcher) Add(m Matcher)
- func (a KindMatcher) Intersects(m Matcher) IntersectResult
- func (m KindMatcher) MarshalJSON() ([]byte, error)
- func (a KindMatcher) Match(s Specer) bool
- func (p KindMatcher) Replace(f Replacer) Matcher
- func (a KindMatcher) Simplify() Matcher
- func (a KindMatcher) String() string
- type Matcher
- func AndNodeFactory[T Matcher](ms ...T) Matcher
- func MatcherFromIncludeExclude(pkg string, include, exclude []string) (Matcher, error)
- func MatcherReplace(m Matcher, f func(m Matcher) Matcher) Matcher
- func MustParseMatcher(input string) Matcher
- func NotNodeFactory(m Matcher) Matcher
- func OrNodeFactory[T Matcher](ms ...T) Matcher
- func ParseLabelGlob(s string) (Matcher, error)
- func ParseMatcher(input string) (Matcher, error)
- func ParseMatcherInPkg(pkg, input string) (Matcher, error)
- func ParseTargetGlob(s string) (Matcher, error)
- type MatcherNot
- type OutFile
- type Platform
- type Replacer
- type RestoreCache
- type Source
- type SourceCallFrame
- type SourceCallFramePosition
- type Specer
- type SrcEnv
- type StringMatcher
- type Target
- func (t Target) AddrStruct() TargetAddr
- func (t Target) Equal(spec Target) bool
- func (t Target) HasDefaultPlatforms() bool
- func (t Target) IsExecutable() bool
- func (t Target) IsGen() bool
- func (t Target) IsGroup() bool
- func (t Target) IsPrivate() bool
- func (t Target) IsTextFile() bool
- func (t Target) IsTool() bool
- func (t Target) Json() []byte
- func (t Target) MarshalJSON() ([]byte, error)
- func (t Target) SourceLocation() string
- func (t Target) Spec() Target
- func (t Target) Validate() error
- type TargetAddr
- func (p TargetAddr) Full() string
- func (p TargetAddr) Intersects(other Matcher) IntersectResult
- func (p TargetAddr) IsPrivate() bool
- func (m TargetAddr) MarshalJSON() ([]byte, error)
- func (p TargetAddr) Match(t Specer) bool
- func (n TargetAddr) Not() Matcher
- func (p TargetAddr) Replace(f Replacer) Matcher
- func (p TargetAddr) Simplify() Matcher
- func (p TargetAddr) String() string
- type TargetAddrs
- type TargetNotFoundErr
- type TargetOutputPath
- type TargetTool
- type Targets
- type Tools
- type Transitive
Constants ¶
View Source
const ( KindAddr matcherKind = "addr" KindLabel = "label" )
View Source
const SupportFilesOutput = "@support_files"
Variables ¶
View Source
var ( FileEnvIgnore = "ignore" FileEnvRelRoot = "rel_root" FileEnvRelPkg = "rel_pkg" FileEnvAbs = "abs" FileEnvValues = []string{FileEnvIgnore, FileEnvRelRoot, FileEnvRelPkg, FileEnvAbs} )
View Source
var ( HashFileContent = "content" HashFileModTime = "mod_time" HashFileValues = []string{HashFileContent, HashFileModTime} )
View Source
var ( EntrypointExec = "exec" EntrypointBash = "bash" EntrypointSh = "sh" EntrypointValues = []string{EntrypointExec, EntrypointSh, EntrypointBash} )
View Source
var ( CodegenNone = "" CodegenLink = "link" CodegenCopy = "copy" CodegenCopyNoExclude = "copy_noexclude" CodegenValues = []string{CodegenNone, CodegenLink, CodegenCopy, CodegenCopyNoExclude} )
View Source
var DepModes = []DepMode{ DepModeCopy, DepModeLink, }
View Source
var PublicMatcher = MustParseMatcher("!:_*")
Functions ¶
func IsAddrMatcher ¶
func IsLabelMatcher ¶
func IsMatcherExplicit ¶
func LabelValidate ¶
func NewTargetNotFoundError ¶
func SortOutputsForHashing ¶
Types ¶
type Cache ¶
func (Cache) NamedEnabled ¶
type HostTool ¶
func (HostTool) ResolvedPath ¶
type IntersectResult ¶
type IntersectResult int
const ( IntersectTrue IntersectResult = 1 IntersectFalse IntersectResult = 0 IntersectUnknown IntersectResult = 2 )
func Intersects ¶
func Intersects(a, b Matcher) IntersectResult
func (IntersectResult) Bool ¶
func (r IntersectResult) Bool() bool
func (IntersectResult) Not ¶
func (r IntersectResult) Not() IntersectResult
func (IntersectResult) String ¶
func (r IntersectResult) String() string
type KindMatcher ¶
type KindMatcher map[matcherKind]orNode
func (KindMatcher) Add ¶
func (a KindMatcher) Add(m Matcher)
func (KindMatcher) Intersects ¶
func (a KindMatcher) Intersects(m Matcher) IntersectResult
func (KindMatcher) MarshalJSON ¶
func (m KindMatcher) MarshalJSON() ([]byte, error)
func (KindMatcher) Match ¶
func (a KindMatcher) Match(s Specer) bool
func (KindMatcher) Replace ¶
func (p KindMatcher) Replace(f Replacer) Matcher
func (KindMatcher) Simplify ¶
func (a KindMatcher) Simplify() Matcher
func (KindMatcher) String ¶
func (a KindMatcher) String() string
type Matcher ¶
type Matcher interface { json.Marshaler Match(Specer) bool String() string Intersects(Matcher) IntersectResult Simplify() Matcher Replace(f Replacer) Matcher }
var AllMatcher Matcher = staticMatcher{ // contains filtered or unexported fields }
var NoneMatcher Matcher = staticMatcher{ // contains filtered or unexported fields }
func AndNodeFactory ¶
func MustParseMatcher ¶
func NotNodeFactory ¶
func OrNodeFactory ¶
func ParseLabelGlob ¶
func ParseMatcher ¶
func ParseMatcherInPkg ¶
func ParseTargetGlob ¶
type MatcherNot ¶
type MatcherNot interface {
Not() Matcher
}
type RestoreCache ¶
func (RestoreCache) Equal ¶
func (this RestoreCache) Equal(that RestoreCache) bool
type Source ¶
type Source struct {
CallFrames []SourceCallFrame
}
func (Source) SourceFile ¶
func (Source) SourceLocation ¶
type SourceCallFrame ¶
type SourceCallFrame struct { Name string Pos SourceCallFramePosition }
func (SourceCallFrame) String ¶
func (s SourceCallFrame) String() string
type SourceCallFramePosition ¶
func (*SourceCallFramePosition) MarshalJSON ¶
func (u *SourceCallFramePosition) MarshalJSON() ([]byte, error)
type StringMatcher ¶
type Target ¶
type Target struct { Name string Addr string Package *packages.Package Doc string GenSources []string Run []string FileContent []byte // Used by special target `text_file` Entrypoint string Platforms []Platform ConcurrentExecution bool Dir string PassArgs bool Deps Deps HashDeps Deps RuntimeDeps Deps Tools Tools Out []OutFile Cache Cache RestoreCache RestoreCache HasSupportFiles bool Sandbox bool OutInSandbox bool Codegen string Labels []string Env map[string]string PassEnv []string RuntimePassEnv []string RunInCwd bool Gen []Matcher Sources []Source RuntimeEnv map[string]string SrcEnv SrcEnv OutEnv string HashFile string Transitive Transitive Timeout time.Duration GenDepsMeta bool Annotations map[string]interface{} Requests map[string]float64 }
func (Target) AddrStruct ¶
func (t Target) AddrStruct() TargetAddr
func (Target) HasDefaultPlatforms ¶
func (Target) IsExecutable ¶
func (Target) IsTextFile ¶
func (Target) MarshalJSON ¶
func (Target) SourceLocation ¶
type TargetAddr ¶
func ParseTargetAddr ¶
func ParseTargetAddr(pkg string, s string) (TargetAddr, error)
func (TargetAddr) Full ¶
func (p TargetAddr) Full() string
func (TargetAddr) Intersects ¶
func (p TargetAddr) Intersects(other Matcher) IntersectResult
func (TargetAddr) IsPrivate ¶
func (p TargetAddr) IsPrivate() bool
func (TargetAddr) MarshalJSON ¶
func (m TargetAddr) MarshalJSON() ([]byte, error)
func (TargetAddr) Match ¶
func (p TargetAddr) Match(t Specer) bool
func (TargetAddr) Not ¶
func (n TargetAddr) Not() Matcher
func (TargetAddr) Replace ¶
func (p TargetAddr) Replace(f Replacer) Matcher
func (TargetAddr) Simplify ¶
func (p TargetAddr) Simplify() Matcher
func (TargetAddr) String ¶
func (p TargetAddr) String() string
type TargetAddrs ¶
type TargetAddrs []TargetAddr
func (TargetAddrs) Intersects ¶
func (p TargetAddrs) Intersects(m Matcher) IntersectResult
func (TargetAddrs) MarshalJSON ¶
func (m TargetAddrs) MarshalJSON() ([]byte, error)
func (TargetAddrs) Match ¶
func (p TargetAddrs) Match(t Specer) bool
func (TargetAddrs) Replace ¶
func (p TargetAddrs) Replace(f Replacer) Matcher
func (TargetAddrs) Simplify ¶
func (p TargetAddrs) Simplify() Matcher
func (TargetAddrs) String ¶
func (p TargetAddrs) String() string
type TargetNotFoundErr ¶
type TargetNotFoundErr struct { String string Targets specer }
func (TargetNotFoundErr) Error ¶
func (e TargetNotFoundErr) Error() string
func (TargetNotFoundErr) Is ¶
func (e TargetNotFoundErr) Is(err error) bool
type TargetOutputPath ¶
type TargetOutputPath struct { TargetAddr Output string }
func TargetOutputParse ¶
func TargetOutputParse(pkg string, s string) (TargetOutputPath, error)
func (TargetOutputPath) Full ¶
func (p TargetOutputPath) Full() string
type TargetTool ¶
type Tools ¶
type Tools struct { Targets []TargetTool Hosts []HostTool Exprs []ExprTool }
Click to show internal directories.
Click to hide internal directories.