Skip to content

Commit

Permalink
Merge branch version/0-47-0-RC1 to adopt changes from PR #3530
Browse files Browse the repository at this point in the history
  • Loading branch information
as-builds committed Oct 8, 2024
2 parents a02cd55 + cdaf2ae commit 3479068
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions pkg/buildscript/unmarshal_buildexpression.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

"github.com/ActiveState/cli/internal/errs"
"github.com/ActiveState/cli/internal/logging"
"github.com/ActiveState/cli/internal/multilog"
"github.com/ActiveState/cli/internal/rtutils/ptr"
"github.com/ActiveState/cli/internal/sliceutils"
)
Expand Down Expand Up @@ -128,12 +127,6 @@ const (

func unmarshalAssignments(path []string, m map[string]interface{}) ([]*Assignment, error) {
path = append(path, ctxAssignments)
defer func() {
_, _, err := sliceutils.Pop(path)
if err != nil {
multilog.Error("Could not pop context: %v", err)
}
}()

assignments := []*Assignment{}
for key, valueInterface := range m {
Expand All @@ -160,12 +153,6 @@ func unmarshalAssignments(path []string, m map[string]interface{}) ([]*Assignmen

func unmarshalValue(path []string, valueInterface interface{}) (*Value, error) {
path = append(path, ctxValue)
defer func() {
_, _, err := sliceutils.Pop(path)
if err != nil {
multilog.Error("Could not pop context: %v", err)
}
}()

value := &Value{}

Expand Down Expand Up @@ -236,25 +223,13 @@ func unmarshalValue(path []string, valueInterface interface{}) (*Value, error) {

func isAp(path []string, value map[string]interface{}) bool {
path = append(path, ctxIsAp)
defer func() {
_, _, err := sliceutils.Pop(path)
if err != nil {
multilog.Error("Could not pop context: %v", err)
}
}()

_, hasIn := value[inKey]
return !hasIn || sliceutils.Contains(path, ctxAssignments)
}

func unmarshalFuncCall(path []string, m map[string]interface{}) (*FuncCall, error) {
path = append(path, ctxFuncCall)
defer func() {
_, _, err := sliceutils.Pop(path)
if err != nil {
multilog.Error("Could not pop context: %v", err)
}
}()

// m is a mapping of function name to arguments. There should only be one
// set of arguments. Since the arguments are key-value pairs, it should be
Expand Down Expand Up @@ -317,12 +292,6 @@ func unmarshalFuncCall(path []string, m map[string]interface{}) (*FuncCall, erro

func unmarshalIn(path []string, inValue interface{}) (*Value, error) {
path = append(path, ctxIn)
defer func() {
_, _, err := sliceutils.Pop(path)
if err != nil {
multilog.Error("Could not pop context: %v", err)
}
}()

in := &Value{}

Expand Down

0 comments on commit 3479068

Please sign in to comment.