Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

YAML 1.2 compliance possibly breaking VCR

オープン
#648 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
c, ruby, yaml

調査の方向性

まず、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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ruby/psych のほかの issue

ruby/psych の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。