From ae6ab8f926a0b1e236364f2f3d134b769e184725 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Sun, 24 May 2026 10:39:41 +0300 Subject: [PATCH] Work around opam bug in make setup for opam < 2.2 The opam bug: https://github.com/ocaml/opam/issues/6946. --- make.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index c944c18d90..57575cba91 100755 --- a/make.sh +++ b/make.sh @@ -8,7 +8,12 @@ opam_setup() { set -x opam init -y -a --bare $SANDBOXING # sandboxing is disabled in travis and docker opam update - opam switch -y create . --deps-only --packages=ocaml-variants.4.14.2+options,ocaml-option-flambda --locked + # This is what we used to do and what we'd like to do: + # opam switch -y create . --deps-only --packages=ocaml-variants.4.14.2+options,ocaml-option-flambda --locked + # But this fails on opam < 2.2 due to a bug (https://github.com/ocaml/opam/issues/6946). + # So this is the workaround from @kit-ty-kate (while we still want to support opam < 2.2): + opam switch -y create . --no-install --packages=ocaml-variants.4.14.2+options,ocaml-option-flambda + opam install -y ./*.opam.locked --deps-only } rule() {