Maximilian Gaß
Maximilian Gaß
testscript that is less clear but not dependent on a specific hash: ``` exec cue version env CUE_EXPERIMENT=evalv3=0 exec cue export --out=text -e app.objects.ConfigMap.app.metadata.name cp stdout export-def exec cue export...
bisected to f8defbb0ddc57b3c895f571ff7d77ed2b8e6ea69
I can only reproduce it if _both_ evalv3 and toposort are enabled.
The problem arises from the json.Marshal call - the fields in the JSON do not have the same order in the different runs. This can be seen clearly when changing...
First stab at a workaround: ``` _hasher: { fields: [string]: string l: list.SortStrings([for k, v in fields {"\(strconv.Quote(k))=\(strconv.Quote(v))"}]) s: strings.Join(l, ",") hash: hex.Encode(sha256.Sum256(s)[0:5]) } ``` However, I just realized the...
@mvdan On further thought, I think that the very same struct in the same CUE run should always serialize in the same way. The problem isn’t that it might change...
Apologies for the length of this post, but I wanted to be as clear as possible. ## Assumptions I want to first explain my mental model of CUE evaluation. This...
> Unfortunately that's what's happening here. If you add a four: { data } then you'll see that reverts to lexicographical too - the fact that data has been added...
@cuematthew Can you also comment on my description about my mental model of CUE? Am I just on the wrong track there?
@cuematthew But why is only one of the outputs in the comprehension different?