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
Behavior of jobs without dependencies #1426
Comments
Hi @reynir and @PizieDust for finding this :) I'm not sure if this is a plausible path to track this issue but looking in I then tried to un-inline it but, as it's no longer a function, the compiler doesn't let me to do that :/. I'm now at the point where I've added a single unit to the |
Thank you for looking into this! When I was going through mirage-skeleton and playing with mirage with @PizieDust my intuition was that zero device jobs would be a special case with a unit argument. I'm not sure if others share that intuition. On the other hand it can seem inconsistent that it's special cased. |
Another path is to error out (at |
This ensures that toplevel expressions in the unikernels are properly evaluated. Fixes mirage#873 mirage#1426
* Fail if there are jobs registered without any arguments. This ensures that toplevel expressions in the unikernels are properly evaluated. Fixes #873 #1426 * address @palainp review comments * simplify 'Impl.app_has_no_arguments', as proposed by @reynir * fix app_has_no_arguments again (thx @palainp @reynir)
fixed by #1428 |
… (4.4.0) CHANGES: - Fail configure if jobs without arguments are present (fixes mirage/mirage#873 mirage/mirage#1426, mirage/mirage#1428 @hannesm) - mirage-runtime & functoria-runtime: remove fmt dependency (mirage/mirage#1417 @hannesm) - Fix tests on macOS (mirage/mirage#1425 @samoht) - Adapt to happy-eyeballs 0.6.0 release (mirage/mirage#1427 @hannesm) - Adapt to logs-syslog 0.4.0 release (mirage/mirage#1424 @hannesm) - Adapt to docteur 0.0.6 release (mirage/mirage#1419 @dinosaure) - Upgrade tests to cmdliner 1.2.0 (mirage/mirage#1418 @hannesm) - Fail if jobs without arguments are registered (reported mirage/mirage#873 @kit-ty-kate mirage/mirage#1426 @reynir @PizieDust, fixed mirage/mirage#1428 @hannesm) - Console is marked as deprecated (mirage/mirage#1429 @hannesm) - Tracing has been removed, since it was not used anymore and not supported with solo5-xen-pvh (mirage/mirage#1430 @hannesm)
… (4.4.0) CHANGES: - Fail configure if jobs without arguments are present (fixes mirage/mirage#873 mirage/mirage#1426, mirage/mirage#1428 @hannesm) - mirage-runtime & functoria-runtime: remove fmt dependency (mirage/mirage#1417 @hannesm) - Fix tests on macOS (mirage/mirage#1425 @samoht) - Adapt to happy-eyeballs 0.6.0 release (mirage/mirage#1427 @hannesm) - Adapt to logs-syslog 0.4.0 release (mirage/mirage#1424 @hannesm) - Adapt to docteur 0.0.6 release (mirage/mirage#1419 @dinosaure) - Upgrade tests to cmdliner 1.2.0 (mirage/mirage#1418 @hannesm) - Fail if jobs without arguments are registered (reported mirage/mirage#873 @kit-ty-kate mirage/mirage#1426 @reynir @PizieDust, fixed mirage/mirage#1428 @hannesm) - Console is marked as deprecated (mirage/mirage#1429 @hannesm) - Tracing has been removed, since it was not used anymore and not supported with solo5-xen-pvh (mirage/mirage#1430 @hannesm)
… (4.4.0) CHANGES: - Fail configure if jobs without arguments are present (fixes mirage/mirage#873 mirage/mirage#1426, mirage/mirage#1428 @hannesm) - mirage-runtime & functoria-runtime: remove fmt dependency (mirage/mirage#1417 @hannesm) - Fix tests on macOS (mirage/mirage#1425 @samoht) - Adapt to happy-eyeballs 0.6.0 release (mirage/mirage#1427 @hannesm) - Adapt to logs-syslog 0.4.0 release (mirage/mirage#1424 @hannesm) - Adapt to docteur 0.0.6 release (mirage/mirage#1419 @dinosaure) - Upgrade tests to cmdliner 1.2.0 (mirage/mirage#1418 @hannesm) - Fail if jobs without arguments are registered (reported mirage/mirage#873 @kit-ty-kate mirage/mirage#1426 @reynir @PizieDust, fixed mirage/mirage#1428 @hannesm and mirage/mirage#1431 @reynir) - Console is marked as deprecated (mirage/mirage#1429 @hannesm) - Tracing has been removed, since it was not used anymore and not supported with solo5-xen-pvh (mirage/mirage#1430 @hannesm)
In the following code we have a unikernel with a job that does not depend on any devices, but logs a message.
config.ml
:unikernel.ml
:This successfully compiles and runs, but on the unix target this does not print anything to the console. My suspicion is the log reporter is not set up before
Unikernel.Hello.start
is evaluated and therefore nothing is printed.Then my idea was to suspend the computation with a dummy/null/unit device. It was not very clear, and I had to consult the source code, but I found that I could use
Mirage.noop
inconfig.ml
:And in
unikernel.ml
:I guess for the first code we can't do much about the evaluation order(??) to ensure the log reporter is registered first.
My question then is what is a job? The documentation says a "main task" (but we can have a list of them!?). Should we have a unit typ and unit impl? Can we chain jobs like this?
This was discovered with @PizieDust.
The text was updated successfully, but these errors were encountered: