Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref function does not resolve recursively eval: when it is referencing an object #95

Closed
dakusui opened this issue Dec 5, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dakusui
Copy link
Owner

dakusui commented Dec 5, 2019

ref function does not resolve recursively eval: when it is referencing an object (?)

Suppose we have

{
  "obj": {
    "c": "eval:string:$(ref $(cur).a)",
    "a": "Howdy"
 }
  "key": "eval:object:$(ref $(cur).obj)"
}

In this situation, since .key.c doesn't appear in the list of attributes to be templated initially created, the node will have a value eval:string:$(..., not Howdy.

Probably we should repeat perform_templating function until all the templating keywords (eval: and template:) go away.

@dakusui dakusui added the bug Something isn't working label Dec 5, 2019
@dakusui dakusui self-assigned this Dec 5, 2019
@dakusui dakusui changed the title ref function does not resolve recursively eval: when it is referncing an object ref function does not resolve recursively eval: when it is referencing an object Dec 5, 2019
@dakusui
Copy link
Owner Author

dakusui commented Dec 10, 2019

Example:

{
  "objectNode": {
    "hello": "eval:string:$(ref .stringNode)"
  },
  "refObjectNode": "eval:object:$(ref .objectNode)",
  "stringNode": "world"
}

This renders to

{
  "objectNode": {
    "hello": "world"
  },
  "refObjectNode": {
    "hello": "eval:string:$(ref .stringNode)"
  },
  "stringNode": "world"
}

While we want to make it converted to

{
  "objectNode": {
    "hello": "world"
  },
  "refObjectNode": {
    "hello": "world"
  },
  "stringNode": "world"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant