Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add upper bound to ocaml < 5 #1408

Closed
hannesm opened this issue Mar 10, 2023 · 6 comments
Closed

add upper bound to ocaml < 5 #1408

hannesm opened this issue Mar 10, 2023 · 6 comments

Comments

@hannesm
Copy link
Member

hannesm commented Mar 10, 2023

Dear MirageOS developers,

since I've read in several outreachy reports that people attempted to build unikernels with OCaml 5 with not much success, I'm wondering whether mirage itself -- the opam package -- should have an upper bound on OCaml < 5 -- to avoid confusion that stems from the opam-monorepo error messages (which wants to tell you "you can't build unikernels with ocaml 5").

Now, certainly the Mirage tool code itself works fine with OCaml 5, and the unix target may as well work fine with OCaml 5, but any xen/hvt/spt/virtio target (that depends on ocaml-solo5) doesn't compile with OCaml 5.

WDYT?

@palainp
Copy link
Member

palainp commented Mar 10, 2023

Thank you @hannesm for bringing this up, I think it is important that newcomers have a pleasant mirage experience, so I'm also in favour of restricting the Ocaml version until a workable path is found to use Ocaml5 👍

I'm not sure I understand the underlying problem with opam-monorepo, I have a workaround (which consists of removing the 4.14-domains packages in the base-domains dependencies tree) so I can try out further with ocaml-solo5 but it's only a workaround and not a viable solution :/

@reynir
Copy link
Member

reynir commented Mar 14, 2023

I think that would be great. The situation with the Outreachy applicants was worsened due to me accidentally deleting the instructions to install OCaml 4.14 in #1402.

@palainp
Copy link
Member

palainp commented Mar 14, 2023

I recently opened a PR (#1409) and if this doesn't break anything else (it removes ocaml from the unikernel dependencies, but as @hannesm pointed out we have a transitive dependency on ocaml from mirage-runtime) it should solve the problem with Ocaml5 without restriction.
However, Solo5 and ocaml-solo5 do not yet have support for Ocaml5, so I am still in favour of restricting it until the pending PRs are merged.

@hannesm
Copy link
Member Author

hannesm commented Jun 20, 2023

I'm actually in favour of closing this issue, for the reasons:

  • (a) the unix target works fine on ocaml5
  • (b) ocaml-solo5 (used for xen / hvt / spt / muen) has an upper bound on ocaml 4.15
  • (c) there's ongoing work for ocaml-solo5 supporting ocaml 5
  • (d) mirage itself (and mirage-runtime etc.) work fine on ocaml 5

What do you think? Another path to take is to restrict the mirage tool (in opam-repository, also all old mirage packages) to ocaml < 5.

@palainp
Copy link
Member

palainp commented Aug 7, 2023

I agree, it seems ok to not restrict ocaml version here.

@hannesm
Copy link
Member Author

hannesm commented Aug 26, 2023

closing, please re-open or open a fresh issue if you think we should do something about it.

@hannesm hannesm closed this as completed Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants