Disable CI on the old OCaml versions (is this possible?)
Define my own Either module in my package. I don’t like this very much because it’s rebuilding something that should be provided. (a) I’ll have to provide a few standard utilities that are basically just boilerplate and (b) if someone is using Either from the standard library they’ll have to convert between the two.
Use Either from containers, batteries, or base. Is one of these a better choice than the others? I assume everything except Either will be linked out if it’s the only module I use, right? This also has problem 2b I believe.
If Either is the only module you need then you can also use the compatibility package available at opam - either
This will allow your project to use the new Either module while staying compatible with older versions of OCaml. When using compiler versions >= 4.12 the library defines an alias to the stdlib’s definition of the Either module, and in older releases it’ll provide a definition of an Either module.
Disable CI on the old OCaml versions (is this possible?)
ocaml-ci will test whatever versions of OCaml have a solution to your opam constraints. So if you want to restrict the versions to test, just edit your opam file to require ocaml>=4.12.