`default: []` not working in umbrella release
まだ誰も着手していません。
評価
調査の方向性
Issue に示されている to_list/1 関数から始め、mix release でマージされたスキーマを再現しながら、Enum.filter の処理を調べてください。結果のスキーマが明示的に設定された default: [] を保持していることを確認し、そのケースを対象とするリグレッションテストを追加するか実行してください。
索引モデルが issue の本文から書いたものです。
説明
Version: 2.5.2
I have umbrella release with multiple *.schema.exs files. When I define mapping key:
[
mappings: [
"message_broker.publishing": [
commented: false,
hidden: true,
datatype: [list: :binary],
default: [],
required: false,
env_var: "MESSAGE_BROKER_PUBLISHING_EVENTS"
]
then the resulting, merged schema file, after mix release contains:
[
mappings: [
"message_broker.publishing": [
commented: false,
datatype: [
list: :binary
],
env_var: "MESSAGE_BROKER_PUBLISHING_EVENTS",
hidden: false
]
I investigated the case and found out that this code might be the cause of the problem:
defp to_list(%Conform.Schema.Mapping{name: name} = mapping) do
props = mapping
|> Map.to_list
|> Keyword.delete(:__struct__)
|> Keyword.delete(:name)
|> Keyword.delete(:persist)
|> Enum.filter(fn
{_, ignore} when ignore in [nil, "", []] -> false
_ -> true
end)
{String.to_atom(name), props}
end
Precisely - the part with Enum.filter call.
- 主要言語
- Elixir
- スター
- 379
- フォーク
- 59
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bitwalker/conform のほかの issue
-
undeprecate conformオープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
bitwalker/conform の issue をすべて見る
似ている issue
-
Heavy legs 1.12–1.17: compiler corpus goldens not regenerated for #4770対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
intellij-elixir/intellij-elixir#4782 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
hexlet-codebattle/codebattle#2376 ·
-
level 2 wocs
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
phravins/QuantumBilling#51 ·
-
fix(ocr): compile the Tesseract-free pipeline with Tokio runtime対応中かも @Goldziher が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
carverauto/serviceradar#6898 ·
メンテナーはふだん 1 日以内に返信