quil-lang / qvm

The high-performance and featureful Quil simulator.
Other
409 stars 57 forks source link

bad error message for `echo foo.quil | qvm` #62

Open stylewarning opened 5 years ago

stylewarning commented 5 years ago

An error in the wild, someone echoing instead of cating, leads to the following:

$ echo foo.quil | qvm
******************************
* Welcome to the Rigetti QVM *
******************************
Copyright (c) 2016-2019 Rigetti Computing.

(Configured with 8192 MiB of workspace and 8 workers.)

! ! ! Condition raised: Couldn't find match at position 3 within the lexer CL-QUIL::LINE-LEXER.

This is of course sensible in its behavior, but the error message is awful and should be more helpful.

matt-y commented 5 years ago

Hello I am interested in working on this.

stylewarning commented 5 years ago

Hello that would be great! What would a good error message look like?

notmgsk commented 5 years ago

FWIW, the error message has improved since the creation of this issue:

$ echo test.quil | qvm --log-level emerg --quiet
! ! ! Condition raised: At line 1: unexpected input text "." in "test.quil"

It could be clearer however by having QVM report that it is trying to parse the string from stdin, rather than from the file.