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

Solver can select ocaml-base-compiler and ocaml-variant at the same time #340

Open
kit-ty-kate opened this issue Oct 24, 2022 · 4 comments
Labels
investigate Issues that require further investigation to understand the issue

Comments

@kit-ty-kate
Copy link
Contributor

kit-ty-kate commented Oct 24, 2022

$ opam switch create test ocaml-base-compiler.5.0.0~beta1
$ opam repo add alpha git+https://github.com/kit-ty-kate/opam-alpha-repository
$ opam pin git+https://github.com/kit-ty-kate/mirage#500
$ git clone https://github.com/mirage/mirage-skeleton
$ cd mirage-skeleton/tutorial/noop
$ mirage configure -t hvt
$ make depends
Selected: astring.0.8.5+dune base.v0.15.1 base-bigarray.base base-bytes.base
          base-threads.base base-unix.base bheap.2.0.0 cmdliner.1.1.1+dune
          cppo.1.6.9 csexp.1.5.1 cstruct.6.1.1 domain-name.0.4.0 dune.3.5.0
          dune-configurator.3.5.0 duration.0.2.1 findlib.1.8.1+dune
          fmt.0.9.0+dune functoria-runtime.4.3.0 ipaddr.5.3.1
          logs.0.7.0+dune2 lwt.5.6.1 macaddr.5.3.1 metrics.0.4.0
          mirage-bootvar-solo5.0.6.0 mirage-clock.4.2.0
          mirage-clock-solo5.4.2.0 mirage-logs.1.2.0 mirage-profile.0.9.1
          mirage-runtime.4.3.0 mirage-solo5.0.9.1 noop-hvt.zdev num.1.4+dune2
          ocaml-base-compiler.4.14.0 ocaml-compiler-libs.v0.12.4
          ocaml-config.3 ocaml-options-vanilla.1 ocamlfind.1.8.1+dune
          ocplib-endian.1.2 parse-argv.0.2.0 parsexp.v0.15.0
          ppx_cstruct.6.1.1 ppx_derivers.1.2.1 ppxlib.0.28.0
          ptime.1.0.0+dune2 sexplib.v0.15.1 sexplib0.v0.15.1
          stdlib-shims.0.3.0 ocaml-base-compiler&noop-hvt ocaml-base-compiler
          ocaml ocaml-variants ocaml-variants
- ocaml -> ocaml.5.0.0
    User requested = 5.0.0
- ocaml-variants -> (problem)
    Rejected candidates:
      ocaml-variants.5.1.0+trunk: In same conflict class (ocaml-core-compiler) as ocaml-base-compiler
      ocaml-variants.5.0.0+trunk: In same conflict class (ocaml-core-compiler) as ocaml-base-compiler
      ocaml-variants.5.0.0~beta1+options: In same conflict class (ocaml-core-compiler) as ocaml-base-compiler
      ocaml-variants.5.0.0~alpha1+options: In same conflict class (ocaml-core-compiler) as ocaml-base-compiler
      ocaml-variants.5.0.0~alpha0+options: In same conflict class (ocaml-core-compiler) as ocaml-base-compiler
      ...
@tmattio tmattio added the investigate Issues that require further investigation to understand the issue label Jan 10, 2023
@tmattio tmattio changed the title Incoherent solver result on OCaml 5.0 Solver can select ocaml-base-compiler and ocaml-variant at the same time Jan 10, 2023
@Leonidas-from-XIV
Copy link
Member

We need to investigate why the Selected line contains ocaml-base-compiler&noop-hvt ocaml-base-compiler ocaml ocaml-variants ocaml-variants, that is both the base-compiler and variants, given they can't be both installed at the same time it is impossible to find a solution.

@palainp
Copy link

palainp commented Jan 12, 2023

I probably should have wrote #351 (comment) here, but the alternatives dependencies (cf. https://github.com/ocaml/opam-repository/blob/master/packages/base-domains/base-domains.base/opam, not searched for other examples) may be related to that issue. However I'm currently not sure how to check/validate that, I just hope it can helps :)

@dinosaure
Copy link

I'm not sure that it's the right solution but for our context, we would like to pick the cross-compiled base-domains.base. We probably should follow what we did about zarith and take the opportunity of the --required-cross-compile option?

@talex5
Copy link

talex5 commented Jan 18, 2023

We need to investigate why the Selected line contains ocaml-base-compiler&noop-hvt ocaml-base-compiler ocaml ocaml-variants ocaml-variants, that is both the base-compiler and variants, given they can't be both installed at the same time it is impossible to find a solution.

Those don't have version numbers next to them, so I suspect they're just virtual packages the solver made up to represent logic operations. It says ocaml-variants -> (problem) below, so it didn't select the package itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Issues that require further investigation to understand the issue
Projects
None yet
Development

No branches or pull requests

6 participants