Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck when pinning non-existent package #6322

Open
sim642 opened this issue Nov 29, 2024 · 3 comments · May be fixed by #6319
Open

Stuck when pinning non-existent package #6322

sim642 opened this issue Nov 29, 2024 · 3 comments · May be fixed by #6319

Comments

@sim642
Copy link

sim642 commented Nov 29, 2024

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
Copy link
Author

sim642 commented Nov 29, 2024

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: #6038.

@smorimoto
Copy link
Member

CC: @dra27 @kit-ty-kate

@kit-ty-kate
Copy link
Member

This is indeed a pure opam bug not something to do with setup-ocaml. I don't have the necessary rights to move the issue to ocaml/opam but @dra27 should have the right to do that.

In the meantime i've open a fix #6319 and this should be part of the upcoming opam 2.4.

@dra27 dra27 transferred this issue from ocaml/setup-ocaml Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants