[m-rev.] systematic problem with tests/valid* for C#

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Oct 2 19:00:47 AEDT 2023


The attached diff fixes one problem for one test case in C# grade,
but another, more systematic problem still prevents it, and other tests
in valid/valid_seq from passing. This is that

- the tests in these directories check whether the compiler can handle
  each test case by trying to build the target language file for the selected
  grade, but

- the target suffix selected for C# grades, .cs, is taken by the mmake system
  as "build all the .c (NOT .cs) files".

This then fails, because the .opt files in stage 2 contain C# foreign procs,
which the compiler now complains about as a symptom of a grade mismatch,
which is a correct diagnosis for a compiler that is asked to build a .c (NOT .cs) file.

We have long had .all_cs as a synonym for .cs for this exact reason
(just as we have .all_os as a synonym for .os), but stopped short of
switching the meaning of a target with a .cs suffix to mean a C# source file.

Would anyone object to making that step now? Specifically, I propose that
both mmake and mmc --make should have the rule that ONLY the suffix  ".all_Xs"
means "all .X files".

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.cs
Type: application/octet-stream
Size: 944 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20231002/01a8abba/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.cs
Type: application/octet-stream
Size: 7592 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20231002/01a8abba/attachment-0003.obj>


More information about the reviews mailing list