Skip to content
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

Remove merlin_id from error-regression output #29

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}