racket/unit behavior "bleeds through" to different file
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 516
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
I just found a fun little bug that appears to go back to at least racket v7.5. It appears that under some circumstances, opening a file not written in the racket/unit language can trigger a warning about missing imports, along with a clearly bogus highlight.
Steps to reproduce:
- delete your proferences. On MacOS Catalina, go to ~/Library/Preferences, delete org.racket-lang.*
- Open DrRacket.
- use flower-l, flower-r to choose "The Racket Language".
- Enter this program:
#lang scheme/signature
- Run.
5a) Save the new file to /tmp/zz.rkt. - Open a fresh tab.
- open the stepper/private/view-controller.rkt file (easiest using cmd-shift-o).
- Find the "import" clause on line 37, comment it out. (See error at bottom.)
- Save the file.
- Open the file "xml-sig.rkt" in the same directory.
- The interactions window should now show the error "#%module-begin: missing an `import' clause in: (#%module-begin)", and the red highlight should highlight part of scheme/signature. (See screenshot.) This state seems clearly wrong to me because the scheme/signature language should not require an import clause, and DrRacket should never highlight just part of an identifier.
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 issue in DrRacket using the provided preference-reset and file-opening steps, starting with stepper/private/view-controller.rkt and then xml-sig.rkt. Inspect the interaction-window error and red highlight after commenting out the import clause. Done means opening xml-sig.rkt no longer inherits the racket/unit behavior, reports a missing import for scheme/signature, or highlights only part of the identifier.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100