`TypeError: arg.includes is not a function` when trying to get tests running with OCaml 5.2.0
polytypic opened this issue · comments
I'm trying to get tests running on 5.2.0 on Windows, see ocaml-multicore/picos#104.
I was pointed to ocaml/opam-repository#25861 and to use the source of the PR https://github.com/dra27/opam-repository.git#windows-initial
as the opam repository.
It seems that doing so makes setup-ocaml
run into an error:
D:\a\_actions\ocaml\setup-ocaml\v2\dist\index.cjs:19591
if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) {
^
TypeError: arg.includes is not a function
at ToolRunner._uvQuoteCmdArg (D:\a\_actions\ocaml\setup-ocaml\v2\dist\index.cjs:19591:18)
at ToolRunner._windowsQuoteCmdArg (D:\a\_actions\ocaml\setup-ocaml\v2\dist\index.cjs:19532:23)
at ToolRunner._getCommandString (D:\a\_actions\ocaml\setup-ocaml\v2\dist\index.cjs:19474:31)
at ToolRunner.<anonymous> (D:\a\_actions\ocaml\setup-ocaml\v2\dist\index.cjs:19662:51)
at Generator.next (<anonymous>)
at D:\a\_actions\ocaml\setup-ocaml\v2\dist\index.cjs:19428:71
at new Promise (<anonymous>)
at __awaiter (D:\a\_actions\ocaml\setup-ocaml\v2\dist\index.cjs:19410:14)
at D:\a\_actions\ocaml\setup-ocaml\v2\dist\index.cjs:19654:52
at new Promise (<anonymous>)
Node.js v20.8.1
I don't know what causes this. This could be a bug in setup-ocaml
(at least not checking/validating/parsing some inputs/data properly into type safe data structures) or something wrong with the #windows-initial
repository/branch.
I believe that was my bad: https://github.com/ocaml-multicore/picos/pull/104/files#r1601442809
although it feels to me like a better error message could be added