-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "tools/flow: check and return errors from task values"
This reverts commit 9ef35eb but keeps the `cmd_undefined` test case and adds a new test case (very similar to the test case for #2517) that illustrates the way that the reverted commit fails. That commit introduced a regression that caused existing tools/flow uses to fail. See https://cuelang.org/issue/2965. A subsequent CL will apply a different fix for #1581. For #2965. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I322ac3b269bc79a541c15001a166160ad9191267 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1185281 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
- Loading branch information
Showing
3 changed files
with
98 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#IgnoreConcrete: true | ||
#InferTasks: true | ||
-- in.cue -- | ||
package x | ||
|
||
root: { | ||
prepare: { | ||
$id: "prepare" | ||
stdout: string | ||
} | ||
env2: { | ||
// Note: the string interpolation here is the only difference | ||
// from issue2517.txtar. It makes the value incomplete | ||
// rather than just non-concrete. | ||
input: "\(prepare.stdout)" | ||
} | ||
run: { | ||
$id: "run" | ||
env: env2 | ||
} | ||
} | ||
-- out/run/errors -- | ||
-- out/run/t0 -- | ||
graph TD | ||
t0("root.prepare [Ready]") | ||
t1("root.run [Waiting]") | ||
t1-->t0 | ||
|
||
-- out/run/t1 -- | ||
graph TD | ||
t0("root.prepare [Terminated]") | ||
t1("root.run [Ready]") | ||
t1-->t0 | ||
|
||
-- out/run/t1/value -- | ||
{ | ||
$id: "prepare" | ||
stdout: "foo" | ||
} | ||
-- out/run/t1/stats -- | ||
Leaks: 0 | ||
Freed: 11 | ||
Reused: 6 | ||
Allocs: 5 | ||
Retain: 0 | ||
|
||
Unifications: 11 | ||
Conjuncts: 16 | ||
Disjuncts: 11 | ||
-- out/run/t2 -- | ||
graph TD | ||
t0("root.prepare [Terminated]") | ||
t1("root.run [Terminated]") | ||
t1-->t0 | ||
|
||
-- out/run/t2/value -- | ||
{ | ||
$id: "run" | ||
stdout: "foo" | ||
env: { | ||
input: "foo" | ||
} | ||
} | ||
-- out/run/t2/stats -- | ||
Leaks: 0 | ||
Freed: 12 | ||
Reused: 12 | ||
Allocs: 0 | ||
Retain: 0 | ||
|
||
Unifications: 12 | ||
Conjuncts: 20 | ||
Disjuncts: 12 | ||
-- out/run/stats/totals -- | ||
Leaks: 0 | ||
Freed: 23 | ||
Reused: 18 | ||
Allocs: 5 | ||
Retain: 0 | ||
|
||
Unifications: 23 | ||
Conjuncts: 36 | ||
Disjuncts: 23 |