Skip to content

Commit b0b6049

Browse files
committed
internal/cuedebug: turn openinline off by default
openinline makes evalv3 mimic evalv2's behavior in some ways in terms of closedness, allowing some third party projects to continue working on evalv3 even if they were relying on buggy closedness behavior on evalv2. However, other projects and examples break because of openinline too, which is especially puzzling for new users coming to CUE and trying to use evalv3 for new projects while trying to follow the CUE spec. Especially now that we have a new flat dynamic closedness mechanism, closedness in evalv3 seems to behave much more like evalv2's even with openinline=0, so the downside of disabling openinline by default is greatly reduced. Fixes #3688. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Ifc3d445196fd2eb36eca5f1a3accb9d91218a6ce Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1209503 Reviewed-by: Marcel van Lohuizen <[email protected]> Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 112c279 commit b0b6049

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

cmd/cue/cmd/testdata/script/issue3819.txtar

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ cmp stdout stdout.golden
55

66
# -- evalv3 --
77
env CUE_EXPERIMENT=evalv3=1
8-
env CUE_DEBUG=openinline=0
98
exec cue eval -e output main.cue
109
cmp stdout stdout.golden
1110

@@ -57,4 +56,4 @@ level2: #Level2 & {
5756
structure: {
5857
f: "a"
5958
}
60-
settings: {}
59+
settings: {}

cmd/cue/cmd/testdata/script/vet_matchn.txtar

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exec cue vet -c schema.cue data.json
44

55
# With the new evaluator.
66
env CUE_EXPERIMENT=evalv3=1
7-
env CUE_DEBUG=openinline=0
87
exec cue vet -c schema.cue data.json
98

109
-- data.json --
@@ -29,4 +28,4 @@ package githubactions
2928
"uses"?: string
3029
"run"?: string
3130
})
32-
}
31+
}

internal/cuedebug/cuedebug.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ type Config struct {
6464
//
6565
// For the second issue, to open up the entire result of an inline struct,
6666
// such an expression could be written as `openAll(expr).out`.
67-
OpenInline bool `envflag:"default:true"`
67+
OpenInline bool
6868

6969
// OpenDef disables the check for closedness of definitions.
7070
OpenDef bool

0 commit comments

Comments
 (0)