serializing Grape::Entity::Exposure::NestingExposure::OutputBuilder fails in 0.7.0
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
Start by reproducing the failure with Marshal.dump around the Rails.cache.fetch example, then inspect how the entity options hash carries opts[:env]. Use the listed unmarshalable environment keys to narrow the cause; done means the entity can be serialized for caching without the TypeError while retaining the expected output.
索引モデルが issue の本文から書いたものです。
説明
When attempting to serialize a Grape::Entity::Exposure::NestingExposure::OutputBuilder in 0.7.0 using Marshal.dump (for caching), we encounter an error like TypeError: can't dump IO.
Rails.cache.fetch(key) do
present(entity_items).as_json # this used to just give a Hash which could be marshaled properly
end
This error seems to stem from the options hash in the entity. When it contains the request environment (in the :env key), there are objects that cannot be marshaled.
In my testing (in development mode) the following keys contain unmarshalable items.
opts[:env].reject {|k,v| Marshal.dump(v) rescue false }.keys
["rack.errors",
"puma.socket",
"rack.hijack",
"puma.config",
"action_dispatch.logger",
"action_dispatch.backtrace_cleaner",
"action_dispatch.routes",
"action_dispatch.remote_ip",
"rack.session",
"rack.session.options",
"warden",
"grape.routing_args",
"api.endpoint"]
- 主要言語
- Ruby
- スター
- 730
- フォーク
- 154
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby-grape/grape-entity のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ruby-grape/grape-entity#386 · コメント 7 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ruby-grape/grape-entity#382 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ruby-grape/grape-entity#380 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
ruby-grape/grape-entity#373 · コメント 2 件 ·
-
Truncate Formatterオープン
難易度 1/5 1〜3時間 初心者へのやさしさ 45/100
ruby-grape/grape-entity#372 ·
ruby-grape/grape-entity の issue をすべて見る
似ている issue
-
Bug: Assistant replies lose the space before numbers ("Oct7", "as of10-22-2026") with OpenAI modelsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
we-promise/sure#4441 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
lugassawan/swe-workbench#823 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Transcription spans omit the requested temperature対応中かも @yorzi が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
crmne/ruby_llm#1276 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Admin user page looks up a Tag for every instance-scoped role (`Role#resource_name`)対応中かも @pkfrank が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
forem/forem#24083 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
rubyjs/mini_racer#449 ·