PascalABC.NET.SDK icon indicating copy to clipboard operation
PascalABC.NET.SDK copied to clipboard

Support platforms other than Windows

Open ForNeVeR opened this issue 3 years ago • 2 comments
trafficstars

Right now, we are trying to run the pabcnetc.exe directly, which will only work on platforms that support this executable (Windows mainly).

We should support Mono on other platforms as well.

(Unfortunately, the story about the compiler which highly depends on System.Reflection.Emit on modern .NET runtimes is very complex, and we'll unlikely be able to run it, say, on .NET 6 soon).

ForNeVeR avatar Sep 11 '22 19:09 ForNeVeR

Isn’t first step should be just migrate pascalabc project files to more modern msbuild. I think that can improve ability to experiment with running on modern Net

kant2002 avatar Sep 11 '22 20:09 kant2002

No, it's not that easy. PascalABC.NET compiler is a heavy user of reflection and Reflection.Emit. It saves the assembly by calling AssemblyBuilder.Save, which is still broken.

But there's an interesting thing. While looking for its usages of AssemblyBuilder.Save, I found that the compiler has some coe to check IsDotnet5(): https://github.com/pascalabcnet/pascalabcnet/blob/673e3882c9a7bd02be54ef122e99d50c700298ce/NETGenerator/NETGenerator.cs#L459-L468

So maybe the situation is better than I thought? And cross-platform targets are supported?

ForNeVeR avatar Sep 11 '22 20:09 ForNeVeR