This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-18
Channels
- # announcements (3)
- # babashka (13)
- # beginners (28)
- # biff (12)
- # clj-yaml (13)
- # clojure (13)
- # clojure-europe (2)
- # clojure-norway (11)
- # clr (1)
- # core-typed (3)
- # datahike (1)
- # datascript (5)
- # datomic (12)
- # fulcro (8)
- # graalvm (8)
- # hyperfiddle (20)
- # missionary (8)
- # off-topic (20)
- # pedestal (1)
- # releases (2)
- # shadow-cljs (12)
- # yamlscript (7)
Has anyone ran into this with clj-yaml?
Error: org.snakeyaml.engine.v2.exceptions.YamlEngineException: The incoming YAML document exceeds the limit: 3145728 code points.
I know clj-yam uses snakeyaml, not snakeyaml-engine but same author
I'll try it out myself 🙂
have you tried grepping the clj-yaml repo for that number? that might give you some hints: https://github.com/search?q=repo%3Aclj-commons%2Fclj-yaml%203145728&type=code
https://github.com/search?q=repo%3Asnakeyaml%2Fsnakeyaml+%22The+incoming+YAML+document+exceeds+the+limit%22&type=code https://github.com/search?q=repo%3Asnakeyaml%2Fsnakeyaml+getCodePointLimit&type=code Can't find that number in the code but: https://www.google.com/search?q=codePointLimit+3145728&oq=codePointLimit+3145728 Is interesting. This is using clj-yaml under the hood:
$ ls -lh big.yaml
-rw-r--r-- 1 ingy ingy 8.4M May 18 15:02 big.yaml
$ ys -e 'slurp("big.yaml").yaml/load()'
Error: The incoming YAML document exceeds the limit: 3145728 code points.
$ ys -pe '1024 * 1024 * 3'
3145728
🙂not sure what inspired that limit for snakeyaml
I'm working on integrating a C++ parser (to replace snakeyaml-engine) into yamlscript and was testing on bigger inputs...
Thanks. I missed that. I wouldn't have thought to look in the clojure code since it's a snake error. Makes sense though. Added less than a year ago it seems https://github.com/clj-commons/clj-yaml/commit/ab980163accdaf679090dc5ee93e7858e18768f0 @U5XL4TJ2C++