summaryrefslogtreecommitdiffstats
path: root/src/executor.rs
AgeCommit message (Collapse)Author
2021-10-25Move main crate to subdirectoryMatthias Schiffer
2021-10-25Move runner into separate crateMatthias Schiffer
2021-10-24Split defintions used by both runner and executor into separate crateMatthias Schiffer
Also get rid of the Runner trait - different runner implementations do not make sense with our current design.
2021-10-24runner: merge TaskInput struct into TaskMatthias Schiffer
2021-10-24Move definition of Dependency into runner moduleMatthias Schiffer
runner::TaskInput does not contain the dependency hashes anymore, this is handled internally in the runner module now. Unfortunately this also means that we can't use this struct directly for the InputHash anymore, but overall this reduces the complexity of the interface between runner and executor.
2021-10-22executor: return error when reply channel is closed unexectedlyMatthias Schiffer
2021-10-21executor: run ready tasks in parallelMatthias Schiffer
2021-10-21runner: expose reply channelMatthias Schiffer
2021-10-18executor: use into_iter() instead of iter() in task_deps()Matthias Schiffer
2021-10-18Move task cache handling from executor to runnerMatthias Schiffer
The input hash and the state directory is only a concern of the runner this way; it is only passed to the executor at all for the summary output. We're losing some cache metadata this way, as the TaskMeta struct is removed completely. Timestamps can be added back easily, but to implement proper cache cleanup we will need a replacement for the args map.
2021-10-18executor: store TaskOutput instead of TaskMeta in tasks_doneMatthias Schiffer
Preparation for moving more of the caching logic to the runner.
2021-10-18executor: summary: sort outputs by nameMatthias Schiffer
2021-10-18executor: set SOURCE_TIME_EPOCH to 1Matthias Schiffer
Eventually we will have a smarter way to set the timestamp, but for now this is sufficient. We do not use the value 0, as not all tools work correctly with it.
2021-10-18Remove/simplify mkdir() callsMatthias Schiffer
std's DirBuilder can handle concurrent calls just fine, so we don't need to create parent directories in advance.
2021-10-12Delete state dir for unfinished tasks in runner, not in executorMatthias Schiffer
Make use of CAP_DAC_OVERRIDE in the runner namespace.
2021-10-11executor: sort and reformat summary outputMatthias Schiffer
2021-10-11runner: make layer hash output optionalMatthias Schiffer
There is no need to store a layer hash when the task has not touched any files.
2021-10-09Refer to inherited tasks by their layer hashMatthias Schiffer
2021-10-09Add layer hash to task outputMatthias Schiffer
For now, the hash is not actually computed.
2021-10-07Various code improvements suggested by clippyMatthias Schiffer
2021-10-03executor: store start time and duration of tasksMatthias Schiffer
2021-10-02executor: add various toolchain-related variables to the environment by defaultMatthias Schiffer
2021-09-29executor: evalute fetch filename using template engineMatthias Schiffer
2021-09-28Add convenience methods and trait implementations to TaskArgsMatthias Schiffer
2021-09-28executor: print task ref instead of meta ID in summaryMatthias Schiffer
When multiple tasks have the same input hash, they are unified to the same meta info, leading to a confusing summary when the ID from this info is printed instead of the original task ref.
2021-09-26Move defintion of globals into contextMatthias Schiffer
Globals like "destdir" and "sysroot" are now handled like "build". In addition, their value is determined based on the "paths" module.
2021-09-26Pass path with dependencies instead of distinguishing build and host depsMatthias Schiffer
2021-09-26paths: move sysroot to /opt/toolchain/sysrootMatthias Schiffer
Prepare for removing the separate sysroot mount.
2021-09-26executor: fix host dependency error messageMatthias Schiffer
2021-09-25Move get_dependent_outputs() and get_dependent_tasks() to resolveMatthias Schiffer
These functions always need to include runtime depends. As preparation, move them to the resolve module.
2021-09-24context: introduce TaskNotFound errorMatthias Schiffer
2021-09-24context: prepare to make various functions fallibleMatthias Schiffer
2021-09-23Store task arguments as an enumMatthias Schiffer
2021-09-22executor: do not allow overriding base args for nowMatthias Schiffer
2021-09-22Extend TaskRef with alternative Display formatMatthias Schiffer
2021-09-22executor: use JSON for arguments in task labelsMatthias Schiffer
2021-09-22Use same struct for InputHash and to pass task data to the runnerMatthias Schiffer
2021-09-19Switch back to static container environmentMatthias Schiffer
We have moved all variables to task arguments, so only the very basics are left in the container environment.
2021-09-19Use template variables instead of environment, parametrize all examplesMatthias Schiffer
This implements passing of various pieces of information through task arguments, as well as argument inheritance through different kinds of dependencies.
2021-09-19Print task label including arguments instead of only task ID in runnerMatthias Schiffer
2021-09-19Rename "target depends" to "depends"Matthias Schiffer
Internally, the name "host depends" is used to match GNU build/host/target terms.
2021-09-19Add template engine to evaluate task commandsMatthias Schiffer
The field "run" is renamed to "command" in a few places. We only use the evaluated command string for TaskInput now, not the TaskID or arguments.
2021-09-19Add TaskArgs to reference typesMatthias Schiffer
For now the struct is empty, and each task just passes its arguments to its dependencies.
2021-09-19Introduce Context structMatthias Schiffer
TaskRef etc. get a lifetime that is bound to the Context lifetime. This way we can reduce cloning significantly.
2021-09-18Separate definition types and reference typesMatthias Schiffer
We need to distinguish TaskID/Task/TaskRef, OutputDef/OutputRef for parametrized tasks.
2021-09-18executor: use reference for inherit hash in TaskInputMatthias Schiffer
2021-09-18executor: use run string instead of action for TaskInputMatthias Schiffer
2021-09-17executor: print more concise run summaryMatthias Schiffer
2021-09-17Only pass path to runner, not whole Output structureMatthias Schiffer
It seems that ipc-channel can't deal with BTreeSets. Avoid the type by sending only the necessary data to the runner.
2021-09-17executor: include runtime dependenciesMatthias Schiffer