JetBrains / Nitra

Public Nitra repository
Other
554 stars 43 forks source link

Does Nitra currently support PCL? Will it in future? #7

Open dsaf opened 10 years ago

dsaf commented 10 years ago

Hi,

It would be great if single parser DLL could easily be re-used across different platforms:

http://developer.xamarin.com/guides/cross-platform/application_fundamentals/pcl/introduction_to_portable_class_libraries

http://msdn.microsoft.com/en-us/library/gg597391(v=vs.110).aspx

Will PCL DLL be supported as an output target of Nitra or at least raw CS files that could be adjusted manually? There is no mention of target platform configuration on this page at the moment: http://confluence.jetbrains.com/display/Nitra/Using+nitra.exe

Thank you.

kekekeks commented 10 years ago

It's impossible to generate PCL using System.Reflection.Emit since the generated code is bound to the current framework's mscorlib. Guys from Mono are using IKVM.Reflection.Emit to avoid this issue in their C# compiler.

dsaf commented 10 years ago

Do you mean it will not happen, or that it can be done by applying Mono approach? What about spitting out raw C# files that I could compile myself?

kekekeks commented 10 years ago

Do you mean it will not happen, or that it can be done by applying Mono approach?

It can be done but will take a significant amount of time. There was an effort to switch to IKVM in Nemerle (Nitra is based on Nemerle), but it was never finished.

What about spitting out raw C# files that I could compile myself?

AFAIK, there are no any "raw C# files", Nitra just uses it's own MSIL generation infrastructure based on Nemerle which uses System.Reflection.Emit.

However, you may try to use this hack for postprocessing resulting assemblies.

dsaf commented 10 years ago

Thank you for suggestion, but I was really hoping for an out-of-box workflow.

Is there any kind of future cross-platform support plan whatsoever?

Thanks.