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

Update to dune 2.0 #1034

Closed
shonfeder opened this issue Oct 22, 2024 · 0 comments · Fixed by #1035
Closed

Update to dune 2.0 #1034

shonfeder opened this issue Oct 22, 2024 · 0 comments · Fixed by #1035

Comments

@shonfeder
Copy link
Contributor

shonfeder commented Oct 22, 2024

As discussed in #1032 (comment), given that lwt is using generate_opam_files, there is functionality supported by dune 2 which would enable more economical package description (specifically by allowing us to avoid use of opam.template files).

There have been concerns raised about whether increasing the lower bound on the dune dependency would leave Lwt incompatible with other important packages.

I offer the following analyses to derisk:

Searching for packages with an upper bound on dune that would cause a conflict we find 50 packages:

$ git rev-parse HEAD
6a44505c76c94ac5d2ad231b5259cdfe10b9970d
$ rg 'dune" *\{ *(< *"2.0"|<= * "1).*' --no-heading
packages/odoc/odoc.1.3.0/opam:19:  "dune" {< "2.0"}
packages/herdtools7/herdtools7.7.54/opam:19:  "dune" {< "2.0"}
packages/fluent-logger/fluent-logger.1.1.0/opam:16:    "dune" {< "2.0"}
packages/dokeysto/dokeysto.3.0.0/opam:14:  "dune" {< "2.0"}
packages/orsvm_e1071/orsvm_e1071.3.0.2/opam:15:  "dune" {< "2.0"}
packages/csv/csv.2.1/opam:18:  "dune" {< "2.0"}
packages/get_line/get_line.5.0.0/opam:10:  "dune" {< "2.0"}
packages/get_line/get_line.4.0.1/opam:11:  "dune" {< "2.0"}
packages/get_line/get_line.6.0.0/opam:10:  "dune" {< "2.0"}
packages/links/links.0.8/opam:54:  "dune" {< "2.0"}
packages/npy/npy.0.0.8/opam:11:  "dune" {< "2.0"}
packages/minisat/minisat.0.2/opam:16:  "dune" {< "2.0"}
packages/dokeysto_camltc/dokeysto_camltc.3.0.0/opam:14:  "dune" {< "2.0"}
packages/lbvs_consent/lbvs_consent.2.0.0/opam:21:  "dune" {< "2.0"}
packages/lbvs_consent/lbvs_consent.2.0.1/opam:21:  "dune" {< "2.0"}
packages/setcore/setcore.1.0.1/opam:16:  "dune" {< "2.0"}
packages/rtop/rtop.3.3.7/opam:16:  "dune" {< "2.0"}
packages/rtop/rtop.3.4.0/opam:16:  "dune" {< "2.0"}
packages/rtop/rtop.3.3.5/opam:16:  "dune" {< "2.0"}
packages/relit-reason/relit-reason.0.0.1/opam:18:  "dune" {< "2.0"}
packages/relit-reason/relit-reason.0.0.2/opam:18:  "dune" {< "2.0"}
packages/ezsqlite/ezsqlite.0.4/opam:14:  "dune" {< "2.0"}
packages/ezsqlite/ezsqlite.0.4.1/opam:14:  "dune" {< "2.0"}
packages/gemini/gemini.0.1/opam:23:  "dune" {< "2.0"}
packages/gemini/gemini.0.2.0/opam:23:  "dune" {< "2.0"}
packages/dokeysto_lz4/dokeysto_lz4.3.0.0/opam:14:  "dune" {< "2.0"}
packages/jbuilder/jbuilder.transition/opam:10:  "dune" {< "2.0"}
packages/hts_shrink/hts_shrink.1.0.0/opam:10:  "dune" {< "2.0"}
packages/open/open.0.2.2/opam:11:  "dune" {< "2.0"}
packages/irmin-watcher/irmin-watcher.0.4.0/opam:19:  "dune"     {< "2.0"}
packages/irmin-watcher/irmin-watcher.0.4.1/opam:19:  "dune"     {< "2.0"}
packages/ppx_deriving_cmdliner/ppx_deriving_cmdliner.0.4.1/opam:28:  "dune" {< "2.0"}
packages/rosetta/rosetta.0.1.0/opam:18:  "dune" {< "2.0"}
packages/minicli/minicli.5.0.1/opam:13:  "dune" {< "2.0"}
packages/minicli/minicli.5.0.0/opam:13:  "dune" {< "2.0"}
packages/mirage-xen/mirage-xen.3.2.0/opam:17:  "dune" {<= "1.9.0" | >= "1.9.3"}
packages/mirage-xen/mirage-xen.3.3.0/opam:18:  "dune" {<= "1.9.0" | >= "1.9.3"}
packages/mirage-xen/mirage-xen.3.4.0/opam:17:  "dune" {<= "1.9.0" | >= "1.9.3"}
packages/parany/parany.7.0.0/opam:10:  "dune" {< "2.0"}
packages/parany/parany.5.0.1/opam:10:  "dune" {< "2.0"}
packages/parany/parany.6.0.0/opam:10:  "dune" {< "2.0"}
packages/parany/parany.5.0.0/opam:10:  "dune" {< "2.0"}
packages/ppxlib/ppxlib.0.2.1/opam:14:  "dune" {< "2.0"}
packages/ppxlib/ppxlib.0.3.0/opam:14:  "dune" {< "2.0"}
packages/ocaml-migrate-parsetree/ocaml-migrate-parsetree.1.0.11/opam:20:  "dune" {< "2.0"}
packages/ocaml-migrate-parsetree/ocaml-migrate-parsetree.1.1.0/opam:19:  "dune" {< "2.0"}
packages/encore/encore.0.2/opam:24:  "dune" {< "2.0"}
packages/bytearray/bytearray.1.0.0/opam:13:  "dune" {< "2.0"}
packages/links-postgresql/links-postgresql.0.8/opam:16:  "dune" {< "2.0"}
packages/magic-mime/magic-mime.1.1.1/opam:27:  "dune" {< "2.0"}

However, in almost every case, the latest version of the constrained package does not have this constraint. This is demonstrated by the following one-liner to print the package file bearing the lower bound followed by the latest version of the package:

$ for f in $(rg 'dune" *\{ *(< *"2.0"|<= * "1).*' -l); do echo $f && ls -r1 $(dirname $(dirname $f)) | head -n 1 && echo ; done
packages/odoc/odoc.1.3.0/opam
odoc.2.4.3

packages/herdtools7/herdtools7.7.54/opam
herdtools7.7.57

packages/fluent-logger/fluent-logger.1.1.0/opam
fluent-logger.1.1.0

packages/dokeysto/dokeysto.3.0.0/opam
dokeysto.4.0.1

packages/csv/csv.2.1/opam
csv.2.4

packages/orsvm_e1071/orsvm_e1071.3.0.2/opam
orsvm_e1071.4.0.0

packages/get_line/get_line.5.0.0/opam
get_line.7.0.0

packages/get_line/get_line.4.0.1/opam
get_line.7.0.0

packages/get_line/get_line.6.0.0/opam
get_line.7.0.0

packages/links/links.0.8/opam
links.0.9.8

packages/npy/npy.0.0.8/opam
npy.0.0.9

packages/minisat/minisat.0.2/opam
minisat.0.6

packages/lbvs_consent/lbvs_consent.2.0.0/opam
lbvs_consent.2.2.0

packages/lbvs_consent/lbvs_consent.2.0.1/opam
lbvs_consent.2.2.0

packages/dokeysto_camltc/dokeysto_camltc.3.0.0/opam
dokeysto_camltc.4.0.0

packages/setcore/setcore.1.0.1/opam
setcore.1.0.2

packages/rtop/rtop.3.3.7/opam
rtop.3.9.0

packages/rtop/rtop.3.4.0/opam
rtop.3.9.0

packages/rtop/rtop.3.3.5/opam
rtop.3.9.0

packages/relit-reason/relit-reason.0.0.1/opam
relit-reason.0.0.2

packages/relit-reason/relit-reason.0.0.2/opam
relit-reason.0.0.2

packages/ezsqlite/ezsqlite.0.4/opam
ezsqlite.0.4.2

packages/ezsqlite/ezsqlite.0.4.1/opam
ezsqlite.0.4.2

packages/gemini/gemini.0.1/opam
gemini.0.3.0

packages/gemini/gemini.0.2.0/opam
gemini.0.3.0

packages/dokeysto_lz4/dokeysto_lz4.3.0.0/opam
dokeysto_lz4.4.0.0

packages/jbuilder/jbuilder.transition/opam
jbuilder.transition

packages/hts_shrink/hts_shrink.1.0.0/opam
hts_shrink.3.0.1

packages/open/open.0.2.2/opam
open.0.2.2

packages/irmin-watcher/irmin-watcher.0.4.0/opam
irmin-watcher.0.5.0

packages/irmin-watcher/irmin-watcher.0.4.1/opam
irmin-watcher.0.5.0

packages/ppx_deriving_cmdliner/ppx_deriving_cmdliner.0.4.1/opam
ppx_deriving_cmdliner.0.6.0

packages/rosetta/rosetta.0.1.0/opam
rosetta.0.3.0

packages/minicli/minicli.5.0.1/opam
minicli.5.0.2

packages/minicli/minicli.5.0.0/opam
minicli.5.0.2

packages/mirage-xen/mirage-xen.3.2.0/opam
mirage-xen.8.0.3

packages/mirage-xen/mirage-xen.3.3.0/opam
mirage-xen.8.0.3

packages/mirage-xen/mirage-xen.3.4.0/opam
mirage-xen.8.0.3

packages/parany/parany.6.0.0/opam
parany.9.0.0

packages/parany/parany.5.0.1/opam
parany.9.0.0

packages/parany/parany.5.0.0/opam
parany.9.0.0

packages/parany/parany.7.0.0/opam
parany.9.0.0

packages/ppxlib/ppxlib.0.3.0/opam
ppxlib.0.9.0

packages/ppxlib/ppxlib.0.2.1/opam
ppxlib.0.9.0

packages/ocaml-migrate-parsetree/ocaml-migrate-parsetree.1.1.0/opam
ocaml-migrate-parsetree.2.4.0

packages/ocaml-migrate-parsetree/ocaml-migrate-parsetree.1.0.11/opam
ocaml-migrate-parsetree.2.4.0

packages/encore/encore.0.2/opam
encore.0.8

packages/bytearray/bytearray.1.0.0/opam
bytearray.1.0.3

packages/links-postgresql/links-postgresql.0.8/opam
links-postgresql.0.9.8

packages/magic-mime/magic-mime.1.1.1/opam
magic-mime.1.3.1

The only outliers appear to be:

packages/fluent-logger/fluent-logger.1.1.0/opam
fluent-logger.1.1.0

packages/jbuilder/jbuilder.transition/opam
jbuilder.transition

packages/open/open.0.2.2/opam
open.0.2.2

Two of these have a quite small reverse dependency cones:

$ opam list --depends-on open.0.2.2
# Packages matching: depends-on(open.0.2.2) & (installed | available)
# Name   # Installed # Synopsis
frenetic --          The Frenetic Programming Language and Runtime System
idds     --          Identity-suppressed decision diagrams (IDDs)
netkat   --          A clean slate implementation of NetKAT
$ opam list --depends-on fluent-logger
# Packages matching: depends-on(fluent-logger) & (installed | available)
# No matches found

And jbuilder.transition is already a conflict with dune 1: https://github.com/ocaml/opam-repository/blob/6a44505c76c94ac5d2ad231b5259cdfe10b9970d/packages/dune/dune.1.11.4/opam#L34

This looks to my like a small enough down side that it would be worth updating.

shonfeder added a commit to shonfeder/lwt that referenced this issue Oct 22, 2024
raphael-proust pushed a commit to shonfeder/lwt that referenced this issue Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant