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.
internal/core/adt: exclude definitions in data conversion
Definitions incorrectly trigger closedness for sub structures. They also don't belong in data. IMPORTANT: this implies that it is no longer possible to refer to definitions from within tool files. As a workaround we will allow it still for single-instance commands. Fixes #525 Change-Id: I481dd16e7cacb1096f68d446ce1c5349b5cd4531 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7143 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
- Loading branch information
Showing
3 changed files
with
40 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
cue cmd gengithub | ||
|
||
-- x.cue -- | ||
package x | ||
|
||
test: #Workflow & { | ||
} | ||
|
||
#Workflow: { | ||
#: "working-directory": string | ||
} | ||
-- x_tool.cue -- | ||
package x | ||
|
||
import ( | ||
"tool/file" | ||
"encoding/yaml" | ||
) | ||
|
||
command: gengithub: { | ||
write: file.Create & { | ||
filename: "test.yml" | ||
contents: """ | ||
# Generated by ci_tool.cue; do not edit | ||
|
||
\(yaml.Marshal(test)) | ||
""" | ||
} | ||
} |
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