Undefining `by_pk` causes stack overflow in auto_curry
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with the regression introduced by commit 869b46be and the Users#by_pk call in the reproduction; inspect how auto_curry handles an undefined by_pk across repeated container construction. Reproduce the stack overflow with the supplied Ruby script against PostgreSQL, then verify the repeated build, query, disconnect cycle completes successfully.
索引モデルが issue の本文から書いたものです。
説明
Introduced in https://github.com/rom-rb/rom-sql/commit/869b46be
Steps to repro:
require 'rom'
require 'rom-sql'
require 'rom-repository'
module Relations
class Users < ROM::Relation[:sql]
schema(:users, infer: true)
end
end
class UserRepository < ROM::Repository[:users]
def find(uuid)
users.by_pk(uuid).one
end
end
def build_container(rom_base)
config = ROM::Configuration.new(:sql, 'postgres://localhost/rom_test')
config.register_relation(Relations::Users)
ROM.container(config)
end
rom_base = ROM::Configuration.new(:sql, 'postgres://localhost/rom_test')
5.times do
rom = build_container(rom_base)
repo = UserRepository.new(rom)
repo.find(1)
rom.disconnect
puts "\n"
end
- 主要言語
- Ruby
- スター
- 220
- フォーク
- 97
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rom-rb/rom-sql のほかの issue
-
bug help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
bug help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
bug help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
-
bug help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
bug help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
似ている issue
-
account: profile
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
ysb3996-blip/oops#24 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信