xtask library
xtask — a task runner whose tasks are data.
The README is the record of what this is and why it refuses what it refuses — three rules and a list of anti-goals, each there because it prevents a failure that has already happened somewhere. Read it before changing anything here.
Classes
- ExitCode
- What the process answers with.
- LogSink
-
A
StringSinkthat hands each complete line to log. - VerbContext
- Everything a verb is given.
Functions
-
continuationNotice(
{required String body, required String continuation}) → String -
What an ExitCode.continuationFailed run prints: that
bodyfinished, and thatcontinuation, failing after it, does not undo that. -
findRoot(
String from) → String? -
The directory holding
xtask.yaml, looked for fromfromupwards, or null when neitherfromnor any directory above it has one. -
gateMembers(
String gate, {String? workingDirectory}) → List< String> -
The tasks in gate set
gate, in the order a run of it starts them — the linesxtask --gate-members <gate>prints, without starting a process to print them. -
runXtask(
List< String> args, {Map<String, Verb> verbs = const {}, String? workingDirectory}) → Future<int> -
Runs
xtaskwith the verbs this project supplies, and answers with the process exit code — the exit code table in doc/reference.md says what each means.
Typedefs
- Captured = ({int exitCode, String stderr, String stdout})
- What a program answered and what it wrote, each stream whole — for a verb that has to read a program's output rather than pass it through.
-
Verb
= Future<
int> Function(VerbContext context) -
A job the project implements in Dart, named by a task's
do:key.
Exceptions / Errors
- XtaskFormatException
- A refusal to read the file, reported at the place that caused it.