target

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 17 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 target is the project a command answers for: the checkout, its layered instructions, the probes and the effective facts, resolved once.

Index

Constants

This section is empty.

Variables

View Source
var ProjectOf = func(ctx context.Context, dir string) string { return ledger.Where(ctx, dir).Project }

ProjectOf is the ledger's project id for dir. A var, so tests that fake git leave the task refs alone.

Functions

func CheckoutDir

func CheckoutDir(sel string) (string, error)

CheckoutDir sends a bare name to projects, which is off until the user turns it on; a path needs no lookup.

func CheckoutFlags

func CheckoutFlags(cmd *cli.Command) []string

func ExpandHome

func ExpandHome(path string) (string, error)

func LabeledErrors

func LabeledErrors(problems []facts.Problem) string

LabeledErrors marks each of the project's problems with project.md; a problem in the user's ~/.f10 files names its own file already.

func RootDir

func RootDir(cmd *cli.Command) (string, bool, error)

Types

type Target

type Target struct {
	Dir       string
	Layout    *layout.Layout
	Probes    *probe.Probes
	Effective *facts.Effective
	// contains filtered or unexported fields
}

A Target is the project a command answers for; -C only changes which checkout it describes, which is the whole of cross-project support.

func At

func At(ctx context.Context, dir string, scoped bool, cmdName string) (*Target, error)

func For

func For(ctx context.Context, cmd *cli.Command) (*Target, error)

func (*Target) BranchReference

func (t *Target) BranchReference(ctx context.Context, explicit string) (ref.Ref, error)

BranchReference is Reference without the session's task: the branch's task or none, because a findings key, a commit's trailers and a merge follow the checkout, never what this session last ran. Under -C the branch is that checkout's own, so it answers there too.

func (*Target) Driver

func (t *Target) Driver() *trackerdriver.Driver

func (*Target) DriverPaths

func (t *Target) DriverPaths() []string

DriverPaths, in lookup order: this checkout's own, then beside each instruction layer, last first, so a worktree finds main's driver where it finds main's instructions and one replacing them keeps main's driver out.

func (*Target) HostCloses

func (t *Target) HostCloses() bool

HostCloses reports that the host's issues are the tracker, so a merge's closing keyword closes the task; a driver's tracker is never closed that way.

func (*Target) HostIssues

func (t *Target) HostIssues() bool

func (*Target) IDOf

func (t *Target) IDOf(ctx context.Context) func(string) string

IDOf turns a task as typed (`117`, a url) into its id, a token that names no task kept as typed. Lookups may start git and every finish row asks, so each token is looked up once, safely across concurrent readers.

func (*Target) LoreRoot

func (t *Target) LoreRoot() string

LoreRoot is where the project's lore lives: the checkout's committed .lore, else the storage root's, which every checkout shares.

func (*Target) OutOfTree

func (t *Target) OutOfTree() bool

OutOfTree says the storage root is ~/.f10/<project>, outside every checkout.

func (*Target) RefProject

func (t *Target) RefProject(ctx context.Context) string

RefProject is the ledger's project id for this target, read once: status and drive write refs for every task they show.

func (*Target) Reference

func (t *Target) Reference(ctx context.Context, explicit string) (ref.Ref, error)

Reference looks up a task for this target. Under -C the cascade collapses: the branch and the session task answer for *this* checkout, so pointing at another project means saying which task.

func (*Target) TrackerDeclared

func (t *Target) TrackerDeclared() bool

Jump to

Keyboard shortcuts

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