Keys starting with capitals are not transformed as described in documentation
まだ誰も着手していません。
評価
調査の方向性
ソースファイルもテストも指定されていません。まず、デコーダーのキー処理実装に対して Livebook reproduction を実行し、その後、atom キー用の既存のテストを見つけてください。keys: :atoms で変換された大文字のキーが String.to_atom/1 の動作と一致し、ID を対象とする回帰テストが含まれていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The issue can be demonstrated by following Livebook (see source for copy):
TOML atoms issue
Mix.install([
{:toml, "~> 0.7.0"}
])
Section
According to the documentation:
You can pass the following options to configure the decoder behavior:
:keys- controls how keys in the document are decoded. Possible values are:
:atoms- converts keys to atoms withString.to_atom/1
So in my opinion, it should be equivalent to keys: &String.to_atom/1
toml_content = """
[foo]
name = "bar"
ID = "baz"
"""
result1 = Toml.decode!(toml_content, keys: :atoms)
%{foo: %{:name => "bar", ID => "baz"}}
Note the map key is ID, which means atom :"Elixir.ID". But when I use String.to_atom/1:
result2 = Toml.decode!(toml_content, keys: &String.to_atom/1)
%{foo: %{name: "bar", ID: "baz"}}
Note ID:, which means the key is atom :"ID". This behaviour is what I would expect after reading the documentation. The results are not equivalent, obviously.
result1 == result2
false
- 主要言語
- Elixir
- スター
- 206
- フォーク
- 33
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bitwalker/toml-elixir のほかの issue
-
mix test fails on OTP 28 / Elixir 1.18 (ssl_verify_fun + deprecated eval_quoted)対応中かも @nshkrdotcom が 321 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bitwalker/toml-elixir#46 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
bitwalker/toml-elixir#39 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 43/100
bitwalker/toml-elixir#38 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
bitwalker/toml-elixir#37 · コメント 1 件 ·
-
When called from distillery as a provider, config isn't actually merged an instead is overrwritten for any app in the TOML config.対応中かも @idyll が 2373 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
bitwalker/toml-elixir#26 · コメント 2 件 · リアクション 2 件 ·
bitwalker/toml-elixir の 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 日以内に返信