version

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package version carries the version of this build and collects the provenance a published bundle can prove about itself.

Index

Constants

This section is empty.

Variables

View Source
var Value = "0.9.7"

Functions

This section is empty.

Types

type GrammarProvenance

type GrammarProvenance struct {
	Manifest string           `json:"manifest"`
	SHA256   *string          `json:"sha256"`
	Versions []GrammarVersion `json:"versions"`
}

GrammarProvenance identifies the pinned grammar manifest and its entries.

type GrammarVersion

type GrammarVersion struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Commit  string `json:"commit"`
}

GrammarVersion is the compact grammar identity exposed by provenance.

type Provenance

type Provenance struct {
	Kivgraph           string            `json:"kivgraph"`
	Commit             *string           `json:"commit"`
	Dirty              *bool             `json:"dirty"`
	Go                 string            `json:"go"`
	Node               *string           `json:"node"`
	TypeScript         *string           `json:"typescript"`
	TypeScriptFallback *string           `json:"typescript_fallback"`
	Ladybug            string            `json:"ladybug"`
	GoLadybug          string            `json:"go_ladybug"`
	Schema             int               `json:"schema"`
	SnapshotRowFormat  uint32            `json:"snapshot_row_format"`
	Resolver           *string           `json:"resolver"`
	Grammars           GrammarProvenance `json:"grammars"`
	// RustAnalyzer is the engine the bundle carries for Rust. A development
	// binary ships none and reports null: the analyzer it would run comes
	// from the PATH and is not part of this build's provenance.
	RustAnalyzer *string `json:"rust_analyzer"`
}

Provenance is the stable machine-readable output of `kivgraph version --json`. Fields unavailable outside a distribution bundle are represented as null rather than guessed values.

func Collect

func Collect(executablePath, workingDir string) (Provenance, error)

Collect describes the running process, and never the directory it was invoked from. Provenance comes from the manifest of the bundle this executable lives in -- resolved from the executable path, not from workingDir, which only locates the grammar manifest of a development checkout. A manifest found there that names another release or another target does not describe this process and is refused rather than preferred.

The version is always the compiled Value: a manifest can enrich provenance, never rename the binary. Without a bundle manifest the unavailable values are explicit nulls, because a guess read off a neighbouring directory is what this output exists to avoid.

Jump to

Keyboard shortcuts

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