koji-kojiro / cl-repl

A full-featured repl implementation designed to work with Roswell
GNU General Public License v3.0
153 stars 22 forks source link

Enter with no-input enters the debugger and then fails #17

Closed vindarel closed 6 years ago

vindarel commented 6 years ago

Hello,

If we press enter in a void prompt we are brought to the debugger (SB-IMPL::STRING-INPUT-STREAM) and with one more we get a sb-int::STRING-INPUT-STREAM error

[~/bacasable/cl-repl]$ ./cl-repl                                                                       *[master] 
CL-USER> 
Error: end of file on #<SB-IMPL::STRING-INPUT-STREAM {1005626BB3}>
[0]: Try evaluating again.
[1]: Return to top level.
[2]: Edit code.

DEBUG> 

debugger invoked on a END-OF-FILE in thread
#<THREAD "main thread" RUNNING {100560E893}>:
  end of file on #<SB-IMPL::STRING-INPUT-STREAM {1005637633}>

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

(no restarts: If you didn't do this on purpose, please report it as a bug.)

(SB-IMPL::STRING-INCH #<SB-IMPL::STRING-INPUT-STREAM {1005637633}> T 0)
0] 

I looked quickly and couldn't find a place to prevent those.

koji-kojiro commented 6 years ago

Thanks to report. However, I can't reproduce that. It seems to work correctly on my PC. hmm...

koji-kojiro commented 6 years ago

Sorry, I was misunderstanding.
You are right. It seems awful bug. We should have more tests...