Completion offers nothing for an array element after a spread
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ocaml
- Lĩnh vực
- devtools
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- OCaml
- Star
- 7.5k
- Fork
- 484
- Merge trung bình
- 17 giờ 2 phút
- Pull request đã merge (30 ngày)
- 249
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rescript-lang/rescript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rescript-lang/rescript#9182 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Issues from differential semantic drift analysis (b123b7c3 to c10223e8)Có thể đã có người làm @cknitt đã nhận hôm nay. Đang mở
rescript-lang/rescript#9186 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
rescript-lang/rescript#9185 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
rescript-lang/rescript#9184 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
rescript-lang/rescript#9181 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rescript-lang/rescript
Issue tương tự
-
check-relative-paths reports links to existing directories as missingCó thể đã có người làm @reidbaker-agent đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google/skills_lint.dart#202 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
Phone app shows Unknown for a remote machine whose key changedCó thể đã có người làm @janicduplessis đã nhận hôm nay. Đang mởarea: mobile priority: P3 type: bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
appandflow/stim#5006 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
irahardianto/pi-mcp-extension#253 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A-linter
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
oxc-project/oxc#28783 ·
Maintainer thường phản hồi trong vòng 1 ngày