ajv-validator / ajv-validator/ajv-cli
error: Maximum call stack size exceeded with schemas having ~510 properties or more
- Ngôn ngữ chính
- TypeScript
- Star
- 316
- Fork
- 77
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I recently discovered that bigger generated schemas can easily produce a a `error: Maximum call stack size exceeded`, even when the checks are quite simple.
```
ajv -- validate --strict=false --errors=json -s f/ansible-playbook.json -d /Users/ssbarnea/c/a/schemas/examples/playbooks/run.yml
schema f/ansible-playbook.json is invalid
error: Maximum call stack size exceeded
```
Based on my initial tests 500 properties worked but 1000 generated this error, which is a very low number. My expectation that that I will likely need 10k in the end. I tested with 510 and job only one schema failing instead of both, with 550 both failed. Clearly the moment it starts to fail is just after 500.
I am not sure what is confusing the loader because in the end the entries are very simple.
Here is one file that has ~1000 entries https://sbarnea.com/ss/ansible-playbook.json and is only ~100kb, just removing some of the properties will make it pass.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.