Documentation
¶
Overview ¶
Package resolver turns a requested source reference into a resolved, immutable revision, keeping requested, resolved, and immutable refs distinct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoMatchingVersion = errors.New("no version matches constraint")
ErrNoMatchingVersion is returned when no tag satisfies a version constraint.
Functions ¶
This section is empty.
Types ¶
type OutdatedResult ¶
OutdatedResult reports whether a newer version is available for a skill.
func Outdated ¶
func Outdated(ctx context.Context, runner git.Runner, ref source.Ref, req Requested, current Revision) (OutdatedResult, error)
Outdated reports available updates for a skill given its current locked revision and the requested constraint, with semantics that depend on the pin type (FR-009, design §9.2). Commit and local pins are never outdated; semver and tag pins compare against the highest satisfying tag; branch pins compare the branch head commit.
type RefKind ¶
type RefKind string
RefKind records how a requested reference was resolved to a revision.
const ( RefKindSemver RefKind = "semver" RefKindTag RefKind = "tag" RefKindBranch RefKind = "branch" RefKindCommit RefKind = "commit" RefKindLocal RefKind = "local" )
Ref kinds (FR-009, FR-010). semver, tag, and commit are immutable; branch and local are mutable.
type Requested ¶
type Requested struct {
Version string // semver constraint
Ref string // branch or tag
Commit string // explicit commit
}
Requested is the human's version intent (at most one field drives resolution).