Skip to content

Commit

Permalink
cue: remove the hidden Value.Split method
Browse files Browse the repository at this point in the history
It has been deprecated in favor of Value.Expr since 2019.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: If267eaca67a93a1bdd39718176e5ec132dec1041
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202286
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
  • Loading branch information
mvdan committed Oct 10, 2024
1 parent 80ddde3 commit 0dd7f69
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions cue/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1037,26 +1037,6 @@ func (v Value) Doc() []*ast.CommentGroup {
return export.ExtractDoc(v.v)
}

// Split returns a list of values from which v originated such that
// the unification of all these values equals v and for all returned values.
// It will also split unchecked unifications (embeddings), so unifying the
// split values may fail if actually unified.
// Source returns a non-nil value.
//
// Deprecated: use [Value.Expr].
func (v hiddenValue) Split() []Value {
if v.v == nil {
return nil
}
a := []Value{}
v.v.VisitLeafConjuncts(func(x adt.Conjunct) bool {
env, expr := x.EnvExpr()
a = append(a, remakeValue(v, env, expr))
return true
})
return a
}

// Source returns the original node for this value. The return value may not
// be an [ast.Expr]. For instance, a struct kind may be represented by a
// struct literal, a field comprehension, or a file. It returns nil for
Expand Down

0 comments on commit 0dd7f69

Please sign in to comment.