Some errors can get hidden by -v N, see The-OpenROAD-Project/OpenROAD-flow-scripts#2375
This makes the user almost always worse off. The only exception I can think of is someone scripting around Yosys commands, checking for their exit status, and handling failures gracefully (for the few failure modes where that can be done). I've never seen such a Yosys script.
Explain how this is achieved.
Add extra handling to arrange for log_cmd_error never being silenced by the command line -v N option. Similar path for log_error exists already.
If applicable, please suggest to reviewers how they can test the change.
With test.tcl:
yosys -import
hierarchy -top nonexistent
Before
$ ./yosys -v 3 test.tcl
1. Executing HIERARCHY pass (managing design hierarchy).
ERROR: TCL interpreter returned an error: Yosys command produced an error
After
$ ./yosys -v 3 test.tcl
1. Executing HIERARCHY pass (managing design hierarchy).
ERROR: Module `nonexistent' not found!
ERROR: TCL interpreter returned an error: Yosys command produced an error
What are the reasons/motivation for this change?
Some errors can get hidden by
-v N
, see The-OpenROAD-Project/OpenROAD-flow-scripts#2375This makes the user almost always worse off. The only exception I can think of is someone scripting around Yosys commands, checking for their exit status, and handling failures gracefully (for the few failure modes where that can be done). I've never seen such a Yosys script.
Explain how this is achieved.
Add extra handling to arrange for
log_cmd_error
never being silenced by the command line-v N
option. Similar path forlog_error
exists already.If applicable, please suggest to reviewers how they can test the change.
With test.tcl:
Before
After