From 3e38efa59a19b71f45d538e679b9212d4ea937a9 Mon Sep 17 00:00:00 2001 From: "shoney.arickathil" Date: Tue, 25 Aug 2026 07:39:51 +0200 Subject: [PATCH] =?UTF-8?q?fix(ci):=20do=20not=20pin=20dune=20=E2=80=94=20?= =?UTF-8?q?use=20whatever=20setup-ocaml=20provides?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pinned `opam install dune.3.14.0` failed. setup-ocaml installs a dune of its own for caching, so requesting an exact older version is a downgrade the solver refuses — which also means run 1's `dune: command not found` was only ever a PATH problem, fixed by `opam exec --`. - probe with `opam exec -- dune --version`, install only if absent - echo the resolved version so the log says what built the release - any dune >= 3.14 satisfies `(lang dune 3.14)` Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/release.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f2283be..6b375e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,10 +45,16 @@ jobs: with: ocaml-compiler: '4.14' - # Pinned to the version this project is developed against - # (compiler/dune-project says `(lang dune 3.14)`). - - name: Install dune - run: opam install -y dune.3.14.0 + # setup-ocaml may already have installed a dune (it uses one for its + # own cache), in which case asking for an exact older version is a + # DOWNGRADE the solver refuses — which is how the pinned + # `dune.3.14.0` failed. So: use whatever is there, and only install + # if there is nothing. Any dune >= 3.14 satisfies this project's + # `(lang dune 3.14)`. + - name: Ensure dune is available + run: | + opam exec -- dune --version || opam install -y dune + echo "dune: $(opam exec -- dune --version)" # The tag is the release's identity; VERSION is what the binaries # report. If they disagree the download URL would name a version