Documentation
¶
Overview ¶
Package buildconfig provides build config for `siso ninja`.
Index ¶
- type Config
- func (cfg *Config) Func(ctx context.Context, handler string) (starlark.Value, bool)
- func (cfg *Config) Handle(ctx context.Context, handler string, bpath *build.Path, cmd *execute.Cmd, ...) (err error)
- func (cfg *Config) Init(ctx context.Context, hashFS *hashfs.HashFS, buildPath *build.Path) (string, error)
- func (cfg *Config) UpdateFilegroups(ctx context.Context, hashFS *hashfs.HashFS, buildPath *build.Path, ...) (Filegroups, error)
- type Filegroups
- type HandlerError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Metadata contains key-value metadata for the build. Metadata metadata.Metadata // contains filtered or unexported fields }
Config is a build config.
func New ¶
func New(ctx context.Context, fname string, flags map[string]string, repos map[string]fs.FS) (*Config, error)
New returns new build config.
func (*Config) Handle ¶
func (cfg *Config) Handle(ctx context.Context, handler string, bpath *build.Path, cmd *execute.Cmd, expandedInputs func() []string) (err error)
Handle runs handler for the cmd.
func (*Config) Init ¶
func (cfg *Config) Init(ctx context.Context, hashFS *hashfs.HashFS, buildPath *build.Path) (string, error)
Init initializes config by running `init`.
func (*Config) UpdateFilegroups ¶
func (cfg *Config) UpdateFilegroups(ctx context.Context, hashFS *hashfs.HashFS, buildPath *build.Path, filegroups Filegroups) (Filegroups, error)
UpdateFilegroups returns updated filegroups. It takes cached filegroups that were generated by the previous build. When a given filegroup is valid, it is reused. Otherwise, gets the file list by the filegroup operation. e.g. glob.
type Filegroups ¶
type Filegroups struct { // Etags are opaque identifiers map by label. // Each etag is assigned to specific version of a filegroup // for the label. ETags map[string]string `json:"etags"` // Filegroups are filegroup's map by label. // It can be used to ninjabuild.InputDeps as is. Filegroups map[string][]string `json:"filegroups"` }
Filegroups is serialized filegoups information for cache.
type HandlerError ¶
type HandlerError struct {
// contains filtered or unexported fields
}
HandlerError is error of handler.
func (HandlerError) Backtrace ¶
func (e HandlerError) Backtrace() string
func (HandlerError) Error ¶
func (e HandlerError) Error() string
func (HandlerError) Unwrap ¶
func (e HandlerError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.