Skip to content

Accept corrections for w53 test merge#34

Merged
mshinwell merged 1 commit intomshinwell:5.2-runtime-wip-mainfrom
ncik-roberts:5.2-runtime-wip-main-w53-fix
Aug 21, 2024
Merged

Accept corrections for w53 test merge#34
mshinwell merged 1 commit intomshinwell:5.2-runtime-wip-mainfrom
ncik-roberts:5.2-runtime-wip-main-w53-fix

Conversation

@ncik-roberts
Copy link
Copy Markdown

The merge of the w53 fix in oxcaml#2912 did not accept corrections to test output as the test suite wasn't building yet. This PR just accepts corrections to the test output.

The diff is unreadably large. How did I confirm that the new test output is reasonable? I checked that the only attributes that are rejected are the ones commented as (* rejected *) in the test.

I first confirmed that "accepted" doesn't show up at all in the test output.

I then ran the following two commands:

$ cat ocaml/testsuite/tests/warnings/w53.ml | grep rejected | grep -o '\[@' | wc -l
357
$ cat ocaml/testsuite/tests/warnings/w53.compilers.reference | grep misplaced-attribute | wc -l
364
  • The first command counts the number of attributes that show up on lines that have (* rejected *) comments in the source file.
  • The second command counts the number of misplaced-attribute warnings that show up in the output.

What explains the diff of 7? Let's look at the unmatched warning output:

$ cat ocaml/testsuite/tests/warnings/w53.compilers.reference | grep 'cannot appear in this context' -B 2 | grep @ | grep -v rejected
324 |     (int as ('a:value)[@error_message ""][@error_message ""]) (* reject second *)
336 |   let f1 v: ((_ : value)[@error_message ""][@error_message ""]) = v (* reject second *)
337 |   let f2 v: (('a : value)[@error_message ""][@error_message ""]) = v (* reject second *)
881 |   external y : (int64 [@tail_mod_cons]) -> (int64 [@tail_mod_cons]) =
881 |   external y : (int64 [@tail_mod_cons]) -> (int64 [@tail_mod_cons]) =
894 |   external y : (int64 [@tail_mod_cons]) -> (int64 [@tail_mod_cons]) =
894 |   external y : (int64 [@tail_mod_cons]) -> (int64 [@tail_mod_cons]) =

The "reject second" cases are missed by my first grep, and should only add 1 unused attribute to the output. So those explain 3 of the missing cases. The other 4 are explained by the tail_mod_cons cases, where the (* rejected *) comment is on a different line than the attributes.

@ncik-roberts
Copy link
Copy Markdown
Author

@ccasin Could you please review?

@mshinwell mshinwell merged commit 62218b7 into mshinwell:5.2-runtime-wip-main Aug 21, 2024
@ccasin
Copy link
Copy Markdown

ccasin commented Aug 21, 2024

LGTM

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

Successfully merging this pull request may close these issues.

3 participants