sagax has joined #jruby
_whitelogger has joined #jruby
duc[m] has joined #jruby
<duc[m]> Hello jRuby community
<Davinci[m]> Hi. I am having problems when I load a big yaml file with YAML::load_file. I'm in JRuby version 9.4.3.0 and use param "aliases: true". Any idea?
<Davinci[m]> Using native Ruby 3.1.2 the loading works without problem.
<Davinci[m]> * Hi. I am having problems when I load a big yaml file with YAML::load\_file. I'm in JRuby version 9.4.3.0 and use param "aliases: true". Using native Ruby 3.1.2 the loading works without problem.
<Davinci[m]> Any idea?
<duc[m]> <Davinci[m]> "Hi. I am having problems when..." <- > <@brometeo:matrix.org> Hi. I am having problems when I load a big yaml file with YAML::load\_file. I'm in JRuby version 9.4.3.0 and use param "aliases: true". Using native Ruby 3.1.2 the loading works without problem.
<duc[m]> > Any idea?
<duc[m]> Describe problem more, maybe send some logs, error messages
<duc[m]> >
<Davinci[m]> <duc[m]> "> <@brometeo:matrix.org> Hi. I..." <- It is the classic error: Java::OrgSnakeyamlEngineV2Exceptions::YamlEngineException: The incoming YAML document exceeds the limit: 3145728 code points.
<Davinci[m]> > <@replikvlt:matrix.org> Describe problem more, maybe send some logs, error messages
<Davinci[m]> * It is the classic error: Java::OrgSnakeyamlEngineV2Exceptions::YamlEngineException: The incoming YAML document exceeds the limit: 3145728 code points.
<Davinci[m]> The yml file has a size of 5.2Mb
<headius> duc: hello
<headius> aha yeah
<headius> Davinci: yeah this is one I'm not sure we have a simple way to fix
<headius> Davinci: if this limit is due to the max size of an array on JVM, 2GB, any fix would have to handle streaming YAML for parsing
<headius> if it's some internal limit in SnakeYAML there might be a workaround or possible fix
<headius> Davinci: ah it looks like this is related to a SnakeYAML configuration we exposed to Ruby recently: https://github.com/jruby/jruby/issues/7543
<headius> So it's possible to tell the Psych wrapper around SnakeYAML to increase its codepoint limit if you can call the code_point_limit= method as shown here: https://github.com/jruby/jruby/issues/7543#issuecomment-1422343210
enebo has joined #jruby
enebo has left #jruby [#jruby]
sagax has quit [Read error: Connection reset by peer]
sagax has joined #jruby