janestreet / base

Standard library for OCaml
MIT License
848 stars 124 forks source link

Add support for OCaml 5.0 #129

Closed kit-ty-kate closed 1 year ago

kit-ty-kate commented 2 years ago

same as https://github.com/janestreet/base/pull/127 but for v0.15 instead of v0.14

dra27 commented 2 years ago

I have an alternative to https://github.com/janestreet/base/pull/129/commits/21461ee31811ea0d0467fb96744326b9c661feda which maintains the 4.x support, if you'd like to replace them?

https://github.com/dra27/base/commit/6187702052bafbd1f963cfb50dbaf6825dfd29b2 sheds a little weight by removing a shim for bytes which hasn't been necessary since base v0.10 and then https://github.com/dra27/base/commit/423dbad212f55506767d758b1ceb2d6e0ee8e7f5 re-uses that mechanism to provide the required two implementations for 4.x and 5.x. It's not emitting an inliner warning on the 4.10-4.14 contexts, so although I haven't checked the emitted code, the 4.x code should be the same,

dra27 commented 2 years ago

The DCO bot's still upset about the intermediate commit - there's a rebased version of both commits with that commit removed at https://github.com/dra27/base/commits/5.0-support