Recent snapshot produces unexpected annotations with empty intervals
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 516
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
Within the last 6 days, I started having an automated test for Racket Mode fail, only on Racket snapshot.
The test is getting surprised by a new syncheck:add-docs-menu for #%datum, arising from 42 in this little program:
#lang racket/base
(define foobar 42)
foobar
Given the time frame, I glanced at the commit history and it looks like this is related to commit 45fb5f5 (and/or the "upstream" commits its message mentions)?
-
I don't know if this is intentional, or, a side-effect you just hadn't noticed yet. Maybe it's not obvious in the DrR UI or caught by its tests?
I'm guessing it's unintentional. A literal
42offering documentation for#%datum, seems... maybe noisy and not helpful.OTOH if in fact intentional, I can adjust some test cases to expect these to appear. Even so, I think there's still a problem...
-
The
syncheck:add-docs-menuvalues forbegandendare both 33. This is unprecedented, in my experience using check-syntax,begandendhave always meant a half-open interval. Never an empty span. (e.g. In the Racket back end, I collect these annotations in an interval-map; these new annotations raise an error I've not seen before.)-
I'm not sure what it means to annotate an empty span for an identifier (unlike say an arrow position).
-
Ideally it seems it should be [33 35) to cover all of the text
42. (Less ideally, [33 34) to cover the first character would probably be OK.)
So I mean, I could force
endto be at least 1+beg, but rather than me paper that over I wanted to see if it made sense to do that within check-syntax. -
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
Reproduce the reported check-syntax behavior with the small Racket program and inspect commit 45fb5f5 plus the upstream commits it mentions. Examine the syncheck:add-docs-menu annotation for #%datum, especially its beg and end values, alongside the Racket Mode automated test. Done means the behavior is resolved or intentionally documented, with the test and annotation interval agreeing on the expected result.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100