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

fix opam-monorepo issue with Ocaml5+ #1409

Merged
merged 2 commits into from Mar 19, 2023

Conversation

palainp
Copy link
Member

@palainp palainp commented Mar 12, 2023

Dear developers,

This PR should solve tarides/opam-monorepo#340 and permits to compile mirage unikernels with Ocaml5+.

The underlying issue was the ocaml package marked as opam-provided and thus removed from dependencies at https://github.com/tarides/opam-monorepo/blob/9cc963ce7bc91592a301feca1e2238bc17448bd8/lib/opam_solve.ml#L114 (This can be seen inside the solver: ocaml-opam/opam-0install-solver#47). Therefore, as https://github.com/ocaml/opam-repository/blob/master/packages/base-domains/base-domains.base/opam have a dependency list which contains ocaml OR ocaml-variants, leave the solver only with ocaml-variants if we remove ocaml.

For the time being I moved ocaml to the Monorepo scope, this is why it now appears as monorepo in the test files, but unsure if that the best move, comments are more than welcome!

@hannesm
Copy link
Member

hannesm commented Mar 12, 2023

Thanks for the investigations. What about removing ocaml dependency from the generated opam file completely (since e.g. mirage-runtime depends on it, we will have an implicit dependency on it anyways) -- since we use ocaml-solo5 for cross-compilation (when choosing a solo5 target), there's not really a need for the ocaml dependency anyways (and we don't quite need it in the monorepo).

What do others think? I'm not too knowledgeable about the opem-monorepo and 0install-solver stuff.

@palainp
Copy link
Member Author

palainp commented Mar 12, 2023

Thanks for your reply @hannesm!
To me your last argument with the cross-compilation wins all (in the future cross-compilation may also be used for other targets)!

I'll add a commit to remove ocaml from the dependecies, so far I managed to compile q-m-f with success.

@hannesm
Copy link
Member

hannesm commented Mar 19, 2023

great, thanks

@hannesm hannesm merged commit eb329ce into mirage:main Mar 19, 2023
1 check passed
hannesm added a commit to hannesm/opam-repository that referenced this pull request Mar 20, 2023
… (4.3.5)

CHANGES:

#### Changed
- Remove OCaml dependency to allow OCaml 5 being chosen (mirage/mirage#1409 @palainp)
- Disallow empty key names (mirage/mirage#1407 @reynir)
- Allow tls-mirage 0.17 (mirage/mirage#1405 @hannesm)
- Allow tcpip 8.0 (mirage/mirage#1410 @hannesm)
- Fix typo in generated Makefile (mirage/mirage#1406 @hannesm)
@palainp palainp deleted the fix-opam-monorepo-and-Ocaml5-scripts branch April 8, 2023 16:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants