-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Publish OCaml/Unikraft packages v1.0.0 #27856
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
Conversation
|
This is very exciting, great work @shym! Quick question: you are maintaining a lot of extra-patches here; instead, why not move your musl fork over to mirage/ and publish that branch directly as the opam package with the patches applied? This is makes pinning and dev workflows significantly easier than having opam-level patch application. |
Good idea, I’ll do that.
Indeed, I admit this is quite involved at the moment 😅 |
|
I’ve updated the PR. I have:
The packages without sources are there to express dependencies so I think those errors can be ignored. |
d4426ba to
b7f2900
Compare
|
I think I’ve exhausted my bag of tricks to have the CI handle gracefully the errors when trying to install the I added a
Side note: the extensive OS/distribution coverage is a great help to get this into shape, kudos to the opam-ci people! |
|
I’ve reviewed all the CI results. All the outcomes (failures and successes) are what I expect. So I see no further improvement to make. |
shonfeder
left a comment
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.
Thank you for this exciting contribution! I just have a suggestion on how the installation failures are handed.
| ["no-known-package"] | ||
| {os-distribution = "alpine" | os-family = "suse" | os-family = "opensuse" | | ||
| os-family = "bsd" | os = "macos" | os = "cygwin" | os = "win32"} |
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.
I think the cleanest, and a more helpful way of addressing this would be to use a post-message.
Here is an example:
opam-repository/packages/conf-llvm/conf-llvm.3.4/opam
Lines 15 to 17 in d4d1aa6
| post-messages: | |
| "If you use homebrew, please build and install llvm-3.4 manually, since brew formula is not available for this version" | |
| {failure & (os = "macos" | os = "macos")} |
Do you think it would make sense to use something like that in this case?
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.
The more uniform these cases are handled, the better!
I suppose I’d better add a post-message just on {failure} to cover all cases.
Do you mean I should drop the "no-known-package" hack also? (It’s helpful for CI but might be annoying for end users).
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.
The more uniform these cases are handled, the better!
I suppose I’d better add a post-message just on {failure} to cover all cases.
Yep, this makes sense to me! Just a general note on failure to advise people why/that automated system install is not available for them would help.
Do you mean I should drop the "no-known-package" hack also? (It’s helpful for CI but might be annoying for end users).
Yea, IIUC, it should not be needed for our CI or for end users. But if you need it for your dev CI, I don't want to make things more complicated! Leaving is not a problem, IMO. But I would defer to @mseri or @raphael-proust on this point.
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.
As I was thinking about opam-CI, I updated as discussed, namely adding a post-messages field and removing the "no-known-package" hack.
(Many CI tests which were converted into SKIP thanks to the hack are back to failures.)
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.
Many CI tests which were converted into SKIP thanks to the hack are back to failures
We can address these via the appropriate x-ci-accept-failures in the future. But I don't think this is necessary currently!
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.
I would be curious to see how to set this up, as I tried to use those directives but they made no difference in the cases that failed. I had concluded that the test that the check for this field doesn’t trigger as expected at least in some configurations.
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.
the check for this field doesn’t trigger as expected at least in some configurations.
Yes, I think that's true. The logic around this is not very robust currently.
OCaml/Unikraft: an OCaml cross compiler to Unikraft backends OCaml/Unikraft is structured into many packages to allow users to build only what they need. Packages use one of two version numbers: - 0.18.0, the upstream release number of Unikraft: used for `unikraft`, `unikraft-musl` and backend packages, - 1.0.0, for packages that are more on the OCaml side. The 18 packages are as follows: - `unikraft` and `unikraft-musl`: the latest stable release of upstream sources for Unikraft and its lib-musl wrapper, with a couple of small patches to fix them for our use case. - `conf-<arch>-linux-gnu-gcc`: `conf-` packages used when targetting a different architecture. - `ocaml-unikraft-backend-<backend>-<arch>`: all the object files and headers necessary to build a unikernel for the specific `<backend>` and `<arch>` combination. - `ocaml-unikraft-option-debug`: if that package is installed, the backends will be built with debugging messages. - `ocaml-unikraft-toolchain-<arch>`: a toolchain using the `<arch>-unikraft-ocaml-` prefix; the toolchain is a set of wrapper shell scripts to add the necessary options to drive the underlying tools. - `ocaml-unikraft-<arch>`: the actual OCaml cross compilers for the given `<arch>`. - `ocaml-unikraft-default-<arch>`: simple packages that only install a `ocamlfind` toolchain named `unikraft` (so that switching between architecture do not require to rebuild the full OCaml compiler). - `ocaml-unikraft-backend-<backend>`: virtual packages to ensure that the given `<backend>` is installed for the default architecture, as set by which `ocaml-unikraft-default-<arch>` package is installed. - `ocaml-unikraft`: the virtual package to ensure one of the default compiler package is installed.
|
Sorry that this was stuck in limbo! Sounds like all the expected CI issues are expected, and we can work on improvements with coverage and/or noise reduction in the future. Thanks very much! |
OCaml/Unikraft: an OCaml cross compiler to Unikraft backends
OCaml/Unikraft is structured into many packages to allow users to build only what they need.
Packages use one of two version numbers:
unikraftand backend packages,The 15 packages are as follows:
unikraft: the upstream sources.ocaml-unikraft-backend-<backend>-<arch>: all the object files and headers necessary to build a unikernel for the specific<backend>and<arch>combination.ocaml-unikraft-option-debug: if that package is installed, the backends will be built with debugging messages.ocaml-unikraft-toolchain-<arch>: a toolchain using the<arch>-unikraft-ocaml-prefix; the toolchain is a set of wrapper shell scripts to add the necessary options to drive the underlying tools.ocaml-unikraft-<arch>: the actual OCaml cross compilers for the given<arch>.ocaml-unikraft-default-<arch>: simple packages that only install aocamlfindtoolchain namedunikraft(so that switching between architecture do not require to rebuild the full OCaml compiler).ocaml-unikraft-backend-<backend>: virtual packages to ensure that the given<backend>is installed for the default architecture, as set by whichocaml-unikraft-default-<arch>package is installed.ocaml-unikraft: the virtual package to ensure one of the default compiler package is installed.