diff --git a/cmd/cue/cmd/testdata/script/get_go_types.txtar b/cmd/cue/cmd/testdata/script/get_go_types.txtar index cb8fe97f003..cac6b3dcbc5 100644 --- a/cmd/cue/cmd/testdata/script/get_go_types.txtar +++ b/cmd/cue/cmd/testdata/script/get_go_types.txtar @@ -266,12 +266,12 @@ import ( Slice1: [...int] @go(,[]int) Slice2: [...] @go(,[]interface{}) Slice3?: null | [...] @go(,*[]json.Unmarshaler) - Array1: 5 * [int] @go(,[5]int) - Array2: 5 * [_] @go(,[5]interface{}) + Array1: 5 * [int] @go(,[5]int) + Array2: 5 * [_] @go(,[5]interface{}) Array3?: null | 5*[_] @go(,*[5]json.Marshaler) - Array4: bytes @go(,[5]byte) - Intf: #Interface @protobuf(2,varint,name=intf) - Intf2: _ @go(,interface{}) + Array4: bytes @go(,[5]byte) + Intf: #Interface @protobuf(2,varint,name=intf) + Intf2: _ @go(,interface{}) Intf3: { Interface: #Interface } @go(,struct{Interface}) diff --git a/cue/format/node.go b/cue/format/node.go index 3407e1e7b71..de7a5250cb1 100644 --- a/cue/format/node.go +++ b/cue/format/node.go @@ -431,6 +431,16 @@ func (f *formatter) nextNeedsFormfeed(n ast.Expr) bool { return strings.IndexByte(x.Value, '\n') >= 0 case *ast.ListLit: return true + case *ast.UnaryExpr: + return f.nextNeedsFormfeed(x.X) + case *ast.BinaryExpr: + return f.nextNeedsFormfeed(x.X) || f.nextNeedsFormfeed(x.Y) + case *ast.CallExpr: + for _, arg := range x.Args { + if f.nextNeedsFormfeed(arg) { + return true + } + } } return false } diff --git a/cue/format/testdata/expressions.golden b/cue/format/testdata/expressions.golden index 900e0f45a93..faf8c72890f 100644 --- a/cue/format/testdata/expressions.golden +++ b/cue/format/testdata/expressions.golden @@ -1,5 +1,7 @@ package expressions +import "list" + { a: 1 // comment aaa: 22 // comment @@ -235,4 +237,20 @@ package expressions "contains tabs": 123 @jsonschema(foo="contains tabs") + + j: cueckoo: _ | [ + 1, + + 2, + ] + k: cueckoo: *[ + 1, + + 2, + ] + l: cueckoo: list.Concat([ + 1, + + 2, + ]) } diff --git a/cue/format/testdata/expressions.input b/cue/format/testdata/expressions.input index 9d47bfce757..06de4e6bec2 100644 --- a/cue/format/testdata/expressions.input +++ b/cue/format/testdata/expressions.input @@ -1,11 +1,13 @@ package expressions +import "list" + { a: 1 // comment aaa: 22 // comment "": 3 - + b: 3 c: b: a: 4 @@ -171,7 +173,7 @@ package expressions "\(k)":v } } - + e: { for k, v in someObject if k > "a" {"\(k)":v} } e: { for k, v in someObject if k > "a" { "\(k)":v }} @@ -232,4 +234,20 @@ package expressions "contains tabs": 123 @jsonschema(foo="contains tabs") + + j: cueckoo: _ | [ + 1, + + 2, + ] + k: cueckoo: *[ + 1, + + 2, + ] + l: cueckoo: list.Concat([ + 1, + + 2, + ]) } diff --git a/encoding/jsonschema/testdata/list.txtar b/encoding/jsonschema/testdata/list.txtar index c48c8624693..e2695bfb168 100644 --- a/encoding/jsonschema/testdata/list.txtar +++ b/encoding/jsonschema/testdata/list.txtar @@ -40,6 +40,6 @@ import "list" foo?: [...string] tuple?: [string, int, 2] -has?: list.Contains(3) +has?: list.Contains(3) size?: list.UniqueItems() & list.MaxItems(9) & [_, _, _, ...] additional?: [int, int, ...string] diff --git a/encoding/jsonschema/testdata/type.txtar b/encoding/jsonschema/testdata/type.txtar index b2be8f7d1d9..52d660560c5 100644 --- a/encoding/jsonschema/testdata/type.txtar +++ b/encoding/jsonschema/testdata/type.txtar @@ -32,7 +32,7 @@ -- out.cue -- // Main schema intString?: null | bool | int | string | [...] -object?: { +object?: { ... } | *{ foo: "bar" diff --git a/internal/core/export/testdata/main/adt.txtar b/internal/core/export/testdata/main/adt.txtar index b8922c51927..23c96e259b2 100644 --- a/internal/core/export/testdata/main/adt.txtar +++ b/internal/core/export/testdata/main/adt.txtar @@ -44,7 +44,7 @@ l5: [1, 3] & { } #foo: int -l6: [1, #foo] & { +l6: [1, #foo] & { [1, 3] #foo: int @@ -180,7 +180,7 @@ l5: [1, 3] & { #foo: int } #foo: int -l6: [1, #foo] & { +l6: [1, #foo] & { [1, 3] #foo: int } @@ -197,7 +197,7 @@ e5: e1 + e2 - e3 e6: !t e7: !t || !false e8?: !false -m1: { +m1: { [string]: int & >=0 } & { { diff --git a/internal/filetypes/types.go b/internal/filetypes/types.go index 1be8b67d526..5eb7307b139 100644 --- a/internal/filetypes/types.go +++ b/internal/filetypes/types.go @@ -44,5 +44,5 @@ func cuegenMake(name string, x interface{}) cue.Value { return v } -// Data size: 1706 bytes. -var cuegenInstanceData = []byte("\x01\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\xc4X\xddo\xe4\xb6\x11\x97|W\xa0R\xd3>\xe6\xad\xc0\x9c\xae\bR\xe3*#\x1f\xe8\xc3\x02\u01a1\xe8\xdd\x15\xf7\xd2\x14E\xfa\x14\x04\v\xae4\xdae#\x91*I%6\xe2E\xdb4\xed\x9f\x1d\x17CR\xa2\xa8\x95\xed3\x90\xa2~\xf1\xee\xfc8\u00d9\xe1|\xee\xcfo\xff}\x96\x9e\xdd\xfe'Io\xff\x91$\xbf\xfd\xfb\x934}\x8f\vm\x98\xa8\xf0\x153\x8c\xc8\xe9\x93\xf4\u97e54\xe9Y\x92>\xfd\x133\x87\xf4\xbd$\xfd\xc9\x1b\u07a2No\xbfO\x92\u45f7\xff:K\xd3_|\xf1e5`\xd9\xf0\xd6s~\x9f\xa4\xb7\xdf%\u0247\xb7\xff|\x92\xa6?\r\xf4\xef\x92\xf4,}\xfaG\xd6!\tzj\x89y\x92$?\xbc\xff+R$M\xcf\xd243\xd7=\xea\xb2\x1a0\xfd\xe1\xfd\x9f\xf5\xac\xfa\x8a\xed\x11v\x03o\xeb<\xbf\xb8\x80\xdf\x01\xdd\x0f\x95T\nu/E\xad\xc1H`\xf0\a\xe9\x0e\x95\x04\x97\xf9s\xfa\xb7\x81o\xf3\x8c\xae\x17\xac\xc3\r\xf8?m\x14\x17\xfb\xdf~\xf4\x80\xd7)\x9f\x83\u03cfy&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e6\xbfV\xac\x1a\xb0\xea\x97I\xafc\x1eO\xd5S\x8f\x1c\x93 X\x10:dX~\x16\xd9\xe2\x92\x04n\xc6w\x9b/\f\xa3\x1e\xf3=!\b\x0f\xed3vn\xa4\x06\xa5\xa1\x93\x1cw\xe4U}\xa6\x83\xa1\u7b1e\v:\xcc[\xcd\x03G\x8d\xec\xee\xbb;\x1c\x9c\xb5\xf4E\x8e\xbd\xd3\x18\x10I\xbfc&\x98\xbd\xc0\xd2\x16j\xf4\xf7\x89\x99\xf7\xec5)\xa1\xe5-\x94?1\xf4\x98\xc7}\xe2\x11\xb5\xda.S\xae\t\u01b7,\xbb\u069d\x0e\xbc\xb7\x7f\xbd3\u05ea\xb3\x96\xd1t\u0313\xe4\xbf\x01\x00\x00\xff\xff\x9d6Q(\xb3\x16\x00\x00") +// Data size: 1703 bytes. +var cuegenInstanceData = []byte("\x01\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\xc4X\u074b\xe4\xc6\x11\x97\xf6.\x105N\x1e\ry\b\xd4\xe9\xc08\xcbE\x8b?\xc8\xc3\xc0r\x84\xdc]\xb8\x978\x04\xe7\u0258\xa1G*\xcdt,u+\xdd-{\x17\xef\x90\xc4q\xf2g{Cu\xb7\u0512F\xbb{\v\x0e\u0797\x9d\xa9_WuUu}\xce/n\xffs\x96\x9e\xdd\xfe7Io\xff\x99$\xbf\xfb\u01d34}OHc\xb9,\xf1\x15\xb7\x9c\xc8\xe9\x93\xf4\xe9_\x94\xb2\xe9Y\x92>\xfd3\xb7\x87\xf4\xbd$\xfd\xd9\x1b\u0460Io\xbfO\x92\xe4\u05f7\xff>K\xd3_~\xf1e\xd9cQ\x8b&p~\x9f\xa4\xb7\xdf%\u0247\xb7\xffz\x92\xa6?\x8f\xf4\xef\x92\xf4,}\xfa'\xde\"\tz\xea\x88,I\x92\x1f\xde\xff\x15)\x92\xa6gi\x9a\xd9\xeb\x0eMQ\xf6\x98\xfe\xf0~\xd2\xf1\xf2+\xbeG\x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11\xf6\x05\xb8\x1a\xd1\xf2\xeb\xc5I\xe0\u0509M\xa9\xc5\xce\xeb\xe7#\xf8\x05|s\x10\xe5\x01\x845\xd8\u052esrI\xac\xa5\x92_\xa3\xb6\xbe\xe5r\xf8\xc3__\a\x8e\x82-f\xc2q\xccs\x93\xe04h\x03\xbdv#\xe9\x98^\xcb\xe9,\xaf\x95\xf2!\xec\xa7K/!\xf7\xb7\xe5\xe1\r\xe8\x81|J\x95\xaami&k\x84DO\xb6\xea4\x99\bpi\xe4\xc5\xf8\f\xf6\xd2G\u0254\xb7{\u037b\xc3\fu\x14\x0fV|?\x83*\xbe\x1f\x00\xcb\x17\x88\r\x02]\x91\xf8\x96M\v\x8e\xab7\x0e$+O\xd0`z\x80\x9bU\xbc\xf1\a(\xafNp\x97\x96\x0ev\x11\x7f\x82\xfb\xb4q\a\u01b489\x14\xf3\x8b\x0e\xba\f\xe9v4\x06\xbb\xf1\x1c\x85=\xa0&G\x0f\t\x10r\x04\x06\x11/@\xcdp\x96u\xbb\r\x9c\xcfo\xf1\x7f\xf9\x90^9;\x9d#r\xba\x1fn`\x8d\xf1\xd9\xe5\xfd\xac\x8e\x1c\xac\\50\x1f\x1f\xcc\xe9\x11\x1f\u034b=\xe1\xf1\xe4;\xb9\xf6'n\f\x06\xd2\xe2p\x97q\xd9\x18\x99Y\xd6pw\u035e\x9c\x1eZ!\xb1\xfe(R\x87\xd5+\u0225\xe9\xcc\xe3'\xecnp[\xb9p6H\x85\xe8\x9cf\u04c9\xa0x\xe0]\u0129\x0e%\xef\xc4\x1d\xb2\x02\xfa\x0e\x82|}p]y\xdc\xe4Bw\xa6\xaa\u031b\u0183\x05\xbc\xb5P)4 \x95\x05!\u02e6\xaf\xd0/\x92J\xb7\xf0\xf6U\xc1\xdc9\xa7\x90[cia\xbf\x1cw\u0671~9\xed\xa9;o\u05ea\v\x8cZ\x06W\xc0\r\xe4n\xe4q\x9f\x86\xea\xb2\u0630\x96S\xd8|O[\x8e7\xf3\xadp\x89\xce\xf7\xc3\x0fg\xf0o\xe0\x83%\x85e\x8b\xedq)o\xbeG.\xd1\xf9\xf6\xb8@\x8fT\xe7\xe50\xa2N'\xa7\x13\x7f\x05\x1f\x9d\u0737nU\x94\x7fR\xc0\xe3\x03x_\x93\u05e9p\xfb\xff.w\x17\xdb:\xe9|\xe2\xf3u_\u07eb\xcd\u008f\xeb\xfe[\xf7[\xb4g\xd6sL\xe1l\x98\xd8\xf6\xec2\x86\xd0\xf0\xcb\xc1\x94y\u0697h_\xd8/\xfd\xf2\xec2\xb4\xb1\xb9\xb6\x83Z\xb3\x9f*F\xbb\xa6?Q\xac\x1a\xb0\xea\x97Q\xaf#\x9b\x8f\xd2c\x8f\x1c\x92 Z\x10;d\xdcx\x16\xd9\xe2\x93\x04n\x86w\x9bn\t\x83\x1e\xd3\xe5 \n\x8f\xeds\xee\u0719\x1a\x94\x86^\xf2\xbc#\xaf\xea3\x1e\x8c=g\xf5\\\xd4a\xdaj\x1e8jU{\xdf\xdd\xf1\u0925/r\xec\x9d\u0180\x99\xf4;f\x82\xc9\v,m\xa1F\x7f\x9f\x98i\xcf^\x93\x12[\xdeB\xf9\x13C\x8fl\xde'\x1eQ\xab\xdd\x06\xe5\x9b\xe0\xfc\x96eW\xbb\u04c1\xf7\xf6\xafw\xe6Zu\xd62\x9a\x8e,I\xfe\x17\x00\x00\xff\xffj\xd7\xe3\u00e8\x16\x00\x00") diff --git a/pkg/list/testdata/list.txtar b/pkg/list/testdata/list.txtar index 006f9662aef..9dc959c090e 100644 --- a/pkg/list/testdata/list.txtar +++ b/pkg/list/testdata/list.txtar @@ -168,7 +168,7 @@ unique: { // Issue #2099 minItems: { incomplete1: [...] & list.MinItems(1) - fail1: _|_ // minItems.fail1: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1) (and 1 more errors) + fail1: _|_ // minItems.fail1: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1) (and 1 more errors) ok1: [0, ...] ok2: [0] } diff --git a/pkg/struct/testdata/struct.txtar b/pkg/struct/testdata/struct.txtar index 1d89c22fe90..2e19d2f4b2b 100644 --- a/pkg/struct/testdata/struct.txtar +++ b/pkg/struct/testdata/struct.txtar @@ -36,7 +36,7 @@ import "struct" minFields: { incomplete1: {} & struct.MinFields(1) - fail1: _|_ // minFields.fail1: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1) + fail1: _|_ // minFields.fail1: invalid value {} (does not satisfy struct.MinFields(1)): len(fields) < MinFields(1) (0 < 1) ok1: { a: 1 } diff --git a/pkg/tool/exec/pkg.go b/pkg/tool/exec/pkg.go index 962e77a04dc..2e8ae477e60 100644 --- a/pkg/tool/exec/pkg.go +++ b/pkg/tool/exec/pkg.go @@ -56,8 +56,8 @@ var p = &pkg.Package{ Native: []*pkg.Builtin{}, CUE: `{ Run: { - $id: *"tool/exec.Run" | "exec" - cmd: string | [string, ...string] + $id: *"tool/exec.Run" | "exec" + cmd: string | [string, ...string] dir?: string env: { [string]: string | [...=~"="]