Skip to content

Drop support for old ocaml versions - #947

Merged
raphael-proust merged 16 commits into
masterfrom
drop-support-for-old-ocaml-versions
Jun 15, 2022
Merged

raphael-proust merged 16 commits into
masterfrom
drop-support-for-old-ocaml-versions

Conversation

@raphael-proust

Copy link
Copy Markdown
Collaborator

This PR removes support for ocaml<=4.07. This is following a suggestion (from @hannesm) and a user poll on discuss.

@raphael-proust

Copy link
Copy Markdown
Collaborator Author

We'll need to get ocaml-ci to drop tests for dropped ocaml versions. That might need to wait until we merge or at least we agree to merge.

@raphael-proust raphael-proust mentioned this pull request Jun 2, 2022
Comment thread src/core/dune
match Sys.getenv "BISECT_ENABLE" with
| "yes" -> "(preprocess (pps bisect_ppx))"
| _ -> ""
| exception _ -> ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess with recent dune (>= 2.7.0) and bisect_ppx (2.5.0) this could be done differently; namely in the dune files add the stanza (instrumentation (backend bisect_ppx))) (as explained in bisect_ppx README). :)

Comment thread src/react/lwt_react.cppo.ml Resolved
@hannesm

hannesm commented Jun 3, 2022

Copy link
Copy Markdown
Contributor

I removed some more code, see #949 (which is against the branch here). Please have a look :)

@raphael-proust

Copy link
Copy Markdown
Collaborator Author

Thanks for the additional removals! I've left one (1) comment which we may possibly ignore and merge anyway. Otherwise looks good to me.

@raphael-proust

Copy link
Copy Markdown
Collaborator Author

After adding all the constraints, the ocaml-ci dropped build attempts on legacy compilers. (Thanks Tmsc!)

However, the only compiler version where all the packages are now buildable is 4.14+domains. That's because ocaml-ci attempts to build all packages, including lwt_domain.opam. We should split the lwt_domain.opam in its own repository to avoid this. I'll do that in a separate PR.

@dinosaure

Copy link
Copy Markdown
Member

However, the only compiler version where all the packages are now buildable is 4.14+domains. That's because ocaml-ci attempts to build all packages, including lwt_domain.opam. We should split the lwt_domain.opam in its own repository to avoid this. I'll do that in a separate PR.

You probably should make an issue on ocaml-ci I think.

@tmcgilchrist

Copy link
Copy Markdown
Contributor

@raphael-proust We have a fix for ocam-ci that allows this PR to build.

See https://github.com/tmcgilchrist/lwt/tree/drop-support-for-old-ocaml-versions for a successful build against all supported packages / ocaml versions. Note it skips lwt_domains on unsupported compilers but includes it on ocaml-4.12+domains, and will pickup OCaml 5.0 once that is available.

There are 2 changes I needed to make in LWT:

  1. Add the "base-domains" dependency to lwt_domains.opam
  2. Tag the lwt_domains tests as belonging to that package drop-support-for-old-ocaml-versions...tmcgilchrist:drop-support-for-old-ocaml-versions

I didn't change the other tests but should be modified to identify which package they belong to.

@raphael-proust
raphael-proust force-pushed the drop-support-for-old-ocaml-versions branch from f1ccb47 to 6d98007 Compare June 9, 2022 06:14
@raphael-proust

Copy link
Copy Markdown
Collaborator Author

I've made a merge-request (into this branch) of your branch just so I could use the GH UI to merge. Thanks a lot for that fix.

@raphael-proust
raphael-proust force-pushed the drop-support-for-old-ocaml-versions branch from cb44404 to c94105e Compare June 9, 2022 06:33
@raphael-proust

Copy link
Copy Markdown
Collaborator Author

I've added one last commit to mark other tests with what packages they correspond to. But that breaks the build because there now several main.exe tests for the lwt package. So I rolled it back.

I think that a follow-up PR to modernise the dune files might be good. We can avoid these executable+alias in the test/ and replace by a simple test stanza, we can make the change @hannesm suggests above, we can bump the version requirement for dune (to match the new version requirement for ocaml), etc.

@raphael-proust
raphael-proust force-pushed the drop-support-for-old-ocaml-versions branch from c94105e to 6768b8e Compare June 9, 2022 06:50
@raphael-proust

Copy link
Copy Markdown
Collaborator Author

No one has come forward with some reason to not merge this. And the MR does restore a functioning CI. So I'm merging this.

@raphael-proust
raphael-proust merged commit b3e7dd0 into master Jun 15, 2022
@olafhering

Copy link
Copy Markdown
Contributor

lwt_ppx.opam has now two constraints for ocaml.

@raphael-proust

Copy link
Copy Markdown
Collaborator Author

Thanks @olafhering . I've fixed the issue in the release branch and added the same fix suggestion to the release PR.

@dinosaure
dinosaure deleted the drop-support-for-old-ocaml-versions branch June 24, 2022 11:36
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.

5 participants