mojo: Use "promise chain" to drive main build flow.

Authored by mpyne on Sep 19 2018, 6:25 PM.

Description

mojo: Use "promise chain" to drive main build flow.

This changes lets me setup the dependency graph for the whole process and then
just hit "Go" and let the Mojolicious event loop figure out what to do next.
This drastically simplifies a good chunk of the code as well.

It even seems to work OK, though I'm still only testing in the easy scenarios.
In particular, I think having a job fail anywhere breaks the entire promise
chain. This is probably addressable with intelligent use of Mojo::Promise->race
but I may end up instead having to avoid the use of rejecting promises for all
but the most serious errors and instead use pass error codes using resolved
promises instead to at least keep the chain going.

Details

Committed
mpyneSep 19 2018, 11:19 PM
Parents
R365:558dd31d44a8: mojo: Add helper class to create "promise chains".
Branches
Unknown
Tags
Unknown