carvel-dev / carvel-dev/ytt

Unexpected anchor behaviour when using functions

Open
#481 2 comments 0 reactions 0 assignees View on GitHub
documentation good first issue priority/unprioritized-backlog
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

**What steps did you take:**

Input:
```
#@ def group_alpha():
name: alpha
#@ end
groups: &all_groups
- #@ group_alpha()
foo:
groups: *all_groups
```

Result:
```
groups:
- null
foo:
groups:
- name: alpha
```

Expected:
```
groups:
- alpha
foo:
groups:
- name: alpha
```

Expected according to [limitations](https://carvel.dev/ytt/docs/latest/known-limitations/)
```
groups:
- alpha
foo:
groups:
- null
```

[Interactive](https://carvel.dev/ytt/#gist:https://gist.github.com/groundnuty/863b0410116a67b4232f6cd318d10fde) reproduction from gist.

**Anything else you would like to add:**
Please explain this unexpected behaviour, as it's not consistent with #172 or #186

**Environment:**

- ytt version 0.36.0
- macos 10.14 (18A391)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.