Completion offers nothing for an array element after a spread
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- ocaml
- 領域
- devtools
調査の方向性
The bug is in traverse_expr in analysis/src/completion_expressions.ml, which handles Pexp_array and dict literals but has no case for the Pexp_spread node. Start by reading the Pexp_array branch to see how element positions are traversed, then add handling so an array spread keeps the expected element type. Done when completion after [...base, ] offers First and Second, matching [First, ], and the untyped File module fallback no longer appears.
索引モデルが issue の本文から書いたものです。
説明
Found by differential semantic drift analysis from b123b7c3 to c10223e8.
What is broken
type kind = First | Second
let base: array<kind> = [First]
let ys: array<kind> = [First, ]
// ^com First, Second
let ys2: array<kind> = [...base, ]
// ^com nothing
At c10223e8, completion at the second position returns no items; at b123b7c3 it returned a single bogus [] item of type 'a (from Primitive_array.spread). [...base, Fi] falls back to untyped completion (offering First and the module File). The expected items are the same as for [First, ].
traverse_expr handles Pexp_array and dict literals, including dict spreads, but has no case for the Pexp_spread node that #8905 introduced for array and list literals with spreads.
Possible cause (speculation only)
Before #8905 a spread literal was a call to Primitive_array.spread, which completion treated as a function argument; the new node falls into the default case.
🤖 Generated with Claude Code
- 主要言語
- OCaml
- スター
- 7.5k
- フォーク
- 484
- 平均マージ
- 17時間 2分
- マージ済み PR(30日)
- 249
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rescript-lang/rescript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rescript-lang/rescript#9182 ·
メンテナーはふだん 1 日以内に返信
-
Issues from differential semantic drift analysis (b123b7c3 to c10223e8)対応中かも @cknitt が 1 日前に担当しました。 オープン
rescript-lang/rescript#9186 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
rescript-lang/rescript#9185 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
rescript-lang/rescript#9184 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
rescript-lang/rescript#9181 ·
メンテナーはふだん 1 日以内に返信
rescript-lang/rescript の issue をすべて見る
似ている issue
-
normalizePath removes the Windows device namespace prefix対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ai-driven-dev/framework#1147 ·
メンテナーはふだん 1 日以内に返信
-
divergence lane:functions
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
cleanup
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
pytorch/tensordict#3456 ·
メンテナーはふだん 1 日以内に返信