-
Notifications
You must be signed in to change notification settings - Fork 22
Miscellaneous minor changes #53
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
Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
Function available since Ocaml 4.05. Use instead of split_string if possible as more efficient (not recursive). Use split_string only if limit is provided. Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
Available since 3.11. Avoid temporary conversion. Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
@@ -53,7 +53,7 @@ module Node = struct | |||
|
|||
let replace_child node child nchild = | |||
(* this is the on-steroid version of the filter one-replace one *) | |||
let rec replace_one_in_list l = | |||
let[@tail_mod_cons] rec replace_one_in_list l = |
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.
This has is recognised from OCaml 4.14 onwards, for older versions of the compiler it's ignored, so it shouldn't cause problems
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 don't have older compiler versions at hand to check, but godbolt confirms that the attribute is ignored by OCaml 4.04 for example: https://godbolt.org/z/zKxxGoafY
Also the CI here is testing with various versions and they all pass
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.
LGTM
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, this PR LGTM too! I tested with qubes-mirage-firewall and it interacts with xenstore and other AppVMs as expected.
To me it's fine to merge, I tested the client part with qubes-mirage-firewall, and the server part seems to be good according to @edwintorok and @psafont. Is there a need for cutting a release right after the merge or is it ok to wait for further improvements? |
I think @freddy77 has some more planned changes for the client side (partial directory listing support), so there is no rush for a new release imminently, but merging this PR would be appreciated. |
CHANGES: * minor performance fixes (mirage/ocaml-xenstore#53 by freddy77) * use dune 2.0 (mirage/ocaml-xenstore#54 by lindig) * require OCaml 4.13 (mirage/ocaml-xenstore#56 by last-genius) * Add support `XS_DIRECTORY_PART` to the client (mirage/ocaml-xenstore#55 by last-genius) * Add x-maintenance-intent to opam metadata (mirage/ocaml-xenstore#57 by hannesm)
String.split_on_char
Buffer.blit
instead ofBuffer.to_bytes
+Bytes.blit
@tail_mod_cons
if possibleA bit more details on series.