Skip to main content

TaskSteps

Struct TaskSteps 

Source
pub struct TaskSteps<'a> { /* private fields */ }
Expand description

The step executor of one run of a task program.

Implementations§

Source§

impl<'a> TaskSteps<'a>

Source

pub const fn with_events(self, events: &'a dyn StepEvents) -> Self

The step executor, which tells events when each step starts to run and when each comes from the cache, as kizz run asks for its live output.

Source§

impl TaskSteps<'_>

Source

pub const fn with_cache_never(self, never: bool) -> Self

The step executor, which runs every step as if it were marked always, with the reason that names the task option, when never says that the task is marked cache=never. The option is in no step key.

Source

pub fn keys(&self) -> Vec<StepKey>

The key of each step so far, in order.

Source

pub fn decisions(&self) -> Vec<StepDecision>

What the build decided about each step so far, in order: why each one ran, or that it was cached.

Source

pub fn commands(&self) -> Vec<CommandInput>

The command of each step so far that reached a decision, in order, for the observation report: a step that ran, or whose program kizz did not find, with its outcome, its process tree and the lookup’s observations, and a step that came from the cache as cached. A step whose bare program name has no PATH is in it too, as a command that started no process, although it has no decision. Empty unless the engine writes a report (Engine::with_report).

Source

pub fn finish(&self, succeeded: bool) -> Result<(), StoreError>

End the run of the task: store the step positions of its cached steps, add the task to the owners of the record each of them names, remove the positions beyond its last step, and store its task record, all in one transaction, with succeeded saying whether the run succeeded. Without a task identity this stores nothing.

Every way a step is noted as cached makes its task an owner here: a hit on a stored record, and a result reused within the build, an always result or a result that was not cached, whose run stored the record under the key. A record that the task already owns is not written again for its owners. A step that ran stored its position and became its record’s owner when it ran.

§Errors

A StoreError when the records cannot be written.

Trait Implementations§

Source§

impl Debug for TaskSteps<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl StepExecutor for TaskSteps<'_>

Source§

fn execute(&self, step: &StepSpec) -> Result<StepOutcome, StepError>

Run step, as the module documentation lists: a step that fails before it is noted as ran has no decision, and takes back what it marked in the build’s memories: the start of an always run and a compared machine state.

Auto Trait Implementations§

§

impl<'a> !Freeze for TaskSteps<'a>

§

impl<'a> !RefUnwindSafe for TaskSteps<'a>

§

impl<'a> !Send for TaskSteps<'a>

§

impl<'a> !Sync for TaskSteps<'a>

§

impl<'a> !UnwindSafe for TaskSteps<'a>

§

impl<'a> Unpin for TaskSteps<'a>

§

impl<'a> UnsafeUnpin for TaskSteps<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsTypeStaticRegistered for T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> HasTyVTable for T
where T: ?Sized,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToAst for T

§

fn ast(self, begin: usize, end: usize) -> Spanned<Self>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more