package mvs

import "cmd/go/internal/mvs"

Package mvs implements Minimal Version Selection. See https://research.swtch.com/vgo-mvs.

Index

Functions

func BuildList

func BuildList(target module.Version, reqs Reqs) ([]module.Version, error)

BuildList returns the build list for the target module.

func Downgrade

func Downgrade(target module.Version, reqs Reqs, downgrade ...module.Version) ([]module.Version, error)

Downgrade returns a build list for the target module in which the given additional modules are downgraded.

func Req

func Req(target module.Version, list []module.Version, reqs Reqs) ([]module.Version, error)

Req returns the minimal requirement list for the target module that result in the given build list.

func Upgrade

func Upgrade(target module.Version, reqs Reqs, upgrade ...module.Version) ([]module.Version, error)

Upgrade returns a build list for the target module in which the given additional modules are upgraded.

func UpgradeAll

func UpgradeAll(target module.Version, reqs Reqs) ([]module.Version, error)

UpgradeAll returns a build list for the target module in which every module is upgraded to its latest version.

Types

type MissingModuleError

type MissingModuleError struct {
	Module module.Version
}

func (*MissingModuleError) Error

func (e *MissingModuleError) Error() string

type Reqs

type Reqs interface {
	Required(m module.Version) ([]module.Version, error)
	Max(v1, v2 string) string
	Latest(path string) (module.Version, error)
	Previous(m module.Version) (module.Version, error)
}

Source Files

mvs.go

Version
v1.11.0-beta.1
Published
Jun 26, 2018
Platform
js/wasm
Imports
3 packages
Last checked
1 second ago

Tools for package owners.