opened
bgandon
username_0
### Problem

As I understands it, the behavior of the CLI v4.0.1 is now properly conforming to the YAML specification: YAML anchors must be declared before being used by their related aliases.

Ref: [3.3.1. Well-Formed Streams and Identified Aliases](http://yaml.org/spec/1.2/spec.html#id2767852): _Successful loading also requires that each alias shall refer to a previous node identified by the anchor._

The problem here is that people like me might spend time to understand why the new CLI v4.0.1 is behaving differently compared to v3.0.1.

### Request

Could we have this change be documented in the [v4.0.1 release notes](https://github.com/cloudfoundry/bosh-cli/releases/tag/v4.0.1) please?

### Demo

Here is the example YAML file `plop.yml`:
```yaml
plip: *plop
plop: &plop plop
```

Here is the result with BOSH CLI 3.0.1
```
$ ./bosh-cli-3.0.1-darwin-amd64 int plop.yml 
plip: plop
plop: plop

Succeeded
```

And with version 4.0.1, this doesn't work anymore:
```
$ ./bosh-cli-4.0.1-darwin-amd64 int plop.yml 
yaml: unknown anchor 'plop' referenced

Exit code 1
```
Undocumented change in CLI v4.0.1: YAML anchors must be declared before their referring aliases
issue
created
dpb587-pivotal
username_1
Thanks! The spec reference and cases to reproduce were particularly helpful. I can see others running into this as well, so I have added a short item about this to the [release notes](https://github.com/cloudfoundry/bosh-cli/releases/tag/v4.0.1).
comment
closed
dpb587-pivotal
username_1
issue