ocaml / setup-ocaml

GitHub Action for the OCaml programming language

Home Page:https://ocaml.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`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.

commented

although it feels to me like a better error message could be added