-
Notifications
You must be signed in to change notification settings - Fork 327
Closed
Labels
Description
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: *rootThe 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
*rootreference, and notice that validation works as intended - Add the
*rootreference back, and notice that the extension stops working
Environment
- Windows
- Mac
- Linux
- other (please specify)
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.
Reactions are currently unavailable