[m-rev.] for review: delete old code for invoking the C# compiler

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun Aug 17 19:20:28 AEST 2025



On Sun, 17 Aug 2025 15:10:55 +1000, Julien Fischer <jfischer at opturion.com> wrote:
> Delete old code for invoking the C# compiler.
> 
> There are currently two separate predicates used for invoking the C# compiler.
> One is in make.module_target and is used to create executables and libraries
> in the C# grade.

I see no code to compile C# code in make.module_target.m. I see only an
invocation of a predicate in link_target_code.m used to achieve compilation;
the code itself is in link_target_code.m.

> Delete the code for invoking the C# compiler in compile_target_code, since it
> has no users and is almost certainly affected by bitrot at this point.

Reword this to specify that it has no users *after* this diff; it had some before the diff.

> compiler/compile_target_code.m:
>      Delete the compile_csharp_file/8 predicate. It is unused.

I would leave in its place a pointer to a place in either make.module_target.m
or link_target_code.m that explains what we do instead.

> @@ -506,6 +506,11 @@ build_object_code(ProgressStream, ErrorStream,
> Globals, Target, PIC,
>          % XXX This code uses infrastructure we built for *linking several
>          % files* as a way to *compile just one file*. It would be nice
>          % to know the reasoning behind that decision.
> +        %
> +        % The reason for this is that C# has no direct analog of object
> +        % or class files, so we have to fake the effect of building an
> +        % object file by creating a .dll - juliensf.
> +        %

Thanks for that.

The diff is otherwise fine.

Zoltan.





More information about the reviews mailing list