Open ForNeVeR opened 2 years ago
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
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?
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).