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

merl-an loses determinism between compiler versions #25

Open
3Rafal opened this issue Jun 28, 2023 · 0 comments
Open

merl-an loses determinism between compiler versions #25

3Rafal opened this issue Jun 28, 2023 · 0 comments

Comments

@3Rafal
Copy link
Collaborator

3Rafal commented Jun 28, 2023

Found when running error-regression tests:
For merl-an error-regression -s 1 -p test.ml
given test.ml is

let x = 1

let f y = y + 3

merl-an generates different set of commands

5.0.0:

{"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:14' -filename test.ml < test.ml","success":true}
{"sample_id":0,"merlin_id":0,"cmd":"ocamlmerlin server case-analysis -start '3:10' -end '3:10' -filename test.ml < test.ml","success":true}

4.14.1:

{"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}

Diff:

   {"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:14' -filename test.ml < test.ml","success":true}
-  {"sample_id":0,"merlin_id":0,"cmd":"ocamlmerlin server case-analysis -start '3:10' -end '3:10' -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}

The difference is pretty small, but it's enough to break tests. I'm not sure if it's worth fixing this, but I'm sure that we should include it in readme/docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant