Documentation
¶
Index ¶
- Variables
- func Completion(shell string, w io.Writer) error
- func EnsureHarness(reqs []require.Requirement, flowPath ...string) (string, error)
- func EnsureHarnessContext(ctx context.Context, reqs []require.Requirement, flowPath ...string) (string, error)
- func ExecHarness(bin string, args []string) int
- func ExecHarnessContext(ctx context.Context, bin string, args []string) int
- func Print(w interface{ ... })
- func PrintCommandHelp(w io.Writer, command string) bool
- func PrintTopHelp(w io.Writer)
- func Run(args []string) int
- func RunContext(ctx context.Context, args []string) int
- func RunEmbedded(ctx context.Context, source string, args []string) int
- func RunEmbeddedWithBundleFactoriesForRequirements(ctx context.Context, source string, args, targets []string, ...) int
- func RunEmbeddedWithBundles(ctx context.Context, source string, args []string, bundles []core.Bundle) int
- func RunEmbeddedWithBundlesForRequirements(ctx context.Context, source string, args []string, bundles []core.Bundle, ...) int
- func RunPath(ctx context.Context, args []string) int
- func RunWithBundleFactoriesForRequirements(args, targets []string, construct func(func(core.Bundle) error) error) int
- func RunWithBundles(args []string, bundles []core.Bundle) int
- func RunWithBundlesForRequirements(args []string, bundles []core.Bundle, targets []string) int
- func SelfBuild(ctx context.Context) error
- func SourceRequires(path string) ([]require.Requirement, error)
- type ASTNode
- type ASTPipeline
- type ASTReport
- type LintIssue
- type Step
- type StepLogger
Constants ¶
This section is empty.
Variables ¶
var ( Version = "dev" Commit = unknownValue BuiltAt = unknownValue )
var ErrCompletionEmpty = errors.New("completion: nothing to complete")
ErrCompletionEmpty is reserved for future dynamic completions that may return nothing. Kept for API stability.
var SupportedShells = []string{"bash", "zsh", "pwsh", "powershell"}
SupportedShells lists the shells for which completion scripts exist.
Functions ¶
func Completion ¶
Completion writes a completion script for the named shell to w.
func EnsureHarness ¶
func EnsureHarness(reqs []require.Requirement, flowPath ...string) (string, error)
EnsureHarness builds or reuses a runner binary linked with exactly the external modules declared by reqs.
func EnsureHarnessContext ¶ added in v0.15.0
func EnsureHarnessContext(ctx context.Context, reqs []require.Requirement, flowPath ...string) (string, error)
EnsureHarnessContext is EnsureHarness with caller-controlled cancellation.
func ExecHarness ¶
func ExecHarnessContext ¶ added in v0.15.0
ExecHarnessContext runs a generated harness with caller-controlled cancellation.
func PrintTopHelp ¶
func RunContext ¶ added in v0.15.0
RunContext is Run with a caller-controlled parent context. It also cancels the invocation on Ctrl+C/SIGINT and, where supported, SIGTERM.
func RunEmbeddedWithBundleFactoriesForRequirements ¶ added in v0.15.0
func RunEmbeddedWithBundleFactoriesForRequirements(ctx context.Context, source string, args, targets []string, construct func(func(core.Bundle) error) error) int
RunEmbeddedWithBundleFactoriesForRequirements adopts each generated bundle as soon as its factory returns, before later factories or Flow dispatch run.
func RunEmbeddedWithBundles ¶
func RunEmbeddedWithBundlesForRequirements ¶ added in v0.15.0
func RunEmbeddedWithBundlesForRequirements(ctx context.Context, source string, args []string, bundles []core.Bundle, targets []string) int
RunEmbeddedWithBundlesForRequirements is the embedded-flow counterpart of RunWithBundlesForRequirements.
func RunWithBundleFactoriesForRequirements ¶ added in v0.15.0
func RunWithBundleFactoriesForRequirements(args, targets []string, construct func(func(core.Bundle) error) error) int
RunWithBundleFactoriesForRequirements runs generated CLI code in one host scope and adopts each returned bundle before the next factory runs.
func RunWithBundlesForRequirements ¶ added in v0.15.0
RunWithBundlesForRequirements injects bundles linked to their original @require targets. This preserves bundle IDs when an explicit package variant has a different import-path suffix.
func SelfBuild ¶
SelfBuild rebuilds the running nexssflow binary in place, injecting VCS metadata from the source directory. It replaces the manual `go install` step for developers who want consistent version output.
func SourceRequires ¶
func SourceRequires(path string) ([]require.Requirement, error)
SourceRequires performs the native-directive bootstrap pass and owns any resources constructed while discovering requirements.
Types ¶
type ASTNode ¶ added in v0.14.0
type ASTNode struct {
Kind string `json:"kind"`
Name string `json:"name,omitempty"`
Args map[string]any `json:"args,omitempty"`
Raw string `json:"raw,omitempty"`
Condition string `json:"condition,omitempty"`
Message string `json:"message,omitempty"`
Until string `json:"until,omitempty"`
L *ASTNode `json:"l,omitempty"`
R *ASTNode `json:"r,omitempty"`
Cond *ASTNode `json:"cond,omitempty"`
Then *ASTNode `json:"then,omitempty"`
Else *ASTNode `json:"else,omitempty"`
Body *ASTNode `json:"body,omitempty"`
Branches []*ASTNode `json:"branches,omitempty"`
}
ASTNode is the machine-readable form of one AST node. Fields are populated selectively based on Kind:
Atom — Name, Args Pipe — L, R Parallel — Branches Fallback — L, R Conditional — Cond, Then, Else Projection — Raw Loop — Body, Until Assert — Condition, Message
A consumer that switches on Kind only reads the fields the Kind documents. Unknown kinds carry only Kind, which is the extension point: a future AST node type adds a new Kind string and its own fields without breaking existing consumers.
type ASTPipeline ¶ added in v0.14.0
ASTPipeline is one named pipeline definition.
type ASTReport ¶ added in v0.14.0
type ASTReport struct {
Path string `json:"path"`
TopLevel *ASTNode `json:"top_level,omitempty"`
Pipelines []ASTPipeline `json:"pipelines,omitempty"`
}
ASTReport is the top-level JSON envelope. TopLevel is omitted when the file contains only @pipeline definitions.
type LintIssue ¶
type LintIssue struct {
File string `json:"file"`
Line int `json:"line,omitempty"`
Kind string `json:"kind"`
Message string `json:"message"`
}
LintIssue is one problem found in a .nflow source. The shape is stable — the CLI prints it as JSON so tooling and editors can consume it. File is always a real path (never a synthetic label).
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
Step is one in-flight build step. Exactly one terminal method should be called; further calls are ignored.
type StepLogger ¶
type StepLogger struct {
// contains filtered or unexported fields
}
StepLogger prints numbered build steps. In an interactive terminal it animates a spinner while a step is running. When stdout is redirected to a file or a pipe, the spinner is disabled so CI logs stay clean.
func NewStepLogger ¶
func NewStepLogger(w io.Writer, total int) *StepLogger
NewStepLogger returns a logger that will print at most total steps.
func (*StepLogger) Start ¶
func (l *StepLogger) Start(label, detail string) *Step
Start begins a step. In a TTY it launches the spinner goroutine.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package selftest runs the Nexss Flow self-test suite: a feature-by- feature check of every registered bundle, run in-process against the binary's own compiler and runtime.
|
Package selftest runs the Nexss Flow self-test suite: a feature-by- feature check of every registered bundle, run in-process against the binary's own compiler and runtime. |