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

Switch minimum OCaml version to 4.08 #4775

Merged
merged 2 commits into from
Aug 6, 2021
Merged

Switch minimum OCaml version to 4.08 #4775

merged 2 commits into from
Aug 6, 2021

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Jul 29, 2021

Continues from #4770. opam-core, opam-format and opam-installer are now tested separately where only the libraries are built.

CI is still quite painful because the ocaml-secondary-compiler, however, I have an overhaul PR ready to go which sorts out the caching for that.

opam-core.opam Outdated Show resolved Hide resolved
opam-format.opam Outdated Show resolved Hide resolved
opam-installer.opam Outdated Show resolved Hide resolved
@@ -26,7 +26,7 @@ build: [
["dune" "build" "-p" name "-j" jobs]
]
depends: [
"ocaml" {>= "4.03.0"}
"ocaml" {>= "4.08.0"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is to be noted that notable plugins, such as dune-release and opam-publish, use opam-state.

Not a blocker ofc but it's probably good to ping the devs. cc @NathanReb

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed - I'd checked those through before proposing it. opam-publish is already pulled towards 4.08+ by depending on cohttp via ocaml-github and dune-release was already 4.06+ (and I think @emillon agreed it would shift on @NathanReb's behalf!)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm there's no problem on my side for bumping minimum requirements on OCaml, to the contrary I'm rather glad about it!

@kit-ty-kate
Copy link
Member

cc @hannesm just in case. I'm not sure which part of the opam library you are using

@hannesm
Copy link
Member

hannesm commented Aug 2, 2021

From my development perspective (orb, conex), this is not an issue

With a packagers view, I find this kind of surprising: according to https://repology.org/project/ocaml/versions there's still a huge amount of stable distributions that ship OCaml 4.05.0. Raising the minimum OCaml version will exclude any of these to upgrade opam (if they rely on their packaging scripts and packages to build binary packages).

This will make it much harder to bootstrap (upgrade to) opam-after-2-1-0 on various distributions / platforms. I fail to see the reasoning behind raising the minimum requirement.

@kit-ty-kate
Copy link
Member

With a packagers view, I find this kind of surprising: according to https://repology.org/project/ocaml/versions there's still a huge amount of stable distributions that ship OCaml 4.05.0. Raising the minimum OCaml version will exclude any of these to upgrade opam (if they rely on their packaging scripts and packages to build binary packages).

The repology link shows that all of the distribution that ship OCaml < 4.08 are older version that won't update to opam >= 2.2.0 anyway (Debian Stable, Ubuntu OldLTS, CentOS, Alpine 3.10 (the latest being 3.14), …). The only on I personally know that doesn't match this pattern is FreeBSD which is still in 4.05, however there is a current ongoing effort to port to 4.11: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250408

This will make it much harder to bootstrap (upgrade to) opam-after-2-1-0 on various distributions / platforms. I fail to see the reasoning behind raising the minimum requirement.

To me, most people either:

  • use the opam version shipped with their distribution. But usually don't care too much about being up-to-date (unless you're runnig Archlinux or something)
  • Or use the opam release binaries (e.g. via the install.sh script) if they want to be more up-to-date

The people that really impacts it are people who compile opam from source, but for those we have make cold already which will compile an appropriate version of the compiler and compiles opam with that. Note that distributions can also use make cold if they need to.

The reasoning being raising the minimum requirement is that of developement simplicity: Everytime we upgrade the vendored libraries, we have to patch it to make it compatible with older versions of the compiler, we also lacked access to very good features in the compiler (e.g. exception matching from 4.03, access to the Result, Option modules from Stdlib, …). This all induces stress and slows down the development of opam.

@hannesm
Copy link
Member

hannesm commented Aug 2, 2021

@kit-ty-kate thanks for your reply.

opam-core, opam-format and opam-installer remain with OCaml 4.03.0 as
the minimum requirement; the rest of opam winds forwards to 4.08.0
@dra27
Copy link
Member Author

dra27 commented Aug 5, 2021

Good to go after CI comes back. Just to add that the bump to 4.03 was the big de-stresser (we finally can guarantee String.lowercase_ascii!) - the useful bump to 4.08 for opam-state onwards is that we can make the 0install solver a mandatory dependency.

@dra27 dra27 merged commit 844b659 into ocaml:master Aug 6, 2021
@dra27 dra27 deleted the switch-4.08 branch August 6, 2021 08:40
@dbuenzli
Copy link
Contributor

Do I understand correctly that there should be no problem for opam's development if cmdliner starts requiring 4.08 ? (not sure yet, just checking)

The README still says that OCaml 4.02 is supported.

@kit-ty-kate
Copy link
Member

@dbuenzli Yes, it's fine. The only package that would need their minimum version to be upgraded is opam-installer but we've discussed and we think it's totally fine.

I've also updated the README in 012103b. Thanks!

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 this pull request may close these issues.

None yet

5 participants