YAML 1.2 compliance possibly breaking VCR
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 28/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 领域
- devtools, testing-qa
调研方向
首先,使用 VCR fixture 的 block scalar header,以及 WebMock 无法识别的 URI fixture,重现解析失败。在 YAML 1.1 和 YAML 1.2 下比较相同的案例,并结合链接的 Psych 和 JRuby pull request 与 issue 了解背景。完成的标准是解释清楚该行为,并通过一个聚焦的回归测试覆盖它。
由索引模型根据 Issue 内容生成。
描述
This is an issue branching off from https://github.com/ruby/psych/pull/613#issuecomment-1709239243.
We're experimenting migrating a Rails app we have to latest JRuby (9.4.3.0), an app that has some large VCR fixtures.
Initially we hit the the code point limit issue that https://github.com/ruby/psych/pull/613 lets us bypass, but after increasing the code point limit that the above PR let's us configure, we came across parsing errors like this one:
the leading empty lines contain more spaces (8) than the first non-empty line. while scanning a block scalar at line 32385 column 5
# ./config/initializers/psych.rb:6:in `parse_stream'
(the initializer monkey patch is a hack while we can't get https://github.com/ruby/psych/pull/647 to work on our end)
In this case, the fixture had several empty newlines in a multiline field, using a block scalar header like field: |+2.
After deleting that field from the yaml fixture altogether as part of troubleshooting, all fixtures get parsed and we're able to run Rspec specs again using VCR. But some of the specs that were previously passing now fail, with Webmock not recognizing the URIs for the requests recorded in the fixtures.
We suspect this might be happening due to YAML 1.2 not liking how the URIs are escaped, and we're still validating this. @headius asked me to create this issue so it can be tracked together with https://github.com/ruby/psych/issues/642, which might also be related to YAML 1.2 compliance (see also https://github.com/jruby/jruby/pull/7600#issuecomment-1712771885)
I'll update this issue as we find out more about it, ideally with a test comparing the same use case with YAML 1.1 and YAML 1.2.
- 主要语言
- Ruby
- 星标
- 597
- 派生
- 223
- 平均合并
- 6 小时 8 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/psych 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
Documentation
难度 1/5 1 小时以内 新手友好度 72/100
-
Psych.dump raises Encoding::CompatibilityError for UTF-16/UTF-32 strings可能已有人在做 @Halvanhelv 于 27 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 52/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
slovensko-digital/autogram-portal#392 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
voxpupuli/puppet-quadlets#122 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
TheOdinProject/curriculum#31452 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100