Skip to content

Commit

Permalink
cue: remove Merge
Browse files Browse the repository at this point in the history
It has been deprecated and marked as DO NOT USE since April 2021,
which was even before the first tagged release, v0.0.2 in July 2021.
Now that it has been three full years, and the last use in 'cue cmd'
has been ripped out, it's time to remove it.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I4c03a3f9c767d29e62f9496c72ac06b74b7070e7
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193719
Reviewed-by: Paul Jolly <paul@myitcv.io>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
  • Loading branch information
mvdan committed Apr 24, 2024
1 parent 7422d00 commit 1864214
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions cue/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,29 +217,6 @@ func (inst *hiddenInstance) Eval(expr ast.Expr) Value {
return v.Context().BuildExpr(expr, Scope(v), InferBuiltins(true))
}

// DO NOT USE.
//
// Deprecated: do not use.
func Merge(inst ...*Instance) *Instance {
v := &adt.Vertex{}

i := inst[0]
ctx := newContext(i.index)

// TODO: interesting test: use actual unification and then on K8s corpus.

for _, i := range inst {
w := i.Value()
v.AddConjunct(adt.MakeRootConjunct(nil, w.v.ToDataAll(ctx)))
}
v.Finalize(ctx)

p := addInst(i.index, &Instance{
root: v,
})
return p
}

// Build creates a new instance from the build instances, allowing unbound
// identifier to bind to the top-level field in inst. The top-level fields in
// inst take precedence over predeclared identifier and builtin functions.
Expand Down

0 comments on commit 1864214

Please sign in to comment.