From bca58a4f2c9474f690dab4ac0e67942cc6a2fb2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 4 Sep 2025 13:36:39 +0100 Subject: [PATCH] all: clean up #skip-v2 txtar lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit evalv2 is gone now, so none of these skips does anything useful anymore. Move issue2229 to a better place as its header said. Signed-off-by: Daniel Martí Change-Id: I6396082203560d1144247abc8fa287bbecc510a8 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1222030 TryBot-Result: CUEcueckoo Reviewed-by: Marcel van Lohuizen Unity-Result: CUE porcuepine --- cue/testdata/cycle/comprehension.txtar | 146 +++++++++++++++++--- cue/testdata/cycle/issue2229.txtar | 77 ----------- cue/testdata/cycle/issue2526.txtar | 1 - cue/testdata/cycle/issue3570.txtar | 1 - cue/testdata/cycle/patterns.txtar | 2 - encoding/openapi/testdata/oneof-funcs.txtar | 2 +- tools/trim/testdata/25.txtar | 1 - tools/trim/testdata/42.txtar | 1 - tools/trim/testdata/47.txtar | 1 - tools/trim/testdata/48.txtar | 1 - tools/trim/testdata/57.txtar | 1 - 11 files changed, 129 insertions(+), 105 deletions(-) delete mode 100644 cue/testdata/cycle/issue2229.txtar diff --git a/cue/testdata/cycle/comprehension.txtar b/cue/testdata/cycle/comprehension.txtar index 6f7ac33f3..c867342c0 100644 --- a/cue/testdata/cycle/comprehension.txtar +++ b/cue/testdata/cycle/comprehension.txtar @@ -404,28 +404,46 @@ issue3941: full: { } } } +-- issue2229.cue -- +// Caused evalv2 to stack overflow. +issue2229: full_ok: X={ + build: bool | *true + test: bool | *true + + make: [ for k, v in X if (v & true) != _|_ { k } ] +} +issue2229: reduced_fail: X={ + x: true + y: [ for _, v in X if v & true { _ } ] +} -- out/evalalpha/stats -- Leaks: 2 -Freed: 900 -Reused: 849 -Allocs: 53 +Freed: 966 +Reused: 914 +Allocs: 54 Retain: 0 -Unifications: 551 -Conjuncts: 1605 -Disjuncts: 182 +Unifications: 583 +Conjuncts: 1712 +Disjuncts: 210 Notifications: 14 -NumCloseIDs: 703 +NumCloseIDs: 730 -ConjunctInfos: 1114 +ConjunctInfos: 1168 MaxConjunctInfos: 10 MaxReqSets: 12 MaxRedirect: 1 -- out/evalalpha -- Errors: +conflicting values true and [for _, v in X if (v & true) {_}] (mismatched types bool and list): + ./issue2229.cue:10:5 + ./issue2229.cue:10:24 + ./issue2229.cue:10:28 selfReferential.insertionError.A: adding field foo3 not allowed as field set was already referenced: ./in.cue:122:14 +structural cycle: + ./issue2229.cue:10:24 Result: (_|_){ @@ -1024,6 +1042,30 @@ Result: } } } + issue2229: (_|_){ + // [eval] + full_ok: (struct){ + build: (bool){ |(*(bool){ true }, (bool){ bool }) } + test: (bool){ |(*(bool){ true }, (bool){ bool }) } + make: (#list){ + 0: (string){ "build" } + 1: (string){ "test" } + } + } + reduced_fail: (_|_){ + // [eval] + x: (bool){ true } + y: (_|_){ + // [eval] conflicting values true and [for _, v in X if (v & true) {_}] (mismatched types bool and list): + // ./issue2229.cue:10:5 + // ./issue2229.cue:10:24 + // ./issue2229.cue:10:28 + // structural cycle: + // ./issue2229.cue:10:24 + 0: (_){ _ } + } + } + } issue3903: (struct){ reduced: (struct){ s1: (#struct){ @@ -1119,7 +1161,20 @@ Result: diff old new --- old +++ new -@@ -55,12 +55,12 @@ +@@ -1,6 +1,12 @@ + Errors: ++conflicting values true and [for _, v in X if (v & true) {_}] (mismatched types bool and list): ++ ./issue2229.cue:10:5 ++ ./issue2229.cue:10:24 ++ ./issue2229.cue:10:28 + selfReferential.insertionError.A: adding field foo3 not allowed as field set was already referenced: + ./in.cue:122:14 ++structural cycle: ++ ./issue2229.cue:10:24 + + Result: + (_|_){ +@@ -55,12 +61,12 @@ } } _e: (#struct){ @@ -1138,7 +1193,7 @@ diff old new } } e: (#struct){ -@@ -529,25 +529,25 @@ +@@ -529,25 +535,25 @@ // [incomplete] issue2310.original.#subs.0: error in call to strings.Replace: non-concrete value string: // ./in.cue:318:46 // ./in.cue:318:12 @@ -1169,6 +1224,37 @@ diff old new } } } +@@ -599,6 +605,30 @@ + } + } + } ++ issue2229: (_|_){ ++ // [eval] ++ full_ok: (struct){ ++ build: (bool){ |(*(bool){ true }, (bool){ bool }) } ++ test: (bool){ |(*(bool){ true }, (bool){ bool }) } ++ make: (#list){ ++ 0: (string){ "build" } ++ 1: (string){ "test" } ++ } ++ } ++ reduced_fail: (_|_){ ++ // [eval] ++ x: (bool){ true } ++ y: (_|_){ ++ // [eval] conflicting values true and [for _, v in X if (v & true) {_}] (mismatched types bool and list): ++ // ./issue2229.cue:10:5 ++ // ./issue2229.cue:10:24 ++ // ./issue2229.cue:10:28 ++ // structural cycle: ++ // ./issue2229.cue:10:24 ++ 0: (_){ _ } ++ } ++ } ++ } + issue3903: (struct){ + reduced: (struct){ + s1: (#struct){ -- diff/-out/evalalpha/stats<==>+out/eval/stats -- diff old new --- old @@ -1188,19 +1274,19 @@ diff old new - -NumCloseIDs: 16 +Leaks: 2 -+Freed: 900 -+Reused: 849 -+Allocs: 53 ++Freed: 966 ++Reused: 914 ++Allocs: 54 +Retain: 0 + -+Unifications: 551 -+Conjuncts: 1605 -+Disjuncts: 182 ++Unifications: 583 ++Conjuncts: 1712 ++Disjuncts: 210 +Notifications: 14 + -+NumCloseIDs: 703 ++NumCloseIDs: 730 + -+ConjunctInfos: 1114 ++ConjunctInfos: 1168 +MaxConjunctInfos: 10 +MaxReqSets: 12 +MaxRedirect: 1 @@ -2472,6 +2558,30 @@ Result: } } } +--- issue2229.cue +{ + issue2229: { + full_ok: { + build: (bool|*true) + test: (bool|*true) + make: [ + for k, v in 〈2〉 if ((〈0;v〉 & true) != _|_(explicit error (_|_ literal) in source)) { + 〈1;k〉 + }, + ] + } + } + issue2229: { + reduced_fail: { + x: true + y: [ + for _, v in 〈2〉 if (〈0;v〉 & true) { + _ + }, + ] + } + } +} --- issue3903.cue { issue3903: { diff --git a/cue/testdata/cycle/issue2229.txtar b/cue/testdata/cycle/issue2229.txtar deleted file mode 100644 index 09ec75d73..000000000 --- a/cue/testdata/cycle/issue2229.txtar +++ /dev/null @@ -1,77 +0,0 @@ -// Caused evalv2 to stack overflow; -// move to comprehension.txtar once evalv2 is removed so we can avoid the skip line. -#skip-v2 --- in.cue -- -issue2229: full_ok: X={ - build: bool | *true - test: bool | *true - - make: [ for k, v in X if (v & true) != _|_ { k } ] -} -issue2229: reduced_fail: X={ - x: true - y: [ for _, v in X if v & true { _ } ] -} - --- out/compile -- ---- in.cue -{ - issue2229: { - full_ok: { - build: (bool|*true) - test: (bool|*true) - make: [ - for k, v in 〈2〉 if ((〈0;v〉 & true) != _|_(explicit error (_|_ literal) in source)) { - 〈1;k〉 - }, - ] - } - } - issue2229: { - reduced_fail: { - x: true - y: [ - for _, v in 〈2〉 if (〈0;v〉 & true) { - _ - }, - ] - } - } -} --- out/evalalpha -- -Errors: -conflicting values true and [for _, v in X if (v & true) {_}] (mismatched types bool and list): - ./in.cue:9:5 - ./in.cue:9:24 - ./in.cue:9:28 -structural cycle: - ./in.cue:9:24 - -Result: -(_|_){ - // [eval] - issue2229: (_|_){ - // [eval] - full_ok: (struct){ - build: (bool){ |(*(bool){ true }, (bool){ bool }) } - test: (bool){ |(*(bool){ true }, (bool){ bool }) } - make: (#list){ - 0: (string){ "build" } - 1: (string){ "test" } - } - } - reduced_fail: (_|_){ - // [eval] - x: (bool){ true } - y: (_|_){ - // [eval] conflicting values true and [for _, v in X if (v & true) {_}] (mismatched types bool and list): - // ./in.cue:9:5 - // ./in.cue:9:24 - // ./in.cue:9:28 - // structural cycle: - // ./in.cue:9:24 - 0: (_){ _ } - } - } - } -} diff --git a/cue/testdata/cycle/issue2526.txtar b/cue/testdata/cycle/issue2526.txtar index f5afe915f..0b1fccde6 100644 --- a/cue/testdata/cycle/issue2526.txtar +++ b/cue/testdata/cycle/issue2526.txtar @@ -1,5 +1,4 @@ // This code caused a hang on evalv2. -#skip-v2 -- in.cue -- x x: { diff --git a/cue/testdata/cycle/issue3570.txtar b/cue/testdata/cycle/issue3570.txtar index 23dbe8563..43726780d 100644 --- a/cue/testdata/cycle/issue3570.txtar +++ b/cue/testdata/cycle/issue3570.txtar @@ -1,5 +1,4 @@ // This code caused a panic on evalv2. -#skip-v2 -- in.cue -- foo: foo: 25 | 44 foo diff --git a/cue/testdata/cycle/patterns.txtar b/cue/testdata/cycle/patterns.txtar index e31de8d87..eebcf2a7d 100644 --- a/cue/testdata/cycle/patterns.txtar +++ b/cue/testdata/cycle/patterns.txtar @@ -1,5 +1,3 @@ -// Excluded from V2, which no longer passes. -#skip-v2 // Lots of cycle-reference goodness. -- in.cue -- diff --git a/encoding/openapi/testdata/oneof-funcs.txtar b/encoding/openapi/testdata/oneof-funcs.txtar index 8ddd6e6cb..d470adbf3 100644 --- a/encoding/openapi/testdata/oneof-funcs.txtar +++ b/encoding/openapi/testdata/oneof-funcs.txtar @@ -577,4 +577,4 @@ $version: "v1alpha1" } } } -} \ No newline at end of file +} diff --git a/tools/trim/testdata/25.txtar b/tools/trim/testdata/25.txtar index fed0b3d93..97b2b8352 100644 --- a/tools/trim/testdata/25.txtar +++ b/tools/trim/testdata/25.txtar @@ -10,7 +10,6 @@ required, and so line 2 is redundant. Contrast with 57. -#skip-v2 -- a.cue -- if x == 5 { x: 5 diff --git a/tools/trim/testdata/42.txtar b/tools/trim/testdata/42.txtar index 5e51140d3..d12cccd3d 100644 --- a/tools/trim/testdata/42.txtar +++ b/tools/trim/testdata/42.txtar @@ -5,7 +5,6 @@ would be possible to remove line 4. But we can't because that would make line 5 an error - the use of the X_Platform field. So I think this is the best we can do. -#skip-v2 -- a.cue -- #ClusterResource: X_Platform: string #NamespacedResource: { diff --git a/tools/trim/testdata/47.txtar b/tools/trim/testdata/47.txtar index 05e4d4ba8..28a009172 100644 --- a/tools/trim/testdata/47.txtar +++ b/tools/trim/testdata/47.txtar @@ -2,7 +2,6 @@ We can do simplifications due to comprehensions! The conjuncts from lines 3 and 6 tie with those from 9, but the conjuncts from line 9 must win, because within line 9 there are no redundancies. -#skip-v2 -- a.cue -- s: { x: { diff --git a/tools/trim/testdata/48.txtar b/tools/trim/testdata/48.txtar index 0547cef93..422a7c552 100644 --- a/tools/trim/testdata/48.txtar +++ b/tools/trim/testdata/48.txtar @@ -1,7 +1,6 @@ Variant of 47 where the comprehension makes use of the value of the key-value pair. -#skip-v2 -- a.cue -- d: port: 8080 s: { diff --git a/tools/trim/testdata/57.txtar b/tools/trim/testdata/57.txtar index c3e8f2c6a..20bd5fa45 100644 --- a/tools/trim/testdata/57.txtar +++ b/tools/trim/testdata/57.txtar @@ -28,7 +28,6 @@ Having chosen the winner for x, we then chose the winner for y between lines 4 and 7. This is much simpler - we have a tie of 1-1 for the seenCounts, and so we just pick line 4 because 4 < 7. -#skip-v2 -- a.cue -- if x == 5 { x: 5 -- 2.51.2