experiments

package
v3.53.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(dir string)

func ParseWithConfig added in v3.45.0

func ParseWithConfig(dir string, config *ast.TaskRC)

func Validate

func Validate() error

Validate checks if any experiments have been enabled while being inactive. If one is found, the function returns an error.

Types

type Experiment

type Experiment struct {
	Name           string // The name of the experiment.
	AllowedValues  []int  // The values that can enable this experiment.
	Value          int    // The version of the experiment that is enabled.
	InactiveReason string // If not active, the reason why it is inactive.
}
var (
	GentleForce   Experiment
	EnvPrecedence Experiment
)

Active experiments.

var (
	AnyVariables    Experiment
	MapVariables    Experiment
	RemoteTaskfiles Experiment
)

Inactive experiments. These are experiments that cannot be enabled, but are preserved for error handling.

func List

func List() []Experiment

func New

func New(xName string, config *ast.TaskRC, allowedValues ...int) Experiment

New creates a new experiment with the given name and sets the values that can enable it.

func NewAbandoned added in v3.53.0

func NewAbandoned(xName string, config *ast.TaskRC) Experiment

NewAbandoned creates a new experiment that has been abandoned and is no longer supported. It will always be inactive and cannot be enabled.

func NewReleased added in v3.53.0

func NewReleased(xName string, config *ast.TaskRC) Experiment

NewReleased creates a new experiment that is released and no longer needs to be enabled. It will always be inactive and cannot be enabled.

func (Experiment) Active

func (x Experiment) Active() bool

func (Experiment) Enabled

func (x Experiment) Enabled() bool

func (Experiment) String

func (x Experiment) String() string

func (Experiment) Valid

func (x Experiment) Valid() error

type InactiveError

type InactiveError struct {
	Name   string
	Reason string
}

func (InactiveError) Error

func (err InactiveError) Error() string

type InvalidValueError

type InvalidValueError struct {
	Name          string
	AllowedValues []int
	Value         int
}

func (InvalidValueError) Error

func (err InvalidValueError) Error() string

Jump to

Keyboard shortcuts

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