The Microsoft Languages team is now using the “Roslyn” edition of the VB and C# compilers for daily work. When can we expect to see this cloud compiler for ourselves?
Roslyn is the codename for Microsoft’s major redesign of the C# and Visual Basic compilers that was first mentioned at the Build developer conference in 2011. At the time, it was described as providing a “compiler as a service", but since the initial announcement the project has been kept more or less under wraps.
That’s now changed, with a blog post by Matt Gertz, VS Managed Languages Development Manager, saying that the Visual Studio organization has turned on Roslyn and that everyone in the VS organization is using Roslyn in their daily work with the daily builds of VS being compiled using Roslyn.
Gertz tells us:
“Roslyn introduces a far more open model for compilation, which will allow developers to reach inside the compiler itself and see the world (or, at least, solutions and projects) as it does; this, in turn, will lead to far richer IDE and diagnostics being able to be developed at considerably reduced effort and cost.”
The new compilers have been completely rewritten in managed Visual Basic and C#, changing over from the C++ used in earlier versions. The change means the compilers can act as services that can be consumed by apps written in C# or Visual Basic.
Roslyn exposes three collections of APIs – the Compiler APIs, the Services APIs, and the Editor Services APIs.
The compiler API provides the information exposed at each phase of the compiler pipeline, both syntactic and semantic. A set of scripting APIs are exposed in this layer representing a runtime execution context for C# or Visual Basic snippets of code.
The Services APIs can be used for code analysis, offering direct access to the compiler layer object models without needing to parse files, configure options or manage project to project dependencies.
The Editor Services APIs gives access to Visual Studio IDE features such as IntelliSense, refactorings, and code formatting features. It also contains the Editor Services APIs, so if you wanted to extend Visual Studio you could.
Prior to the move to Roslyn, the team compiled and assessed over 60,000 projects, large and small, both internal and external to Microsoft (including flagship Microsoft products), fixed whatever blocking bugs were found as a result of that and then, at the end of October, switched the entire division to using Roslyn bits. According to Gertz, since the switch no major issues have been encountered.
So when will the rest of us get to share these benefits?
While Gertz is non-committal about shipping plans, he says that the team is:
“actively working through the details on starting up regular previews again. The code is in a really nice state these days, and we can hardly wait to show you what we’ve been up to as we’ve been solidifying Roslyn!”
For the moment if you want to try out Roslyn then you will have to use the 2012 CTP.
Given that one of the big problems in the development of Visual Studio was the use of WPF for the user interface, it will be interesting to see how the C++ community in particular react to a managed code compiler. The claim was that WPF made Visual Studio slow, so much so that many users didn't upgrade. Will there be a similar problem with Rosyln?
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.