this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "cue: remove Merge"

This reverts https://cuelang.org/cl/1193719.

We broke `cue cmd ls ./...` in cuelang.org's k8s tutorial.
We will add a regression test and attempt these changes a second time.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie2e5ee2209cb5d2940d82ddf535125c815825faa
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193746
Reviewed-by: Paul Jolly <paul@myitcv.io>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+23
+23
cue/instance.go
··· 217 217 return v.Context().BuildExpr(expr, Scope(v), InferBuiltins(true)) 218 218 } 219 219 220 + // DO NOT USE. 221 + // 222 + // Deprecated: do not use. 223 + func Merge(inst ...*Instance) *Instance { 224 + v := &adt.Vertex{} 225 + 226 + i := inst[0] 227 + ctx := newContext(i.index) 228 + 229 + // TODO: interesting test: use actual unification and then on K8s corpus. 230 + 231 + for _, i := range inst { 232 + w := i.Value() 233 + v.AddConjunct(adt.MakeRootConjunct(nil, w.v.ToDataAll(ctx))) 234 + } 235 + v.Finalize(ctx) 236 + 237 + p := addInst(i.index, &Instance{ 238 + root: v, 239 + }) 240 + return p 241 + } 242 + 220 243 // Build creates a new instance from the build instances, allowing unbound 221 244 // identifier to bind to the top-level field in inst. The top-level fields in 222 245 // inst take precedence over predeclared identifier and builtin functions.