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:
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)
If a
#lang rhombusfile 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:
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: