Nexus: New RMG Analyzer fails silently
- Dominant language
- C++
- Stars
- 403
- Forks
- 154
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 82
Description
# Problem
The new `RmgOutData` class from #6194 fails silently whenever a pattern is not properly found, and then only later when the property is accessed is the failure raised as an error.
This is undesirable for a number of reasons, but the primary one being that there are often multiple failure routes, and so there can be several spots in the code that will produce the same failed state.
# Desired Solution
I think that it would be bad to raise an error and crash the analyzer if it fails to parse some text, but I don't think it should silently suppress failures to parse. The ideal alternative in my opinion is for Nexus to use a logger from the `logging` library to record any behavior in the parser that should be noted. For example, if there is an error in the parsing that means that a significant amount of other parts will fail, it should be logged with the `ERROR` level of logging. Other things, like a failure to grab some miscellaneous data should be logged with the `WARNING` level of logging. In the case of a truly catastrophic failure, e.g. an empty file, the code should use `logging.CRITICAL` and probably exit the parser.
Contributor guide
Research direction
Start with the Nexus RmgOutData parser introduced in #6194 and trace each path that produces a failed parse state. Define and record appropriate logging levels for significant, miscellaneous, and catastrophic parsing failures, then verify that failures are no longer silent without unnecessarily crashing on malformed text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100