mise

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 19 Imported by: 2 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

Index

Constants

View Source
const (
	InstallDir                = "/tmp/railpack/mise"
	TestInstallDir            = "/tmp/railpack/mise-test"
	IdiomaticVersionFileTools = "python,node,ruby,elixir,go,java,yarn,pnpm,bun,deno,dotnet,rust"
	// applied only to the first GetLatestVersion check to skip very recent releases
	MinimumReleaseAge = "14d"
)
View Source
const (
	ErrMiseGetLatestVersion = "failed to resolve version %s of %s"
)

Variables

View Source
var Version string

Functions

func GenerateMiseToml

func GenerateMiseToml(packages map[string]string, settings map[string]any) (string, error)

used by the container mise logic, but uses the package structs defined in this file

func IsTemporary added in v0.36.4

func IsTemporary(err error) bool

reports whether err (or anything it wraps) is a transient failure. Callers use this to decide whether retrying the whole operation makes sense.

Types

type Mise

type Mise struct {
	// contains filtered or unexported fields
}

func New

func New(cacheDir string) (*Mise, error)

func (*Mise) GetAllVersions added in v0.0.31

func (m *Mise) GetAllVersions(pkg, version string) ([]string, error)

func (*Mise) GetCurrentList added in v0.9.0

func (m *Mise) GetCurrentList(appDir string, ignoredConfigPaths []string) (string, error)

returns the JSON output of 'mise list --current --json' for the app.

ignoredConfigPaths are files in appDir that will not be in the build context. mise reads the directory itself, so a dockerignored mise.local.toml would otherwise override the committed toolchain. Paths are colon-separated, which is how mise parses MISE_IGNORED_CONFIG_PATHS.

func (*Mise) GetLatestVersion

func (m *Mise) GetLatestVersion(pkg, version string) (string, error)

gets the latest version of a package matching the version constraint

type MiseConfig

type MiseConfig struct {
	Tools    map[string]string `toml:"tools"`
	Settings map[string]any    `toml:"settings,omitempty"`
}

MiseConfig represents the overall mise configuration

type TemporaryError added in v0.36.4

type TemporaryError struct {
	URL string
	Err error
}

TemporaryError marks a failure that is worth retrying: network transport errors, rate limits, and server-side errors. Deterministic failures (a 404 for a version that does not exist, a malformed archive) are never wrapped in this, since retrying them cannot succeed.

func (*TemporaryError) Error added in v0.36.4

func (e *TemporaryError) Error() string

func (*TemporaryError) Unwrap added in v0.36.4

func (e *TemporaryError) Unwrap() error

Jump to

Keyboard shortcuts

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