8 ms·
Announcing the new Roslyn-powered .NET Framework Reference Source
- d0 13y agoI know this is getting a lot of fanfare but let us apply four major costly problems I'm having with the CLR/Framework at the moment: 1. Microsoft.Build.Tasks (the bit that has been screwing with me all day) contains static sealed classes with nothing in them. I thought this was a reference source rather than a source of empty interfaces and empty implementations? Still having to resort to reflector to find out what is going on. Problem not solved. 2. So, ReaderWriterLockSlim has a bug in it with respect to low CPU allocation in virtual machines where 20 concurrent threads accessing a locked object at the point of write cause the spin lock in the implementation to thrash and up blows a race condition taking out the process. I can actually see where the bug is now. Where do I submit this bug, bear in mind I can actually recreate it? I phoned up our MSDN rep - they said raise it on Connect. There isn't a place for it on Connect. Phone up generic paid support, three levels of technical staff bounce me around for a week. as a PAID UP GOLD PARTNER, this sucks. If you open your source, track bugs openly too. Problem not solved. 3. This is only the core framework. We really need the entire lot including all dependencies and external tools. There aren't any symbols on symbol server or this for VSTO or Sharepoint for example? What we do get is another black box somewhere in the system that we can't inspect or poke inside even though it's a wrapper for a COM API or a product API. Problem not solved. 4. Does Rosyln/next MSBuild support parallel compilation? Being tied to a single compilation core on a VS2013 build means we have 8 core Xeons sitting there doing nothing. Our only hope of speeding this up is cranking up to high end i7 to get one core with crazy integer performance. 20 minute sit down compiles are too much these days. http://xkcd.com/303/ http://xkcd.com/303/ I understand this is progress and Roslyn is cool and all that, but what does it deliver for every day users of the CLR/Framework? It doesn't really make our day much easier. In fact stuff that really improves developers' lives has stopped appearing completely and instead we get tedious reengineering projects and new features designed only to lock us further into the system (VS online+sign in anyone?) Also how does this compare to say LLVM/Clang? I imagine this semantic compilation stuff will make some static analysis stuff easier and stamp on the toes of Coverity etc but that's about it. Edit: sorry if this is purely a content-free rant and unpopular but after 12 years of this crap from Microsoft, I want to see new wheels, not the same ones reinvented and remarketed. Developers are lapping up this crap constantly as if it's as good as it gets. We need some REAL CHANGE towards openness and consistency and to ask the community and users what they want rather than telling us what we need.
- _stephan 13y agoYour support experience sounds really bad. I'd file the bug here: http://connect.microsoft.com/VisualStudio http://connect.microsoft.com/VisualStudio (which despite the name is also the right place to report library issues)
- d0 13y agoIt's always been bad. I'm the chief technical contact for a system with 50 developers and about 11,500 users. We've raised 20 cases which we couldn't work around and had one officially released solution (bug in IE11). We either have to work around or push a registry fix at great cost to thousands of users worldwide as an out of band patch that we package ourself. For example there was a regression in ClickOnce with download prompting between IE8 and IE9 due ot the download bar throwing away some compatibility settings. Overnight, when IE9 became mandatory in Windows Update, we had 2000 users down. We got all the users to roll back to IE8. It took 6 months for a registry fix to be sent out to us from a 3rd line support executive after being on the phone daily about it. This is still not fixed in IE11. We've rewritten all our ClickOnce launch points to work around the regression. This took one developer 2 months of work. The regression appeared in the RTM IE9, not the previews. As for that being the correct place, it's obviously not as the issue was raised there, marked private and closed as not reproducible despite test cases being issued. Not a single contact back from Microsoft bar "closing as can't reproduce". Our rep suggested contacting another support team. Even they aren't helpful. I need a new job, writing C on Unix...
- _stephan 13y agoLooks like Microsoft has some deep structural problems with its developer support. Let's hope the right persons at Microsoft see this thread.
- voltagex_ 13y agoI have a 100% reproducible (hang/freeze) bug in Visual Studio, with crash dump and everything. It's in 2012, so it'll probably never be fixed. The one developer who responded ignored the information I provided, anyway. I can no longer find the bug on the dashboard.
- _random_ 13y agoRoslyn changes are starting to kick in - 2014/15 should be pretty exciting! "This means that folks like the Mono team could look at this Reference Source and not have to gouge their eyes out afterwards. " Very reassuring as well.
- MichaelGG 13y agoThe reference source license doesn't allow any use but reference. Does that help Mono? Wouldn't the possible pollution still mean someone that's seen the source can't contribute to Mono? (I had the private shared source access in 2004; AFAIK Mono would still ban me from contributing.)
- Touche 13y agoCan anyone explain the benefits of a "compiler as a service"?
- dmck 13y agoMainly for extension authors and people writing tools that interact with source code. Having a "compiler as a service" allows you to generate data structures and query the structure of the source code you are working with without the need for writing your own parser. For example, you could use the "compiler as a service" to create a semantic model from source code and then query it for "all classes that contain a public method that accept an int and return a bool". This might sound trivial, but using a tool like Roslyn to do this is much easier than writing a parser that handles a language and then doing the same thing.
- lmkg 13y agoTo build on this: 1. It's nice to have the same view of the code that your compiler has. This matters less for C# than it would for C++, but it's nice to know you handle the edge cases in a consistent fashion. 2. Invalid code. Since Rosalyn is designed for being used in VS while you're in the middle of typing, it has advanced functionality for handling incomplete or erroneous code. If building your own parser for valid code is hard, building a parser that also gracefully handles half-finished lines is an order of magnitude harder. And having it handle half-lines in a fashion consistent with how VS handles it is another order of magnitude.
- Scuds 13y agoAs far as visibility to the end user: For those of us using something like Resharper, there won't be any digression between errors reported by Resharper and errors being reported by the compiler. This also means that the general bar for building code analysis tools has been lowered by quite a bit
- Locke1689 13y agoThe two parent's answers are completely correct.
- nawitus 13y agoI wonder why they don't just publish the source repository on the web.
- jameshart 13y agoAs what, a zip file or something? Good idea. http://referencesource-beta.microsoft.com/download.html http://referencesource-beta.microsoft.com/download.html
- amaks 13y agogit repository would be better.
- shanselman 13y agoBaby steps.
- breischl 13y agoMy hunch is that they use some internal server and don't want to expose it to the world. They could copy it somewhere, but if you're not going to take contributions then why bother? Also, their code explorer is far and away better than trying to spelunk through a Git repository looking for that one file you want to read. So I think it's actually an improvement for when you just want to look at a few files rather than download everything.
- shanselman 13y agoWe also have a ZIP download.
- nawitus 13y ago>My hunch is that they use some internal server and don't want to expose it to the world. They could copy it somewhere, but if you're not going to take contributions then why bother? Ah. They should want to expose it to the world and take contributions.
- codeulike 13y agoRoslyn sounds pretty cool. For the record, did Microsoft originate the 'compiler as service' idea or did it originate somewhere else?
- keithwarren 13y agoMono has had compiler as a service for quite some time now
- xanadohnt 13y agoThey had the implementation, yes. But the idea predates Mono's implementation. I can't find any references offhand but I do believe Roslyn inspired the Mono team. Roslyn has been in development for a very long time.
- amaks 13y agoRoslyn was announced several months after Mono has created their compiler as a service implementation. Having said that, clang/llvm was out there for some time already. So yes, the idea predates Mono for quite some time:-)
- rossy 13y agoIt looks like there are still big censored parts: http://referencesource-beta.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Window.cs#461 http://referencesource-beta.microsoft.com/#PresentationFrame... One of the first things I had to do for my last job was subclass Window to support custom borders (Zune Player/VS2012/Office 2013 style.) I took a peek at the reference source, and I couldn't help but think the missing bits were the juicy bits, workarounds for window manager bugs or insights into how it does things.
- shanselman 13y agoNo, we're NOT intentionally censoring anything. This looks like a bug in the source processing. We'll take a look. If you see a munged file, report it with the feedback link. Sometimes regex's go bad and we can fix them.
- rossy 13y agoThat's good to hear! I only guessed the missing parts were censored because a lot of them came after comments that implied the following code was security critical, like here: http://referencesource-beta.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Window.cs#2313 http://referencesource-beta.microsoft.com/#PresentationFrame... I apologise if this isn't the case, and I'll definitely use the feedback link if this issue comes up again.