Skip to content

Commit

Permalink
release v1.7.0-beta-7
Browse files Browse the repository at this point in the history
  • Loading branch information
mandelsoft committed Feb 24, 2025
2 parents 1572b69 + fa7d37e commit c5d636e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
# Raise pull requests for version updates
# to pip against the `develop` branch
target-branch: "dev"
21 changes: 13 additions & 8 deletions flow/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ func (e *DefaultEnvironment) FindInScopes(nodescope *Scope, path []string) (yaml
if len(path) > 0 {
scope := nodescope
for scope != nil {
if scope.local == nil {
break
}
val := scope.local[path[0]]
if val != nil {
return yaml.FindR(true, val, e.GetFeatures(), path[1:]...)
Expand All @@ -216,8 +219,8 @@ func (e *DefaultEnvironment) FindReference(path []string) (yaml.Node, bool) {
}
return yaml.FindR(true, node(outer.GetRootBinding()), e.GetFeatures(), path[1:]...)
}
//fmt.Printf("FIND %s: %s\n", strings.Join(path,"."), e)
//fmt.Printf("FOUND %s: %v\n", strings.Join(path,"."), keys(nodescope))
// fmt.Printf("FIND %s: %s\n", strings.Join(path,"."), e)
// fmt.Printf("FOUND %s: %v\n", strings.Join(path,"."), keys(nodescope))
if path[0] == yaml.DOCNODE && nodescope != nil {
return e.FindInScopes(nodescope, path[1:])
}
Expand All @@ -227,7 +230,7 @@ func (e *DefaultEnvironment) FindReference(path []string) (yaml.Node, bool) {
return nil, false
}

//fmt.Printf("RESOLVE: %s: %s\n",path[0], dynaml.ExpressionType(root.Value()))
// fmt.Printf("RESOLVE: %s: %s\n",path[0], dynaml.ExpressionType(root.Value()))
if len(path) > 1 && path[0] == yaml.SELF {
resolver := root.Resolver()
return resolver.FindReference(path[1:])
Expand Down Expand Up @@ -333,11 +336,11 @@ func (e *DefaultEnvironment) Flow(source yaml.Node, shouldOverride bool) (yaml.N

next = Cleanup(next, updateBinding(next, env))
b := reflect.DeepEqual(result, next)
//b,r:=yaml.Equals(result, next,[]string{})
// b,r:=yaml.Equals(result, next,[]string{})
if b {
break
}
//fmt.Printf("****** found diff: %s\n", r)
// fmt.Printf("****** found diff: %s\n", r)
result = next
}
debug.Debug("@@@ Done\n")
Expand Down Expand Up @@ -425,8 +428,10 @@ func updateBinding(root yaml.Node, binding dynaml.Binding) CleanupFunction {
ref, ok := yaml.FindR(true, root, binding.GetFeatures(), scope.path...)
if ok {
debug.Debug("found %#v\n", ref.Value())
m := ref.Value().(map[string]yaml.Node)
scope.local = m
scope.local = nil
if m, ok := ref.Value().(map[string]yaml.Node); ok {
scope.local = m
}
}
} else {
break
Expand Down Expand Up @@ -459,7 +464,7 @@ func resolveSymbol(env *DefaultEnvironment, name string, scope *Scope) (yaml.Nod
}
for scope != nil {
if nodescope == nil && scope.path != nil && scope.local != nil {
//fmt.Printf("SCOPE NODE: <%s> %v %v\n", strings.Join(scope.path,"."), keys(scope.local), keys(scope.nodescope))
// fmt.Printf("SCOPE NODE: <%s> %v %v\n", strings.Join(scope.path,"."), keys(scope.local), keys(scope.nodescope))
nodescope = scope
}
val := scope.local[name]
Expand Down
2 changes: 1 addition & 1 deletion flow/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package flow

var VERSION = "v1.7.0-beta-6"
var VERSION = "v1.7.0-beta-7"

0 comments on commit c5d636e

Please sign in to comment.