-
Notifications
You must be signed in to change notification settings - Fork 462
Closed
ocaml/opam-repository
#29216Labels
Description
Currently, when invalid non-ASCII characters are used in extension version declarations in dune-project files, users get a generic error message:
File "dune-project", line 2, characters 14-14:
(using menhir è)
Error: Invalid dune-project fileThis happens because non-ASCII characters fail at the s-expression parsing level before reaching version validation.
Expected behavior:
The error should be similar to what we show for (lang dune ...) declarations:
Error: Invalid version. Version must be two numbers separated by a dot.
Hint: using menhir 2.1Current behavior:
- ASCII invalid versions: `(using menhir Ali)` - Shows clear error message
- Non-ASCII versions: `(using menhir è)` - Shows generic "Invalid dune-project file"Context:
This issue was identified while implementing PR #12833. The s-expression parser rejects non-ASCII characters in atoms before the version decoder can provide a helpful error message.
Reactions are currently unavailable