Kill all `assert false` in printer
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 10.3k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Description
There are way too many of them, and they give really bad error messages to the user, e.g. #1611.
assert false should really only be used when the condition can't be achieved. Everything else should be Invalid_argument. We look super lazy with our error handling otherwise
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 searching the printer implementation for every assert false occurrence and determine which cases are reachable rather than impossible. Replace reachable failures with Invalid_argument, then verify that printer error messages are improved without changing impossible-state assertions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100