The current CLI is annoying because you can't just prefix the command line with magic-trace run, you have to insert of -- in between the prog and the args.
I didn't actually run the result, because I get a number of type errors. I fixed enough to know my code types but not everything. Example of what I had to fix:
diff --git a/src/for_range.ml b/src/for_range.ml
index 5ddf0b0fff...4181efe477 100644
--- a/src/for_range.ml
+++ b/src/for_range.ml
@@ -21,7 +21,7 @@
let range_hit_times ~decode_events ~range_symbols =
let open Deferred.Or_error.Let_syntax in
let%bind { Decode_result.events; _ } = decode_events () in
- Deferred.List.map events ~f:(fun events ->
+ Deferred.List.map events ~how:`Sequential ~f:(fun events ->
let { Trace_filter.start_symbol; stop_symbol } = range_symbols in
let is_start symbol = String.(Symbol.display_name symbol = start_symbol) in
let is_stop symbol = String.(Symbol.display_name symbol = stop_symbol) in
instead of
magic-trace run prog -- args
.The current CLI is annoying because you can't just prefix the command line with
magic-trace run
, you have to insert of--
in between the prog and the args.I didn't actually run the result, because I get a number of type errors. I fixed enough to know my code types but not everything. Example of what I had to fix: