resolver

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: GPL-3.0 Imports: 5 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 resolver builds the dependency graph, resolves semver ranges to concrete versions, validates ILE signatures, detects conflicts, and produces a reproducible bindle.lock.

Package resolver builds the dependency graph, resolves semver ranges to concrete versions, validates ILE signatures, detects conflicts, and produces a reproducible bindle.lock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Available

type Available struct {
	Version      string
	Library      string
	Srvpgm       string
	Signature    string
	Artifact     string
	Hash         string
	Dependencies map[string]string // name -> version constraint
	Schema       string            // migration target schema
	Migrations   []string          // registry-relative migration paths, ordered
}

Available describes one published version of a package.

type ConflictError

type ConflictError struct {
	Package     string
	Constraints []constraintSrc
}

ConflictError is returned when no version satisfies all accumulated constraints.

func (*ConflictError) Error

func (e *ConflictError) Error() string

type CycleError

type CycleError struct{ Members []string }

CycleError is returned when the dependency graph contains a cycle.

func (*CycleError) Error

func (e *CycleError) Error() string

type NotFoundError

type NotFoundError struct{ Package string }

NotFoundError is returned when a required package is unknown to the registry.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type Registry

type Registry interface {
	// Versions returns the available published versions of a package.
	// An empty result means the package is unknown to the registry.
	Versions(name string) ([]Available, error)
}

Registry provides the data the resolver needs about available packages.

type Resolution

type Resolution struct {
	// Order is a topological order: dependencies appear before dependents.
	Order []string
	// Selected maps each package name to the concrete version chosen.
	Selected map[string]Available
}

Resolution is the outcome of resolving a manifest's dependency graph.

func Resolve

func Resolve(root *manifest.Manifest, reg Registry) (*Resolution, error)

Resolve walks the dependency graph reachable from root, selecting for each package the highest version satisfying every accumulated constraint.

func (*Resolution) Lock

func (r *Resolution) Lock() *manifest.Lock

Lock converts a resolution into a reproducible manifest.Lock.

Jump to

Keyboard shortcuts

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