Scribble examples fail to use `+` correctly
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- documentation
Hướng nghiên cứu
Tái hiện ví dụ Scribble với scribble/examples và macro demo, sau đó kiểm tra scribble-lib/scribble/racket.rkt quanh dòng 1272 cùng cách nó sử dụng syntax-span. So sánh các dạng #%provide được quote và syntax-quote, rồi xác định tại sao phép kết hợp tạo ra #f; hoàn thành khi ví dụ được báo cáo không còn gây ra lỗi vi phạm contract của +.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm on 8.10 [cs], the latest Debian, and am running my code using racket-mode. I have a #lang scribble/manual document that depends on scribble/examples. I'll start with the error.
; +: contract violation
; expected: number?
; given: #f
; Context (plain; to see better errortrace context, re-run with C-u prefix):
; /home/sage/.racket/share/pkgs/scribble-lib/scribble/racket.rkt:1272:26 loop
; /home/sage/.racket/share/pkgs/scribble-lib/scribble/racket.rkt:1272:26 loop
; /home/sage/.racket/share/pkgs/scribble-lib/scribble/racket.rkt:1168:0 do-syntax-ize
; /home/sage/.racket/share/pkgs/scribble-lib/scribble/racket.rkt:1272:26 loop
; /home/sage/.racket/share/pkgs/scribble-lib/scribble/racket.rkt:1272:26 loop
[...]
This @-expression from my code that raises the error. Simpler examples do not reproduce, so let's go with this for now. It appears that the (struct term:ksub term (body) #:transparent) instance fails in this exact composition, where term is just (struct term () #:transparent). I'm omitting other structure definitions to keep this at least somewhat brief.
@demo[
(define (ksub-example . xs)
(with-syntax ([(x ...) xs])
(term:ksub-parse
#'(module #%kernel '#%kernel
(#%module-begin
(#%require '#%kernel
(for-syntax '#%kernel)
(prefix : '#%kernel)
(for-syntax (prefix : '#%kernel)))
x ...)))))
(ksub-example '(#%provide (all-from '#%kernel)))
]
I use this demo macro. Let #:eval be hypothetical.
(define-syntax-rule (demo forms ...)
(examples #:eval (example-evaluator) forms ...))
If you change '(#%provide (all-from '#%kernel))) to #'(#%provide (all-from '#%kernel))), the error goes away. Since scribble-lib/scribble/racket.rkt:1272:26 makes heavy use of syntax-span, I suspect that location information disappears in some nontrivial compositions of quoted code in syntax templates.
- Ngôn ngữ chính
- Racket
- Star
- 250
- Fork
- 102
- Merge trung bình
- 11 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 racket/scribble
-
In source strcut*-doc does not convert to defstruct* properly when #:constructor-name is usedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của racket/scribble
Issue tương tự
-
docs good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
soma-intelligence/open-health-sync#59 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-task risk:low
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
guyellis/http-status-check#512 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
gradio-app/gradio#13964 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: recipes bug good first issue priority: low size: XS
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
cubrid-lab/cubrid-cookbook-python#315 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(ko): replace the mistranslated term for redaction in the Korean docsCó thể đã có người làm @KeuqS đã nhận hôm nay. Đang mởdocumentation good first issue priority: low size: XS
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
cubrid-lab/cubrid-mcp-server#290 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày