[Python] Connect Python's standard error stream to C++ errors
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
This came up and was worked around in #1981. From @teqdruid's comment on that PR:
The right way to deal with this is by providing a mechanism in MLIR to redirect its stderr to an arbitrary llvm:raw_ostream so it can be redirected to python... I don't know if that's possible, but I would imagine it is.
We should look into this so Python and C++ can share an error stream, and remove the hack from #1981 to manually flush Python's sys.stderr from the tests.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the workaround in #1981 and @teqdruid's linked comment about redirecting MLIR errors to an arbitrary llvm::raw_ostream. Investigate how Python and C++ could share an error stream, then verify that the manual Python sys.stderr flush hack can be removed from the tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100