Documentation
¶
Overview ¶
Package pluginsetup wires bundled plugins into a plugin.Manager, applying the disable-list / kill-switch precedence across global config, project .cribrc, and CLI flags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveDotfiles ¶
func ResolveDotfiles(gcfg globalconfig.DotfilesConfig, rc globalconfig.DotfilesRC) (globalconfig.DotfilesConfig, bool)
ResolveDotfiles merges the global dotfiles config with per-project overrides and reports whether the plugin should be registered.
Types ¶
type Opts ¶
type Opts struct {
// GlobalDisable is the plugin disable list from the global config
// ([plugins] disable = [...]).
GlobalDisable []string
// GlobalDisableAll is the kill switch from the global config
// ([plugins] disable_all = true).
GlobalDisableAll bool
// ProjectDisable is the plugin disable list from .cribrc
// ([plugins] disable = [...] or plugins.disable = "a, b").
ProjectDisable []string
// ProjectDisableAll is the kill switch from .cribrc
// (plugins = "false").
ProjectDisableAll bool
// CLIDisable is the plugin disable list passed via --disable-plugin.
CLIDisable []string
// GlobalDotfiles is the dotfiles section of the global config.
GlobalDotfiles globalconfig.DotfilesConfig
// ProjectDotfiles is the dotfiles section of .cribrc.
ProjectDotfiles globalconfig.DotfilesRC
// CacheProviders lists package cache providers for the package-cache plugin.
CacheProviders []string
}
Opts holds the inputs for plugin setup.
type Result ¶
type Result struct {
// Manager is the configured plugin manager, ready to attach to the engine.
Manager *plugin.Manager
// Plugins lists the names of plugins Configure registered on Manager, in
// registration order. Exposed so callers (and tests) can introspect the
// effective plugin set without reaching into Manager internals.
Plugins []string
// BuildCacheMounts lists BuildKit cache mount targets for feature builds
// (derived from the package-cache plugin when registered).
BuildCacheMounts []string
}
Result holds the outputs of plugin setup.
func Configure ¶
Configure creates a plugin manager and registers bundled plugins according to the merged disable precedence (global + project + CLI). The kill switch from any layer skips every plugin; warnings for unknown plugin names are logged before the kill switch is honored so typos stay visible.