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 ¶
const ID = "flow_version"
Variables ¶
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 ¶
Types ¶
This section is empty.