mirage / qubes-mirage-firewall

A Mirage firewall VM for QubesOS
208 stars 28 forks source link

compilation issue with mirage 4.5.1 #196

Closed hannesm closed 3 months ago

hannesm commented 3 months ago
471.326s:# File "dispatcher.ml", line 3, characters 17-29:
471.326s:# 3 | module Netback = Backend.Make (Xenstore.Make (Xen_os.Xs))
471.326s:#                      ^^^^^^^^^^^^
471.326s:# Error: Unbound module Backend.Make

The underlying problem as far as I can tell is that mirage-bootvar defines a module Backend (and is not wrapped), and also mirage-net-xen is not wrapped and defines a module Backend. I'll work on fixing mirage-bootvar and cut a release.

hannesm commented 3 months ago

fixed by https://github.com/ocaml/opam-repository/pull/25909 when merged to the repository. I'll close this issue.

palainp commented 3 months ago

Thank you @hannesm! Do you think that wrapping Backend in mirage-net-xen should be done too? That might break code in other places.

hannesm commented 3 months ago

Yes, I think that in the end, we should work that each opam package foo in OCaml defines only the findlib library foo (+sublibs, foo.hello, foo.unix), and the modules are all within Foo. Now, for mirage-bootvar this is not exactly the case, there's Mirage_bootvar_backend and Mirage_bootvar_parse_argv -- but they're unique enough ;)