This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that exporter always exports a struct literal, and not an arbitrary expression. TODO: this can be enforced at compile time by changing the type of the Value field to *ast.StructLit. This is a breaking change in the API though. At some point this will be useful, as it will help prevent users of the API to make similar errors. Fixes #473 Change-Id: I26d1590c9b793ad5c82b02f69af47795a4bbd1a4 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6950 Reviewed-by: Paul Jolly <paul@myitcv.org.uk> Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
cue eval --out json x.cue | ||
|
||
-- cue.mod/module.cue -- | ||
module: "mod.com" | ||
-- x.cue -- | ||
package x | ||
|
||
#Guide: { | ||
Terminals: [string]: #Terminal | ||
|
||
Steps: [string]: #Step | ||
|
||
#TerminalName: or([ for k, _ in Terminals {k}]) | ||
|
||
#Step: { | ||
Terminal: #TerminalName | ||
Cmd: string | ||
} | ||
|
||
#Terminal: { | ||
Image: string | ||
} | ||
} | ||
|
||
g: #Guide & { | ||
Terminals: client: { | ||
Image: "golang" | ||
} | ||
|
||
Steps: { | ||
list: { | ||
Terminal: "client" | ||
Cmd: "ls" | ||
} | ||
} | ||
} |
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