formula

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formula

type Formula struct {

	// NOTE(MeteorsLiu): these signatures MUST match with
	// 	the method declaration of ModuleF in formula/classfile.go
	ModPath   string
	FromVer   string
	OnRequire func(proj *formula.Project, deps *formula.ModuleDeps)
	OnBuild   func(ctx *formula.Context)
	OnTest    func(ctx *formula.Context)
	Filter    func() bool
	// contains filtered or unexported fields
}

Formula represents a loaded LLAR formula file with its metadata and callbacks. It contains module information and build/dependency handling functions.

func Clone added in v0.2.0

func Clone(f *Formula) *Formula

Clone creates an independent class instance backed by the same compiled formula program. Main must run again so its hooks capture the new instance.

func LoadFS

func LoadFS(fsys fs.ReadFileFS, path string) (*Formula, error)

LoadFS loads a formula from a filesystem interface. This allows loading formulas from remote repositories or mock filesystems. The path should be relative to the filesystem root.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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