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

global variables in the conflicts field should not be substituted #765

Open
kit-ty-kate opened this issue Feb 24, 2023 · 2 comments
Open
Labels
type/bug Something isn't working

Comments

@kit-ty-kate
Copy link
Contributor

See https://github.com/ocaml/opam-repository/pull/23402/files#r1116960175

@kit-ty-kate kit-ty-kate added the type/bug Something isn't working label Feb 24, 2023
@novemberkilo
Copy link
Contributor

@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 :)

@MisterDA
Copy link
Contributor

MisterDA commented Mar 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants