[Python] export_split_verilog can fail "silently"
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
The following code
```python
import circt
with circt.ir.Context() as ctx:
circt.register_dialects(ctx)
module = circt.ir.Module.parse("")
circt.export_split_verilog(module, "/bogusdirectory/")
```
prints
```
loc("-":0:0): error: cannot open output file '/bogusdirectory/filelist.f': No such file or directory
```
to the terminal, but doesn't result in a python-level exception. It would be good to be able to catch these at the python-level, ideally with an `MLIRError` like in other error cases.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Python reproduction using circt.export_split_verilog and inspect how output-file errors are surfaced. Confirm that passing /bogusdirectory/ raises a Python-level MLIRError rather than only printing the diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100