ocurrent / ocaml-ci

A CI for OCaml projects

Home Page:https://ocaml.ci.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

global variables in the conflicts field should not be substituted

kit-ty-kate opened this issue · comments

@kit-ty-kate could we please get more detail on this issue so that we can work on it? It's not clear to me from the example what's broken and what the outcome should be. Thank you :)

capnp-rpc-unix specified an old lower-bound for re. This particular re requires jbuilder, which spurs out deprecation warnings (switch to Dune 2! switch to Dune 2!) when used. The warnings were messing up the output of expect tests, in this case I think it was failing the diff of mdx tests. The solution, instead of bumping the lower-bound of re to one version supporting Dune, was to make the package conflict with jbuilder, so that the solver would also select a newer version of re. As the problem only appeared during tests, we added to the opam package

conflicts: [
  "jbuilder" { with-test }
]

Kate remarks however that global variables (with-test) shouldn't be expanded in the conflicts field: ocaml-ci is too zealous and this behaviour is a bug. It shouldn't have succeeded with this opam file. The with-test was removed.

We should:

  • change ocaml-ci so that global variables are not substituted in some fields (where's the doc about that?);
  • probably amend the opam-lint step to reject such opam files.