-
Notifications
You must be signed in to change notification settings - Fork 6
Port to dune and set as a virtual library #7
Conversation
I'd be in favour of renaming the |
For now there are two limitations: (1) is why I need to separate
(2) is why it's not possible to rename |
@TheLortex thanks for your explanation, though tbh I'm still not convinced that introducing OS and Mirage_OS as modules is the right approach. Are (1) and (2) inherent to OCaml, or technical issues in this new build system? I'm really not a fan of layering up hacks and workarounds just because of deficiencies in the supply chain (and I remember that (2) bit me in logs-syslog, where now a |
@hannesm I can't really tell if it's an ocaml or a dune issue. However, the current design is already a bit hacky because for example So instead of introducing a |
So the scheme I think is good to apply is the following:
@avsm @hannesm What's your feedback on this ? I updated PRs accordingly. There's a lot of interdependencies so I'm not sure how this should be done. |
The scheme above sounds good. It would be good to release the various mirage-target.internals targets before the mirage-os-shim release to break the dependency cycle and get the individual implementations all adjusted |
ok, this is fine with me, though I don't understand the naming of modules here and in mirage-xen/mirage-solo5... earlier we had filenames oS.ml{,i} (i.e. first character lower case, other upper case) -- now there's OS.ml{,i} -- what's the reason behind this? while at it, the about the Lifecycle module, is this actually used (maybe in the xen cases, i.e. on qubesos)!? |
I think these modules like Lifecycle and Time can be deprecated, but lets do that in a separate step to this PR which adapts the existing build strategy. I'm going to start merging/releasing them soon without module changes, so we can spot any build regressions independently of type definition evolution. |
@avsm uhm, iiuc this change and related work requires mirage+dune -- or am I wrong and these changes also work with mirage using ocamlbuild for building?? which seems to be slightly stalled (or at least I can't evaluate whether there's progress or not since mirage/mirage#969 didn't get updated -- NB: still missing a concrete developer-workflow changes document (and still don't understand how your "duniverse" fits into the picture)) |
I don't know why the On mirage+dune the work is mostly done, it's just a matter of reviewing and releasing packages. I've published a recap on mirage/mirage#969, is that was you wanted ? |
@@ -1 +1 @@ | |||
src/Mirage_OS | |||
src/OS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to keep the doc/
folder anymore
bug-reports: "https://github.com/mirage/mirage-os-shim/issues" | ||
tags: [] | ||
build: [ | ||
["dune" "subst" ] {pinned} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed anymore with the latest versions of dune
(I think)
Thinking again about the split into multiple modules ( |
This PR seems the real bottleneck of the dunification of MirageOS so we need to precise what is really going on in a future about First, we need to separate two details about variants and dune and do an explanation about what we currently do (not specially here) and what we want to do. Virtual librariesVirtual libraries is already known with As @TheLortex said, by this interface, an implementation can not be extended from it (in others words, it can not provide new values/functions) and an implementation must respect the given interface. In your cases, we have 2 problems about that:
A segfault can be replicated if 2 orthogonal libraries choose different implementations. At the end,
If it's not the case, at the end, you will have a linking error. About virtual libraries and
|
thanks @dinosaure for your explanation. I guess
The mentioned c vs ocaml variants in checkseum/digestif are rather different (it is unclear to me who should decide which to use) from target-specific variants (where mirage knows the target and decides which variant is suitable to be linked into a unikernel). On a side note, I'd appreciate if (4) could be avoided -- some resources are always available (once and only once) in a MirageOS unikernel (at least in my opinion): Random, Mclock, Pclock, Main, Time - it'd be nice to not have to functorize over these (that AFAIU was the original intention of mirage-os-shim). |
I haven't look much into the details but my gut feeling is that we don't need |
Using dune features mirage-os-shim can become a virtual library implemented by mirage-xen, mirage-unix and mirage-freestanding.
We need to figure out the correct
conflicts
field in the opam file.Main post: mirage/mirage#969