Cake: Investigate Roslyn Stable

Created on 20 Jul 2015  路  27Comments  路  Source: cake-build/cake

Roslyn is now 1.0.0 and officially released.

Investigate

Most helpful comment

Apparently Github decided to not give me any alerts for this :|. Confirmed with the Roslyn guys that Scripting is good for .Net Framework 6 & .Net Core. Let me know if you need any help @devlead! Looking forward to getting this on a stable roslyn, then on a cross-plat core :).

All 27 comments

@RichiCoder1 Yes, but not the scripting parts right? I read somewhere on Twitter that they will be released "later" whatever that means :smile:

Yah, I realized that myself. I think the scripting parts were deprioritized as not critical for RTM. Hopefully they're re-prioritized for post-RTM. Can use this issue to track that.

@RichiCoder1 Sounds like a good idea!

Update: https://github.com/dotnet/roslyn/issues/4110

TL;DR: scripting is a WIP for 1.1 release.

Looks like xplat support as well in 1.1. Would be nice to be able to have a single scripting engine in Cake. Thanks for the update! :smile:

It seems like Microsoft.CodeAnalysis.Scripting has now a stable release, https://www.nuget.org/packages/Microsoft.CodeAnalysis.Scripting

Would it be possible to let the experimental flag use the stable version? Or may completely switch to this version?

@stffabi yep, there are newer stable versions, but these target .NET Core. So no luck until Cake is ported to .NET Core :disappointed:

@mholo65 I thought they supported .Net Framework 4.6 too?

@RichiCoder1 me too, until I downloaded every NuGet package and noticed it contained only lib\dotnet folders (except 1.1.0-beta-something...). ScriptCS seems to also use same version (1.0.0-rc2) as Cake "Experimental" does...

They need to update their wiki then ;)
https://github.com/dotnet/roslyn/wiki/Scripting-API-Samples#supported-platforms
It reads:

Scripting APIs require desktop .NET Framework 4.6 or CoreCLR 1.0.

@devlead @RichiCoder1 Might be I don't got my facts straight. Anyhow, here's the contents of Microsoft.CodeAnalysis.CSharp.Scripting

Is this a PCL compatible with both .NET Core 1.0 and .NET Framework 4.6? Easiest would probably to just test it :smile:

image

I just did a Install-Package Microsoft.CodeAnalysis.Scripting -Version 1.2.1 on a 4.6 console app.
image
image

So seem to work. 1.2.1 license now seem more permissive so could likely actually ship with Cake.
Assemblies in bin post nuget install:
image

Could be wort pursuing as a proof of concept WIP pr.

@devlead great. And porting Cake to .NET 4.6 has which consequences?

@mholo65 It would more or less break Cake on any CI system that doesn't have .NET 4.6 installed so we should probably think about how we want to proceed with this.

We could start with a WIP pr to investigate what it would mean source code wise, this would also prepare for CoreCLR.
Mono have introduced 4.6 support, so in theory that could work there too.

@devlead A WIP sounds like a good plan!

Apparently Github decided to not give me any alerts for this :|. Confirmed with the Roslyn guys that Scripting is good for .Net Framework 6 & .Net Core. Let me know if you need any help @devlead! Looking forward to getting this on a stable roslyn, then on a cross-plat core :).

@devlead @RichiCoder1 I've created a WIP for this targeting .NET 4.6. The amount of references required is ridiculous (14 MB).

Will push these changes soon to a WIP PR.

@devlead @RichiCoder1 @mholo65 Ran the integration tests and they seem to run without problem. Downside is that the nuget package size went from 1.2 MB to 4.1 MB.

image

Does not work on Mono, but that was not a surprise :)

screen shot 2016-05-14 at 13 24 01

@patriksvensson interesting, which version of Mono? They added 4.6 support a couple of months ago, but they used to have some patches for Roslyn wonder if that has made into the 2.0.0-beta1 or if a newer version of Mono sorts it.

@devlead The latest alpha, version 4.4.2 (I think).

Would be cool to also have a WIP for .NET Core 1.0 as RC2 is just around the corner.

@patriksvensson @mholo65 Cake.CoreCLR sorts this?

@devlead yep! But to support it in "full CLR" Cake, we need to target .NET 4.6.

@mholo65 yeah that's the natural path, how's the 4.6 support in Mono nowadays? More specific wonder if latest Roslyn is supported.

Closing since #1645 been merged to develop.

Was this page helpful?
0 / 5 - 0 ratings