Show the dune error instead of Fatal error: exception Invalid_argument("String.sub / Bytes.sub")
- Dominant language
- Reason
- Stars
- 857
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
**esy version: 0.5.8**
**Operating System: Archlinux**
**Issue:**
When you have a unclosed parenthesis in your dune file, running `esy` reports:
`Fatal error: exception Invalid_argument("String.sub / Bytes.sub")` while running `esy build -p project` shows:
```
File "lib/dune", line 9, characters 0-0:
Error: unclosed parenthesis at end of input
```
Which is way more helpful.
Contributor guide
Research direction
Reproduce the failure with the reported esy 0.5.8 setup and an unclosed parenthesis in lib/dune. Compare `esy` with `esy build -p project`, then trace the command entry point that turns the dune diagnostic into `Invalid_argument`. Done means esy reports the useful unclosed-parenthesis error instead of the fatal exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100