Nix  2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::Goal Struct Referenceabstract
Inheritance diagram for nix::Goal:
[legend]
Collaboration diagram for nix::Goal:
[legend]

Classes

struct  WorkResult
 

Public Types

enum  ExitCode { ecSuccess , ecFailed , ecNoSubstituters , ecIncompleteClosure }
 

Public Member Functions

 Goal (Worker &worker, bool isDependency)
 
kj::Promise< Result< WorkResult > > work () noexcept
 
virtual void waiteeDone (GoalPtr waitee)
 
void trace (std::string_view s)
 
std::string getName () const
 
virtual void cleanup ()
 
virtual JobCategory jobCategory () const =0
 Hint for the scheduler, which concurrency limit applies.
 

Public Attributes

Workerworker
 
const bool isDependency
 
size_t nrFailed = 0
 
size_t nrNoSubstituters = 0
 
size_t nrIncompleteClosure = 0
 
std::string name
 

Protected Member Functions

kj::Promise< void > waitForAWhile ()
 
kj::Promise< Result< void > > waitForGoals (kj::Array< std::pair< GoalPtr, kj::Promise< Result< WorkResult > > > > dependencies) noexcept
 
template<std::derived_from< Goal >... G>
kj::Promise< Result< void > > waitForGoals (std::pair< std::shared_ptr< G >, kj::Promise< Result< WorkResult > > >... goals) noexcept
 
virtual kj::Promise< Result< WorkResult > > workImpl () noexcept=0
 

Protected Attributes

AsyncSemaphore::Token slotToken
 

Member Function Documentation

◆ jobCategory()

virtual JobCategory nix::Goal::jobCategory ( ) const
pure virtual

Hint for the scheduler, which concurrency limit applies.

See also
JobCategory

Implemented in nix::DerivationGoal, nix::DrvOutputSubstitutionGoal, and nix::PathSubstitutionGoal.

Member Data Documentation

◆ isDependency

const bool nix::Goal::isDependency

Whether this goal is only a dependency of other goals. Toplevel goals that are also dependencies of other toplevel goals do not set this, only goals that are exclusively dependencies do this.

◆ name

std::string nix::Goal::name

Name of this goal for debugging purposes.

◆ nrFailed

size_t nix::Goal::nrFailed = 0

Number of goals we are/were waiting for that have failed.

◆ nrIncompleteClosure

size_t nix::Goal::nrIncompleteClosure = 0

Number of substitution goals we are/were waiting for that failed because they had unsubstitutable references.

◆ nrNoSubstituters

size_t nix::Goal::nrNoSubstituters = 0

Number of substitution goals we are/were waiting for that failed because there are no substituters.

◆ worker

Worker& nix::Goal::worker

Backlink to the worker.


The documentation for this struct was generated from the following files: