flow_version

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package flow_version provides the @flow_version directive, which rejects a .nflow file at compile time when the running compiler does not satisfy the declared version constraint. It gives flow authors a hard guarantee that a file will not be silently reinterpreted under different language semantics on a different release.

Typical use:

@flow_version ">=0.7.0"

A source build (core.Version == "dev") accepts every constraint — there is no release identity to compare against, and failing the build for a local `go run` would be counterproductive.

Index

Constants

View Source
const ID = "flow_version"

Variables

View Source
var Directive = core.Directive{
	Name:    "flow_version",
	Example: `@flow_version ">=0.7.0"`,
	Handler: handleDirective,
}

Directive parses `@flow_version "CONSTRAINT"` and rejects the source when the running compiler does not satisfy it. The constraint is one of `=`, `==`, `>=`, `<=`, `>`, `<`, or bare (implicit `=`), followed by a MAJOR.MINOR.PATCH version, optionally prefixed with `v` and optionally carrying a pre-release or build-metadata suffix that is ignored for comparison.

Functions

func Bundle

func Bundle(_ map[string]string) core.Bundle

Types

This section is empty.

Jump to

Keyboard shortcuts

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