YAML 1.2 compliance possibly breaking VCR
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 28/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 領域
- devtools, testing-qa
調査の方向性
まず、VCR fixture の block scalar header と、WebMock が認識しない URI fixture を使ってパースの失敗を再現します。リンクされている Psych と JRuby の pull request および issue を参考にしながら、同じケースを YAML 1.1 と YAML 1.2 で比較します。完了条件は、挙動が説明され、焦点を絞った回帰テストでカバーされていることです。
索引モデルが 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分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 が 26 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
eurosky-social/eu-haul#32 ·
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
benbalter/jekyll-relative-links#137 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
rubys/roundhouse#444 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
sclorg/s2i-ruby-container#656 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信