cue-lang / docs-and-content

A place to discuss, plan, and track documentation on cuelang.org
5 stars 1 forks source link

docs/howto/cause-workflow-task-to-run-after-another: Causing one workflow task to run after another #124

Open jpluscplusm opened 2 months ago

jpluscplusm commented 2 months ago

In #123 we track documentation of how to use the output of one task inside another task. In that guide we might well mention that referring to an incomplete field in a task causes a dependency to be created, but we should probably include a page that explains both ways of achieving this:

We should explain their differences in both operation and use case.

Title: it could be the title proposed here, or one such as "Create an explicit dependency between two tasks in a workflow command", or similar. Rather than optimising for the 100% most technically accurate title, let's target the unaware user who's simply searching for this functionality: what title would best prompt them to read this doc?

myitcv commented 2 months ago

Just shared the most basic example of this:

package x

import "tool/cli"

command: deps: {
    before: cli.Print & {
        text: "before"
    }
    after: cli.Print & {
        $after: before
        text:   "after"
    }
}