-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/third_party/yaml: drop support for non-standard scalars
CUE uses a mix of YAML packages. The older one in third_party/yaml recognizes boolean scalars such as `y` and `n` that the newer package does not quote, so round-tripping fails when those unquoted strings get converted to booleans. Fix this (pending replacement of the whole package) by removing support for those scalars. Fixes cuelang/cue#512 Change-Id: I3958664a24a3191f0d3004b259ae26d2db86d0b5 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7161 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
- Loading branch information
Showing
4 changed files
with
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cue export -o bools.yaml bools.cue | ||
cue import -o bools2.cue bools.yaml | ||
cmp bools.cue bools2.cue | ||
|
||
-- bools.cue -- | ||
x: [ | ||
"n", | ||
"N", | ||
"no", | ||
"No", | ||
"NO", | ||
"y", | ||
"Y", | ||
"yes", | ||
"Yes", | ||
"YES", | ||
"off", | ||
"Off", | ||
"OFF", | ||
"on", | ||
"On", | ||
"ON", | ||
] |
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 |
---|---|---|
|
@@ -31,7 +31,7 @@ translations: | |
--- | ||
translations: | ||
hello: | ||
lang: no | ||
lang: false | ||
text: Hallo | ||
--- | ||
translations: | ||
|
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