Skip to main content

FeatureFlagsOutput

Type Alias FeatureFlagsOutput 

Source
pub type FeatureFlagsOutput = FeatureFlagsOutput;
Expand description

Concrete feature-flag output contract returned by typed programmatic runs.

Aliased Type§

pub struct FeatureFlagsOutput {
    pub schema_version: SchemaVersion,
    pub version: ToolVersion,
    pub elapsed_ms: ElapsedMs,
    pub request_outcomes: Option<RequestOutcomes>,
    pub feature_flags: Vec<FeatureFlagFinding>,
    pub total_flags: usize,
    pub workspace_diagnostics: Vec<WorkspaceDiagnostic>,
    pub retirement: Option<FlagRetirementReport>,
    pub meta: Option<FeatureFlagsMeta>,
}

Fields§

§schema_version: SchemaVersion

Flags output schema version.

§version: ToolVersion

Fallow CLI version that produced this output.

§elapsed_ms: ElapsedMs

Wall-clock analysis duration in milliseconds.

§request_outcomes: Option<RequestOutcomes>

What the run was asked to narrow and whether it did. See [crate::RequestOutcomes] for the full contract.

fallow flags accepts --changed-since, and an unresolvable ref widens the scan to the whole project rather than failing the run. Until this member existed the only account of that was a stderr line, which --quiet removes, so a flag inventory read as scoped to the change could silently be the whole project’s (issue #2734).

The command applies no diff filter, so the object carries the changed-since entry only. Omitted when the run was asked for nothing, which keeps a scan that passed no narrowing flag byte-identical and moves no schema_version.

§feature_flags: Vec<FeatureFlagFinding>

Detected feature-flag findings.

§total_flags: usize

Number of entries in feature_flags.

§workspace_diagnostics: Vec<WorkspaceDiagnostic>

Workspace-discovery and source-discovery diagnostics for the run. See CheckOutput::workspace_diagnostics for the full contract.

A flags run walks and parses the project like every other analysis, so it records the same discovery kinds: a skipped-large-file, skipped-minified-file, or source-read-failure file was never scanned for flags, and a source-parse-degraded file was scanned from a partial module. Each is a reason a flag can be missing from feature_flags[], which is exactly what a consumer reading a zero-result run needs to know. The analysis-stage kinds appear here too: the scan correlates flags with dead exports, so it runs the dead-code analyze pass that records them.

Omitted when empty, so a project with no discovery noise sees no change.

§retirement: Option<FlagRetirementReport>

One row per flag with the reasons the flag can be retired.

Present only with --retirement. Without that option the key is omitted, so the envelope stays byte-identical and schema_version does not move. The per-site feature_flags[] array is the same with and without the option.

§meta: Option<FeatureFlagsMeta>

_meta block; see [FeatureFlagsMeta].