Skip to content

Commit

Permalink
Remove merlin_id from error-regression output (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
3Rafal authored Jun 29, 2023
1 parent 3b7fc46 commit 33d72b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
9 changes: 2 additions & 7 deletions lib/backend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,7 @@ module Benchmark_summary = struct
end

module Error_regression_result = struct
type t = {
sample_id : int;
merlin_id : int;
cmd : Merlin.Cmd.t;
success : bool;
}
type t = { sample_id : int; cmd : Merlin.Cmd.t; success : bool }
[@@deriving yojson_of]

(* FIXME: print the sample repeats in a separate json field *)
Expand Down Expand Up @@ -395,7 +390,7 @@ module Error_regression = struct
~query_type:_ tables =
let resp =
let success = List.for_all Merlin.Response.is_successful responses in
{ Error_regression_result.sample_id = id; success; cmd; merlin_id }
{ Error_regression_result.sample_id = id; success; cmd }
in
let cmd = { Command.sample_id = id; cmd; merlin_id } in
tables.results <- resp :: tables.results;
Expand Down
20 changes: 10 additions & 10 deletions test/error_regression.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ TODO stderr:
$ merl-an error-regression -s 1 -p test.ml,test1.ml --data=test-data 2>/dev/null

$ cat test-data/results.json
{"sample_id":13,"merlin_id":0,"cmd":"ocamlmerlin server errors -filename test1.ml < test1.ml","success":true}
{"sample_id":12,"merlin_id":0,"cmd":" ocamlmerlin server locate -look-for ml -position '3:12' -index 0 -filename test1.ml < test1.ml","success":true}
{"sample_id":9,"merlin_id":0,"cmd":"ocamlmerlin server occurrences -identifier-at '3:12' -filename test1.ml < test1.ml","success":true}
{"sample_id":8,"merlin_id":0,"cmd":"ocamlmerlin server type-enclosing -position '1:8' -filename test1.ml < test1.ml","success":true}
{"sample_id":7,"merlin_id":0,"cmd":"ocamlmerlin server case-analysis -start '1:8' -end '1:8' -filename test1.ml < test1.ml","success":true}
{"sample_id":6,"merlin_id":0,"cmd":"ocamlmerlin server errors -filename test.ml < test.ml","success":true}
{"sample_id":5,"merlin_id":0,"cmd":" ocamlmerlin server locate -look-for ml -position '3:12' -index 0 -filename test.ml < test.ml","success":true}
{"sample_id":2,"merlin_id":0,"cmd":"ocamlmerlin server occurrences -identifier-at '3:12' -filename test.ml < test.ml","success":true}
{"sample_id":1,"merlin_id":0,"cmd":"ocamlmerlin server type-enclosing -position '3:12' -filename test.ml < test.ml","success":true}
{"sample_id":0,"merlin_id":0,"cmd":"ocamlmerlin server case-analysis -start '3:14' -end '3:14' -filename test.ml < test.ml","success":true}
{"sample_id":13,"cmd":"ocamlmerlin server errors -filename test1.ml < test1.ml","success":true}
{"sample_id":12,"cmd":" ocamlmerlin server locate -look-for ml -position '3:12' -index 0 -filename test1.ml < test1.ml","success":true}
{"sample_id":9,"cmd":"ocamlmerlin server occurrences -identifier-at '3:12' -filename test1.ml < test1.ml","success":true}
{"sample_id":8,"cmd":"ocamlmerlin server type-enclosing -position '1:8' -filename test1.ml < test1.ml","success":true}
{"sample_id":7,"cmd":"ocamlmerlin server case-analysis -start '1:8' -end '1:8' -filename test1.ml < test1.ml","success":true}
{"sample_id":6,"cmd":"ocamlmerlin server errors -filename test.ml < test.ml","success":true}
{"sample_id":5,"cmd":" ocamlmerlin server locate -look-for ml -position '3:12' -index 0 -filename test.ml < test.ml","success":true}
{"sample_id":2,"cmd":"ocamlmerlin server occurrences -identifier-at '3:12' -filename test.ml < test.ml","success":true}
{"sample_id":1,"cmd":"ocamlmerlin server type-enclosing -position '3:12' -filename test.ml < test.ml","success":true}
{"sample_id":0,"cmd":"ocamlmerlin server case-analysis -start '3:14' -end '3:14' -filename test.ml < test.ml","success":true}

0 comments on commit 33d72b9

Please sign in to comment.