Pash-Project / Pash

An Open Source reimplementation of Windows PowerShell, for Mono.
https://groups.google.com/group/pash-project
BSD 3-Clause "New" or "Revised" License
514 stars 54 forks source link

.NET Core port #422

Open ForNeVeR opened 8 years ago

ForNeVeR commented 8 years ago

I believe we should consider .NET Core as a supported runtime (just like Mono and .NET currently). After the initial .NET Core release, guys will keep asking us whether we support it or not.

So, I'm opening this issue for discussion. We'd better get someone with more insight on how do things work in .NET Core, but I'll try to make a little introduction here. I've been playing with F# on .NET Core for a couple of days.

.NET Core is a completely different runtime system with its own set of base assemblies, so you cannot execute ordinary .NET programs on it. You need to at least re-compile your programs to re-link them with the new set of base assemblies. .NET API have been changed a bit, but not so much. I guess we'll need to port our reflection stuff, but cannot say anything else at this point.

There's an obvious problem with dependencies: they also should be recompiled with the new runtime (well, it seems that you could somehow execute .NET Core programs on top of existing .NET or Mono installation, but I still cannot get how to do it, and it's still preferable to have "pure" .NET Core program). We're using Irony here. Unfortunately it doesn't seem to be maintained, so it's not likely that it'll get updates to run on .NET Core.

What could we do? Try to port Irony ourselves or get some help (probably we're not alone stuck with Irony)? Rewrite the parser from scratch? What tools could we use?

I guess F# team will port FSLEX and FSYACC to .NET Core soon (or have already done that). I think later this/next year I could (try to?) invest some considerable amount of time into rewriting and supporting parser in F#, but I need your approval guys. Maybe that'll be waste of time and you're aware of some better approach? Does anyone have experience with F# or maybe some another parsing tool? Remember, we need something that's still evolving today and likely to get .NET Core support soon.

Feel free to share your ideas about the overall state of .NET Core and any insight how we could (should not?) port our code.

JayBazuzi commented 8 years ago

We already compile Irony ourselves - when Pash adopted Irony, Irony didn't have NuGet packages and I didn't understand NuGet anyway. Maybe we can just build the whole solution on .Net Core and it will just work? (ha ha).

We don't have to stick with Irony. It was convenient at the time, but it's not a great fit - it's slow; it's opinionated in a way that doesn't suit PowerShell; it has a bunch of capabilities that aren't useful for us.

ygra commented 8 years ago

I guess .NET Core is positioned quite prominently to become the official cross-platform implementation of .NET. Mono isn't going anywhere in the meantime (and is more complete), but if we can run on Core with a moderate amount of effort it would certainly be helpful.

kilasuit commented 8 years ago

Just incase none of you have heard the PowerShell Team have a .Net Core port available at https://github.com/powershell/powershell released today

ForNeVeR commented 8 years ago

Yeah thanks for the info. Let's discuss further state of Pash in #429.