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

dune tip fails to solve packages with avoid-version #11136

Open
avsm opened this issue Nov 20, 2024 · 5 comments
Open

dune tip fails to solve packages with avoid-version #11136

avsm opened this issue Nov 20, 2024 · 5 comments

Comments

@avsm
Copy link
Member

avsm commented Nov 20, 2024

With current dune tip, dune pkg lock fails due to (I think) avoid-version:

% dunex pkg lock
Error: Unable to solve dependencies for the following lock directories:
Lock directory dune.lock:
Can't find all required versions.
Selected: angstrom.0.16.1 arod.dev astring.0.8.5 base.v0.17.1 base-bytes.base
          base-threads.base base-unix.base base64.3.5.1 bigarray-compat.1.1.0
          bigstringaf.0.10.0 bos.0.2.1 bushel.dev cmarkit.0.3.0
          cmdliner.1.3.0 cohttp.5.3.1 csexp.1.5.2 cstruct.6.2.0 ctypes.0.23.0
          digestif.1.2.0 domain-local-await.1.0.1 dune-configurator.3.16.1
          eio.1.1 eio_main.1.1 eio_posix.1.1 eqaf.0.10 ezjsonm.1.3.0
          fmt.0.9.0 fpath.0.7.3 hex.1.5.0 hmap.0.8.1 http.6.0.0~beta2
          integers.0.7.0 iomux.0.3 jekyll-format.0.3.4 jsonm.1.0.2 logs.0.7.0
          lwt-dllist.1.0.1 mtime.2.1.0 num.1.5-1 ocaml.5.4.0 ocaml-config.3
          ocaml-syntax-shims.1.0.0 ocaml_intrinsics_kernel.v0.17.1
          ocamlbuild.0.15.0+dune ocamlfind.1.9.6+dune optint.0.3.0
          parsexp.v0.17.0 ppx_deriving_yaml.0.4.0 ppx_sexp_conv.v0.17.0
          ppxlib_jane.v0.17.2 psq.0.2.1 ptime.1.2.0 re.1.12.0 rresult.0.7.0
          seq.base sexplib.v0.17.0 sexplib0.v0.17.0 sitemap.1.0
          stdlib-shims.0.3.0 stringext.1.6.0 syndic.1.6.1 thread-table.1.0.0
          topkg.1.0.7 uri.4.4.0 uri-sexp.4.4.0 uutf.1.0.3 xmlm.1.4.0
          yaml.3.2.0 yaml-sexp.3.2.0 zotero-translation.dev
          arod&bushel&zotero-translation ocaml ocaml-base-compiler
          ocaml-base-compiler ocaml&base-bytes
- cohttp-eio -> (problem)
    No usable implementations:
      cohttp-eio.6.0.0~beta2: Package is excluded by avoid-version
      cohttp-eio.6.0.0~alpha2: Package is excluded by avoid-version
      cohttp-eio.6.0.0~alpha1: Package is excluded by avoid-version
      cohttp-eio.6.0.0~alpha0: Package is excluded by avoid-version
- dune -> dune.3.16.1
    User requested = 3.17
- ocaml-base-compiler -> (problem)
    Rejected candidates:
      ocaml-base-compiler.5.2.1: Requires ocaml = 5.2.1
      ocaml-base-compiler.5.2.0: Requires ocaml = 5.2.0
      ocaml-base-compiler.5.1.1: Requires ocaml = 5.1.1
      ocaml-base-compiler.5.1.0: Requires ocaml = 5.1.0
      ocaml-base-compiler.5.0.0: Requires ocaml = 5.0.0
      ...
- ppxlib -> (problem)
    ppx_deriving_yaml 0.4.0 requires >= 0.25.0
    ppx_sexp_conv v0.17.0 requires >= 0.28.0
    Rejected candidates:
      ppxlib.0.33.0: Requires ocaml >= 4.04.1 & < 5.3.0
      ppxlib.0.32.1: Requires ocaml >= 4.04.1 & < 5.3.0
      ppxlib.0.32.0: Requires ocaml >= 4.04.1 & < 5.2.0 & <> 5.1.0~alpha1
      ppxlib.0.31.0: Requires ocaml >= 4.04.1 & < 5.2.0 & <> 5.1.0~alpha1
      ppxlib.0.30.0: Requires ocaml >= 4.04.1 & < 5.2.0 & <> 5.1.0~alpha1
      ...

but it works in 3.16.0

% dune pkg lock
Solution for dune.lock:
- angstrom.0.16.1
- astring.0.8.5
- base.v0.17.1
- base-domains.base
- base-threads.base
- base-unix.base
- base64.3.5.1
- bigarray-compat.1.1.0
- bigstringaf.0.10.0
- bos.0.2.1
- cmarkit.0.3.0
- cmdliner.1.3.0
- cohttp.6.0.0~beta2
- cohttp-eio.6.0.0~beta2
- csexp.1.5.2
- cstruct.6.2.0
- ctypes.0.23.0
- digestif.1.2.0
- domain-local-await.1.0.1
- dune.3.16.1
- dune-configurator.3.16.1
- eio.1.1
- eio_main.1.1
- eio_posix.1.1
- eqaf.0.10
- ezjsonm.1.3.0
- fmt.0.9.0
- fpath.0.7.3
- hex.1.5.0
- hmap.0.8.1
- host-arch-unknown.1
- http.6.0.0~beta2
- integers.0.7.0
- iomux.0.3
- jekyll-format.0.3.4
- jsonm.1.0.2
- logs.0.7.0
- lwt-dllist.1.0.1
- mtime.2.1.0
- num.1.5-1
- ocaml.5.2.0
- ocaml-compiler-libs.v0.17.0
- ocaml-config.3
- ocaml-syntax-shims.1.0.0
- ocaml-system.5.2.0
- ocaml_intrinsics_kernel.v0.17.1
- ocamlbuild.0.15.0+dune
- ocamlfind.1.9.6+dune
- optint.0.3.0
- parsexp.v0.17.0
- ppx_derivers.1.2.1
- ppx_deriving_yaml.0.4.0
- ppx_sexp_conv.v0.17.0
- ppxlib.0.33.1~5.3preview
- ppxlib_jane.v0.17.0
- psq.0.2.1
- ptime.1.2.0
- re.1.12.0
- rresult.0.7.0
- seq.base
- sexplib.v0.17.0
- sexplib0.v0.17.0
- sitemap.1.0
- stdlib-shims.0.3.0
- stringext.1.6.0
- syndic.1.6.1
- thread-table.1.0.0
- topkg.1.0.7
- uri.4.4.0
- uri-sexp.4.4.0
- uutf.1.0.3
- xmlm.1.4.0
- yaml.3.2.0
- yaml-sexp.3.2.0

(note the cohttp 6.0.0beta2 selection)

@maiste
Copy link
Collaborator

maiste commented Nov 20, 2024

Thanks, @avsm, for the spotting! On which package were you trying to build so we can reproduce on our side?

@avsm
Copy link
Member Author

avsm commented Nov 20, 2024

It's a private repository, but just depending on cohttp-eio may be enough to repro, as all of the versions released are marked as avoid-version, I believe...

@rgrinberg
Copy link
Member

It's a consequence of this PR I believe #10668

I disabled avoid-version packages by default without adding a way to opt back in. It's probably a good time to add a mechanism now.

@rgrinberg
Copy link
Member

I forgot to mention that there's a still workaround for this: you can pin any package version even if it has avoid-version set.

@avsm
Copy link
Member Author

avsm commented Nov 21, 2024

I'll do another "workaround" by releasing cohttp.6.0.0 today. Dune package management has been amazing to the release: a simple git clone; dune pkg lock; dune build; dune runtest has been sufficient to build the entire repository!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants