google / jsonnet

Jsonnet - The data templating language
http://jsonnet.org
Apache License 2.0
6.92k stars 437 forks source link

Resolve anchors after parsing YAML #1163

Closed ghost closed 1 month ago

ghost commented 1 month ago

rapidyaml seems to choke on trees which contain anchors (or perhaps, strictly, references to them) when returning JSON.

To avoid this aggressively resolve anchors/references when parsing YAML into JSON and then into our own model.

Fixes #1162


Prior to this patch, the test fails as reported in #1162 , with the fix it passes. I'm not sure if there is any perf penalty here or tbh if this is the canonical fix, but it seems to resolve the issue.

I have signed the personal contributor license agreement many years ago.

google-cla[bot] commented 1 month ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

ghost commented 1 month ago

Well i guess the CLA might be an issue; closing.

However, I the author of this work, grant anyone reading it a full license under Apachee 2.0 terms to reproduce it and contribute it to this project for the purposes of resolving the linked issue.