mirage / mirage-xen

Xen core platform libraries for MirageOS
ISC License
18 stars 21 forks source link

Drop support for old ocaml-gnt package #12

Closed talex5 closed 5 years ago

talex5 commented 5 years ago

This allows us to remove some unused C stubs and means that we are now free to update the C functions without having to keep them in sync with ocaml-gnt.

The list of free grant refs is now kept in this module (the new code is just copied from ocaml-gnt, with the tests for Unix removed).

Attempting to link a unikernel that uses ocaml-gnt will now fail with e.g.

undefined reference to `stub_gnttab_init'

This is intended, since we would otherwise have two modules trying to track the free grant IDs. ocaml-gnt has marked all of the Xen-specific functions as deprecated (https://github.com/mirage/ocaml-gnt/pull/36), so users should get a more useful error from the compiler before getting to this stage, unless they used only the part of the API shared with Unix.

We should probably make a new release of ocaml-gnt before merging this, to ensure that users see the deprecation message.

yomimono commented 5 years ago

Once https://github.com/mirage/ocaml-gnt/pull/37 is merged I'll cut 4.0.0 releases of those packages.

yomimono commented 5 years ago

PR for release of xen-gnt and xen-gnt-unix at https://github.com/ocaml/opam-repository/pull/13853 .

hannesm commented 5 years ago

the gnt 4.0.0. is now merged, once you rebase onto master to avoid dune 1.9.1, the CI should turn green! :)

talex5 commented 5 years ago

OK, rebased.