Delete the deprecated Bigarray.*.map_file functions#2263
Conversation
|
Assuming testsuite pass, etc., this LGTM - up to you if you want the extra commit updating the otherlibs I wouldn't put this in 4.08, personally - I think it's fine to announce that the functions are effectively not present (but available with a workaround for the belligerent), and then definitely deleted in 4.09. |
|
https://gist.github.com/4d8edbcf47138253509505166a57e68d Here's the results of a quick Looks like a fair few packages still using the old form. The full extent will become more obvious once we get a working ocaml-migrate-parsetree with 4.08 and can unblock the bulk opam builds for 4.08+beta2 |
|
We can learn a valuable lesson from all this: when deprecating a feature, it is important to specify when the feature will effectively go away. |
|
@avsm what do you conclude from this grepping? In 4.08, the So personally I still don't see the harm of deleting this function in 4.08. At least it makes things clear. |
Indeed, that would be extremely useful to specify in the original deprecation warning too.
I think several of the packages that currently use it will need to support compiling with ocaml<4.06.0 (such as opam), frustrating though this is. Would it be possible to have a stdlib shim that will expose the right To be clear, I think that this PR is the right thing to do in this case, but a compat shim for pre<4.06>=4.08 compilers would make life vastly easier for package maintainers. |
|
I suppose. So the proposed plan is:
This is similar to what @damiendoligez suggested, except that the compatibility code for the old |
|
How about calling the package |
…f the deprecated Bigarray `map_file` that was removed in OCaml 4.08 (see ocaml/ocaml#2263)
|
Yes just exposing only the |
|
Just adding an echo for the shim adding |
|
I wish we were more systematic in proposing compatibility shims right away, or interacting early with people who already do the work of building those shims (eg. stdcompat). |
|
Ok, that makes sense. However, I suggest to call the module |
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
|
Do we actually need the package to be transient? It's fine if users depend on it indefinitely. |
|
Ok, so there are no objection to merging this in 4.08 then. I moved the changelog entry to 4.08 as a result. |
|
@gasche it's just that it doesn't bring anything compared to |
|
There is one reason to call it just An (edit: I realise there is still a dependency on Unix.fd in the interface -- we work around that with a |
|
Ok, that makes sense. |
|
I created the package: https://github.com/diml/mmap @avsm if you want to integrate it in the mirage suite, I'm happy to transfer the project to mirage. |
|
I can help do this for https://github.com/mirage/mirage-platform as I recently submitted a PR for 4.08 integration (mirage/mirage-platform#206). Once the next beta is out I'll take care of it. |
|
@dra27 could you approve this PR? |
|
@diml thanks - if you add me as admin on there i'll do a repo transfer to mirage/ |
|
I've cherry-picked it to 4.08 as well |
|
Thanks! |
|
https://github.com/mirage/mmap now available. I'll release it to opam after setting up CI |
…struct-lwt (3.5.0) CHANGES: - Remove trailing spaces in hexdump output (mirage/ocaml-cstruct#219 @emillon) - Add `Cstruct.rev` to allocate a reversed cstruct (mirage/ocaml-cstruct#221 @emillon) - `Cstruct_unix` now uses the post-OCaml 4.06 `Unix.map_file` instead of the deprecated Bigarray `map_file` that was removed in OCaml 4.08 (@avsm, see ocaml/ocaml#2263) - Remove unnecessary `(wrapped false)` in the build system (@avsm) - Correct ocamldoc to the right `cstruct-ppx` package pointer (@avsm)
These functions have been deprecated since 4.06.0, which was released in November 2017. That seems like enough notice to delete them.