mirage / mirage-qubes

Mirage support for writing QubesOS AppVM unikernels
BSD 2-Clause "Simplified" License
63 stars 11 forks source link

move starts_with from Utils to DB -- where it is used #58

Closed hannesm closed 3 years ago

hannesm commented 3 years ago

simplify and move set_fixed_string into single user in Formats

shrink the Utils module, avoid opening it in Formats and GUI (where it is not used much).

this is on the road to address #12

hannesm commented 3 years ago

ok, that was my goal in the end. I'll wait for #57 to be merged, and rebase and revise this PR. I'm not eager to introduce a dependency (on astrng) just for prefix -- so I suggest to leave it in here until we drop < 4.12 support.

thanks for your review.

hannesm commented 3 years ago

I force-pushed to this branch -- the Utils module is gone now.

hannesm commented 3 years ago

thanks @talex5, fixed in a subsequent commit. I just dropped the Lwt.fail call (due to Lwt.fail documentation: Whenever possible, it is recommended to use [raise exn] instead, as [raise] captures a backtrace, while [Lwt.fail] does not. If you call [raise exn] in a callback that is expected by Lwt to return a promise, Lwt will automatically wrap [exn] in a rejected promise, but the backtrace will have been recorded by the OCaml runtime. Use [Lwt.fail] only when you specifically want to create a rejected promise, to pass to another function, or store in a data structure.)

talex5 commented 3 years ago

Thanks!