toolchain

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package toolchain selects and caches immutable compiler installations.

Index

Constants

View Source
const ReasonEnv = "BORK_TOOLCHAIN_REASON"
View Source
const SelectedEnv = "BORK_TOOLCHAIN_SELECTED"

Variables

This section is empty.

Functions

func Clean

func Clean(ctx context.Context, root string) error

func Ensure

func Ensure(ctx context.Context, root, query string, output io.Writer) (path, version string, err error)

Ensure resolves a query once and publishes a verified, immutable compiler. Minor queries retain their first resolution until toolchain caches are cleaned.

func Requirement

func Requirement(path string) (manifest.Version, string, error)

func WithCompiler

func WithCompiler(ctx context.Context, root, query string, output io.Writer, run func(path, version string) error) error

WithCompiler retains a shared execution lease for the whole callback. Other compilers and nested invocations can run/install while cleanup waits.

Types

type Selection

type Selection struct {
	Version string
	Reason  string
	Query   string
}

func Select

func Select(current, setting, path string) (Selection, error)

Jump to

Keyboard shortcuts

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