ocaml / setup-ocaml

GitHub Action for the OCaml programming language
https://ocaml.org/
MIT License
199 stars 39 forks source link

Stuck when pinning non-existent package #902

Open sim642 opened 1 hour ago

sim642 commented 1 hour ago

I typo-ed an opam pin and on Linux runners it seemed to cause the setup-ocaml step to get stuck for over 2 hours:

/opt/hostedtoolcache/opam/2.3.0/x86_64/opam pin --no-action add goblint.dev .
  [goblint.dev] synchronised (git+file:///home/runner/work/analyzer/analyzer#HEAD)
  The following additional pinnings are required by goblint.dev:
    - oblint-cil.2.0.5 at git+https://github.com/goblint/cil.git#c79208b21ea61d7b72eae29a18c1ddeda4795dfd
    - camlidl.1.12 at git+https://github.com/xavierleroy/camlidl.git#1c1e87e3f56c2c6b3226dd0af3510ef414b462d0
    - apron.v0.9.15 at git+https://github.com/antoinemine/apron.git#418a217c7a70dae3f422678f3aaba38ae374d91a
  Pin and install them? [y/n] y
  Package oblint-cil does not exist, create as a NEW package? [y/n] y
  [oblint-cil.2.0.5] synchronised (no changes)
  [NOTE] No package definition found for oblint-cil.2.0.5: please complete the template
  2004h7h25lReading... ]Read 21 lines ]

  opam-version: "2.0"
  version: "2.0.5"
  synopsis: ""
  maintainer: "runner@fv-az1778-888"
  authors: "runner@fv-az1778-888"
  license: ""
  homepage: ""
  bug-reports: ""
  depends: ["specify-dependencies-here" {>= "optional-version"}
  ]build: [["./configure" "--prefix=%{prefix}%"][make]
  ]install: [make "install"]
  dev-repo: "git+https://"

On MacOS runners, it somehow managed to error out quickly:

  /Users/runner/hostedtoolcache/opam/2.3.0/x86_64/opam pin --no-action add goblint.dev .
  [goblint.dev] synchronised (git+file:///Users/runner/work/analyzer/analyzer#HEAD)
  The following additional pinnings are required by goblint.dev:
    - oblint-cil.2.0.5 at git+https://github.com/goblint/cil.git#c79208b21ea61d7b72eae29a18c1ddeda4795dfd
    - camlidl.1.12 at git+https://github.com/xavierleroy/camlidl.git#1c1e87e3f56c2c6b3226dd0af3510ef414b462d0
    - apron.v0.9.15 at git+https://github.com/antoinemine/apron.git#418a217c7a70dae3f422678f3aaba38ae374d91a
  Pin and install them? [y/n] y
  Package oblint-cil does not exist, create as a NEW package? [y/n] y
  [oblint-cil.2.0.5] synchronised (no changes)
  [NOTE] No package definition found for oblint-cil.2.0.5: please complete the template
  TERM environment variable not set.
  [ERROR] Empty file or editor error, aborting.
  [ERROR] No valid package definition found
sim642 commented 1 hour ago

I think it's trying to run some editor to interactively let the user fill the package definition in, but without input in the CI, it'll just keep waiting. Perhaps it's somehow possible to make opam never open an editor in the CI.

EDIT: Or perhaps not, this seems related: https://github.com/ocaml/opam/issues/6038.