Contracts not enforced by scribble/manual
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 250
- Forks
- 102
- Avg merge
- 11d 11h
- Merged PRs (30d)
- 1
Description
The following buggy program gives an error message blaming scribble/private/manual-class. Instead, scribble/manual (or perhaps wherever box-splice comes from) should enforce contracts and blame the buggy module, which would also generate a more comprehensible error message.
#lang scribble/manual
@definterface[example<%> ()]{
@defmethod[(example) any]{
@#'"A syntax object is not a pre-flow"
}}
Error message:
decode-flow: contract violation
expected: pre-flow?
given: (box-splice (list (nested-flow (style 'vertical-inset '()) (list (table (style 'boxed (list (attributes '((class . "RBoxed"))))) (list (list (nested-flow (style #f '()) (list (nested-flow (style "RBackgroundLabel" (list 'decorative 'command (alt-t...
in: an element of
the 1st argument of
(-> (listof pre-flow?) (listof block?))
contract from:
<pkgs>/scribble-lib/scribble/decode.rkt
blaming: <pkgs>/scribble-lib/scribble/private/manual-class.rkt
(assuming the contract is correct)
at: <pkgs>/scribble-lib/scribble/decode.rkt:71.2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the supplied #lang scribble/manual reproducer and inspect scribble/decode.rkt at 71.2, then trace the contract boundary into scribble/private/manual-class.rkt and the box-splice path. Done means the same program reports the buggy module rather than manual-class, with a more comprehensible contract error.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100