Describe the bug
When using a recursive anchor, the extension outputs the following error and linting/validation stops working.
Request textDocument/foldingRange failed.
Message: Request textDocument/foldingRange failed with message: Maximum call stack size exceeded
Code: -32603
YAML:
# Arbitrary schema
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
&root
prop:
sub: *root
The yaml package and Ajv have no problem parsing and applying the recursive anchor.
Output of YAML.parse():
<ref *1> { prop: { sub: [Circular *1] } }
Expected Behavior
Linting and validation should continue working.
Current Behavior
The extension crashes with the error indicated above.
Without recursive anchor, works as intended:

With recursive anchor, does not work:

Steps to Reproduce
- Create a new YAML file
- Paste the provided example content, and indicate an arbitrary schema to try validating the content
- Remove the recursive
*root reference, and notice that validation works as intended
- Add the
*root reference back, and notice that the extension stops working
Environment
Notes
I may be able to open a PR fixing this if that becomes necessary.
If this issue should be under https://github.com/redhat-developer/yaml-language-server please transfer it.
Describe the bug
When using a recursive anchor, the extension outputs the following error and linting/validation stops working.
YAML:
The
yamlpackage and Ajv have no problem parsing and applying the recursive anchor.Output of
YAML.parse():Expected Behavior
Linting and validation should continue working.
Current Behavior
The extension crashes with the error indicated above.
Without recursive anchor, works as intended:

With recursive anchor, does not work:

Steps to Reproduce
*rootreference, and notice that validation works as intended*rootreference back, and notice that the extension stops workingEnvironment
Notes
I may be able to open a PR fixing this if that becomes necessary.
If this issue should be under https://github.com/redhat-developer/yaml-language-server please transfer it.