BUG: DrRacket REPL corrupted (#%top-interaction: bad syntax) after error in definitions area
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 601
- Forks
- 74
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
If a #lang rhombus file fails to compile (e.g., due to an unbound identifier), the DrRacket REPL enters a broken state. Any subsequent expression typed into the REPL fails with #%top-interaction: bad syntax.
Note: This only happens after an error in the definitions area, not from errors raised within the REPL itself.
Current Workaround: Running a file that compiles successfully resets and fixes the DrRacket REPL.
Steps to Reproduce
Make a file with the following code (deliberately having error) and run it in DrRacket:
#lang rhombus
x
As expected REPL shows error when file is run. But after that, trying to run any valid code in DrRacket REPL also fails with syntax error:
x: unbound identifier in: x
$ def a = 0
. #%top-interaction: bad syntax in: (#%top-interaction . def)
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
Start with the provided #lang rhombus reproducer in DrRacket, comparing the REPL state after a definitions-area compile error with the state after a REPL error. Trace the transition that causes subsequent valid expressions to produce #%top-interaction: bad syntax; done means the REPL accepts those expressions without requiring a successfully compiled file first.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100