Parser errors should be easier to track down
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3
- Forks
- 0
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 5
Description
You get basically no feedback right now where in the parsing process things went wrong, just what nature of node you're looking for. This is helpful, e.g. I can learn that I'm looking for an erroneous call. Even better would be to see the actual offending code.
One place I ran into this is here:
Where you can get a big leg up just adding {ast.unparse(node)} to the error message.
I don't know where else it crops up, but I imagine the ast.unparse trick will do what I'm hoping for in all cases.
Contributor guide
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 with src/flowrep/parsers/parser_helpers.py around lines 165-169, where the issue identifies a parser error with insufficient context. Trace nearby parsing paths to find whether similar errors omit the offending code, then verify that the resulting messages identify both the expected node type and the relevant source expression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100