`FSharpValue.PreComputeTuplePropertyInfo` reports an out-of-range index for every struct tuple
メンテナーはふだん 4 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 64/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- fsharp
調査の方向性
まず、FSharp.Core のソースとタプルのリフレクションに関するテストで FSharpValue.PreComputeTuplePropertyInfo を探します。struct タプルがどのように処理されるか、また現在の範囲外例外がどのように発生するかを確認します。issue では、動作する代替手段として PreComputeTupleReader と GetTupleField が示されています。struct タプルを使った呼び出しがサポートされるか、ユーザーにこれらの代替手段を案内する、文書化された ArgumentException で失敗すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
FSharpValue.PreComputeTuplePropertyInfo fails for every index of a struct tuple type, and the message says that the index is out of range. That sends the reader to the wrong cause: a struct tuple keeps its items in fields, and the method returns a PropertyInfo.
Repro steps
open Microsoft.FSharp.Reflection
FSharpValue.PreComputeTuplePropertyInfo (typeof<struct (int * string)>, 0)
Expected behavior
Either support for struct tuples, or an ArgumentException that says that a struct tuple has no item properties and names FSharpValue.PreComputeTupleReader and FSharpValue.GetTupleField, which work for it.
Actual behavior
System.ArgumentException: The tuple index '0' was out of range for tuple type 'System.ValueTuple`2[[System.Int32, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. (Parameter 'index')
Known workarounds
FSharpValue.PreComputeTupleReader and FSharpValue.GetTupleField read struct tuples.
Related information
- FSharp.Core 10.1.0.0, .NET SDK 10.0.402 (
dotnet fsi), Windows 11 - #4240 fixed
FSharpValue.MakeTuplefor struct tuples.
- 主要言語
- F#
- スター
- 4.3k
- フォーク
- 881
- 平均マージ
- 4日 16時間
- マージ済み PR(30日)
- 122
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/fsharp のほかの issue
-
Needs-Triage
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 4 日以内に返信
-
Printed quotations show a struct tuple as `NewTuple`対応中かも @T-Gro が 1 日前に担当しました。 オープンBug Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
-
Semantic classification cache for opened documents is never populated (written to the unopened-documents cache)対応中かも @xperiandri が 46 日前に担当しました。 オープンNeeds-Triage
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 4 日以内に返信
-
Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/fsharp#20265 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
Bug Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 4 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
diegosouzapw/OmniRoute#17386 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
QuantumNous/new-api#7930 ·
メンテナーはふだん 1 日以内に返信
-
area/dashboard kind/bug kind/bug-qa QA/dev-automation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vybestack/llxprt-code#3917 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信