Fragile reliance on OCaml version number
To check and select the appropriate compatibility stubs for the CDuce - OCaml interface, ocamliface/dune clumsily tries to extract the OCaml version numbers from the version string. The script tries to accounts for +
in the version number (like 4.12.0+flambda) but failwith e.g. if the version number contains ~
(like 4.14.0~rc2).
At the moment, this results in dune build
failwith with : Failure: int_of_string
.
The script should :
- be more robust w.r.t. various versioning schemes (i.e. be able to parse
x.y.zS
wherex
,y
,z
are integers andS
any string) - never fail but should simply disable the OCaml - CDuce interface if the version number cannot be determined. t