πŸ“œ ⬆️ ⬇️

β€œRoslyn is still a very raw technology” - an interview with Sergey Shkredov, the head of .NET-direction in JetBrains

Hi, this is again No slides . I am Alexey Fedorov, and this time Sergey Shkredov , the head of the whole .NET-direction in the JetBrains company, visited me.



With Sergey we said:

')
Here's a video



Under the cut - text version of the interview.



About new releases ReSharer and Update Rate


β€”Sergey, you recently had a big release, even two.

- Yes.

- Can you tell me a little about what is new in your new ReSharper? So, very short. And, actually, why were there two releases at once?

- In the previous year, we made three big releases - ReSharper 9.1, 9.2 and 10.0. And this year we have taken such a pace for ourselves - to make releases every four months, and in each release not to hide features, release everything as soon as possible. This better corresponds to how Visual Studio develops - some new events take place there all the time. And from this point of view, release 10.0 was not much different in number of features from release 9.2. The only thing that we had a strict limitation on this release: we, along with the release of all products, changed the licensing system of all our IDEs, so the release date was fixed long before this release. Actually, because of the fixed release date, it turned out two.

- That is, it was a bugfix?

- Yes, the bugfix release, which came out two weeks after 10.0.

- A lot of bugs fixed?

- A lot, about a hundred. Mostly, of course, users complained about Unit Testing and bad rezolving UWP applications.

- Well, now users have calmed down? Everything is good?

- Now it is. In fact, you should not look at what is being written on Twitter, but at the update rate (the percentage of people who switched to the new version), it is two times better than it was for ReSharper 9. That is, in the first three weeks of existence ReSharper 10 on him proapditilos twice as many people as a year ago.

- Do a lot of people use your old versions according to your data?

-I think no. That is, by the time of release of the next version, about 30% use the next-to-last version, and 70% of people are already sitting on the new one. And ready to go to the next, the newest version.

- So now there are 30% who use ReSharper 8?

- Yes.

- Clear. And you somehow tried to communicate with them, to understand why they do not want to go?

- I think this is the normal distribution of such developer activity. And this has little to do with any intra-food reasons.

About the cunning scheme of subscriptions and licenses


- Old license - was it in time or was it in version? I could, having that license, upgrade for free?

- Somewhere around two or three years ago, we began to sell subscriptions, which allowed us to upgrade to any version during the year. You buy, and during the year you have all the versions that we release, regardless of how we call them. Thus, we got rid of versioning, which is, it allowed us to release more frequent releases without fear that we would not get a sufficient Upgrade Rate on the major version. Well, for commercial users, we still had perpetual licenses without a subscription to updates. Now such licenses are already gone. I can, of course, comment on the new subscription scheme.

- Yes, tell me, please. Everything has changed once again, they have written and talked a lot about it. You can summarize what happened in the end. It seems to me that this will not be superfluous for our viewers.

- IDE is a product that develops with the market, together with technology, together with our users. It develops one big avalanche. As a company, of course, we would like all users to have the opportunity to use the latest version of our product, and that licenses are not a restriction along the way.

Accordingly, when we understood this, we entered subscriptions. Subscriptions are good for everyone, but a subscription is a thing that you must buy for yourself. That is, you buy yourself a perpetual license and a subscription to it. We did not immediately come to this. We have actually divided the subscription fee for the year ahead, and the perpetual-license fee.

Our first version of the subscription scheme was this: you buy a license for a year, and after a year everything is taken from you. And we, of course, met a lot of negative feedback about this. I think it is a great merit of our marketers, our CEOs, that among all this feedback we were able to understand what the users care about in this particular situation. And users are concerned about the lack of guarantees that they will be able to continue using the product.

For example, there were companies that explicitly wrote to us about the fact that their budget was approved, for example, by the United States Congress. And if he does not approve the budget for updating the version, we just next year will be left without a product. This is the most revealing, I think, story that helped to understand that you need to leave a perpetual license.

Now you buy from us a year of subscription. During this year, you can decide that you want to upgrade. You update and use, and pay later, after a year, by renewing this subscription. Thus, when you buy a version - you buy it for this particular point in time without any possibility to upgrade to the next one. But you can postpone to purchase additional updates for the version that will be released during this year.

- If you do not buy, what happens?

- You will have to use the version you bought in a year.

β€”That is, there is a rollback to the version that is relevant at the time of purchase?

-Yes. It can be considered as a rollback, but it can be considered as the fact that you make a decision within a year that β€œI want a new one”. And in this case you pay in a year, when you renew your subscription.

- Listen, this scheme is not so simple. Have you taken it from someone or have you come up with it? Does anyone else on the market work on this principle?

- Adobe. But there the story is easier, of course. We listen to users a lot, and because of this, our decisions sometimes become more difficult.

- Okay, well, there is a rather unique story.

β€œI can give you more examples.” Two days ago, Microsoft switched to the same scheme.

- Interesting.

- Absolutely the same. And on this subject there was not a single big post on the Internet.

- And how did it happen? Why were there discussions in your case?

- We are a company that works more with the community. And even when we entered subscriptions optionally for commercial users and non-optionally for our personnel, we received a lot of feedback.

β€”So, can we say that your product management lives on feedback?

- Yes, to a large extent.

About the difficult relationship with Microsoft


- And what is your general relationship with Microsoft? I myself am a person from the world of Java, and there for quite a long time, already ten years ago, the platform is more or less open. Talking with the guys from JetBrains, I realized that they, in principle, are well aware of what is happening inside the Java platform itself and can at any time look at any complex code, figure it out, even get something somewhere.

- There is no need to communicate with the vendor.

- Exactly. And in your .NET world, how does this happen?

β€”The way we work, the way we plan our releases has changed a lot over the past few years. And it has changed due to the fact that Microsoft has changed its attitude to the ecosystem, to working with partners, to the level of openness of the company. Three years ago, the situation was this: there were private builds of Visual Studio, which were issued only to partners - there was an affiliate program, according to which we communicated closely with Microsoft. We had the right to submit more priority bugs to Visual Studio.

That is, Microsoft purposefully supported select manufacturers of extensions for Visual Studio, about a hundred or two hundred companies, and for this there were all sorts of private programs. Now the majority of feedback, most of the changes and builds can be obtained absolutely legally through open sources, and most of the commands with which we communicate are developed in Open Source. Now less and less Visual Studio is becoming a closed product that requires you to tap into Microsoft in order to bring feedback, change something, or learn something new.

- It turns out that you began to do many things yourself?

- Visual Studio Industry Partner (VSIP) Program, one might say, has ceased to be some big benefit for us. We go to events where you can chat with the team, and this is practically the only request from the VSIP Program.

β€œWhy do they change their approach so much, do you think?”

- They began to lose developers. Microsoft has long been a vendor who presented developer tools that covered all the needs for all scenarios. With the advent of mobile platforms, everything has changed. The Microsoft toolkit has become lacking for Microsoft clients to write their programs for Android, for iOS. This is the first reason that triggered this shift.

The second, probably, factor which influenced an openness, it probably, Azure. In order to drag as many developers as possible, not only .NET, but Java, Python, PHP, Ruby β€” all developers to your Cloud, you need to introduce tools to them. There is a clear policy - Microsoft now provides tools for developers conditionally free of charge. Although there are cases when it is not free (for example, Visual Studio), but there are cases when it is far from free (for example, Visual Studio Enterprise). Although 6,000 dollars is not 14,000 dollars, as it cost a year ago.

- A year ago, and the ruble was different. But, let's say, the arrival of a new CEO in Microsoft a year ago did it affect the situation?

- I think that I strongly influenced, and in this sense he continued, gave further to make the tools for developers more open. And move in the direction of the fact that Microsoft is a cloud provider and will strengthen this position. It is to develop the Microsoft-based ecosystem, the development ecosystem for all platforms.

- There was also a very interesting story related to cross-platform. There is Mono, which is under Linux, and there is something in this place from Microsoft that will somehow compete. Do you know anything about this?

- With Mono, the story is such that this is exactly the same hole in the Microsoft technologies stack, about which I spoke. Just as things are: a client comes to Microsoft with three thousand licenses for Visual Studio, says: β€œwe need to write an iOS program. I've been sitting on your tools for 10 years now, what should I do? ”He turns to a Microsoft consultant, and that needs to be answered. Therefore, Microsoft has a business task - to provide development for iOS.

Accordingly, what are the options? There is Xamarin, quite a working thing, there is Apache Cordova, there is a native C ++ compilation for different devices. Here are three tools that we will develop in order to cover this scenario. That is, cross-platform development - this is plugging holes with the help of an external partner.

Usually, this happens in Microsoft that at first they plug the holes with the help of an external partner, then they release the product themselves and take up this space. But now I do not see such trends, I do not see Microsoft trying to drag cross-platform development to itself. While they are at the stage of cooperation. Those libraries that are written in Mono pull up to themselves. Core CLR, virtual machines, some elements of the framework ...

- So this is a mutual process?

- Yes, it is now a very mutual process. I hope, of course, that it is unified at some point.

β€”Now they have their own implementation of the .NET virtual machine under Linux. Pretty raw, right?

- She has a chance to become a normal product.

β€œBut Microsoft is talking about it as a finished ecosystem, as if it were a finished product, take it and use it.” Apparently, this is not entirely true?

- To drag users onto it, you need to position it. I don’t see users migrating from classic ASP.NET to ASP.NET based on Core .NET. Just not ready yet. I think this will happen, but not now. Now there are problems dragging your code.

The fact is that now there are significant problems on the way to dragging your code under DNX, under .NET Core. They are connected with the absence of the released version of the framework, under which you can target your libraries, so that they work in the classic ASP, and under the full .NET framework, and in the Core CLR. For this, Microsoft has many versions of .NET: there is Silverlight in browsers, there is Windows Phone, there are Desktop applications, there is a β€œfull” .NET Framework.

Now there is another stack - Core CLR. And in principle, as a separate implementation, it is no different from all the others. Microsoft has a solution to write code for different stacks. A kind of hack, which for each option combinations of these platforms can generate code that works on three or two of them.

This is not a very working scenario, because the number of such combinations is growing, roughly speaking, exponentially. Now Microsoft is actively working to get rid of this exhibitor and make a platform that you can target. So that the code that targets this common platform works for you everywhere. Then there will be updated versions of NuGet-packages that you can use everywhere and compile them under all using the same libraries.

β€œIt works for them, but, apparently, not very quickly.” Yes?

- A lot of design decisions are changing literally before our eyes. Now the version that is, it is not final, Microsoft is already working on another version.



About runtime and language development


- How do you think. NET is legacy technology, how much is living technology? I'll explain my question now. Until a certain moment, maybe a year before 2008, there was a very powerful development of the language. About Runtime, I can not say, I do not have enough expertise. It seems to me that Runtime is not moving very far forward. But the language at that time developed very strongly. C Java is the opposite story, there the language has been stupid for a very long time, and Runtime has been developing at a wild pace. Interestingly, according to my feeling, recently nothing global has been happening with C # either. Changes were earlier more noticeable. How do you think?

- Absolutely. I think Runtime is far behind the JVM. A virtual machine in .NET has a very bad garbage collector and a very weak JIT compiler. The result is a slowly executing code in which you have to insert gags into the gags in order to avoid unnecessary allocations and cope with those functions that are not automatically inline. The code is not automatically optimized at the proper level. There is no such problem in Java.

- And the language?

- There was a period when the language developed little - until the release of C # 6. It is associated with the transition to the new compiler Roslyn, which was delayed for several years. About two years, by sensation.

- That is, the language did not develop approximately the version with the third or fourth?

- On the fifth. The fifth version was released, and then they began to write a new compiler. They wrote it long and painfully. Basically, they tried to achieve the same performance that was in the native compiler, subject to all the architectural improvements.

As a result, the goal was achieved in compilation mode. That is, when you use C # 6 and C # 5 now - the difference in speed is not noticeable. Compared to the rest of the build process, compilation did not take longer.

But from the point of view of support in the IDE - there is a massive failure. From the point of view of C # 6 support in Visual Studio 2015, this is a complete fail. We cannot edit the ReSharper Visual Studio project in the 2015 release without ReSharper. It survives all memory, hangs and everything. Such situation.

- Yes, it is quite interesting. Especially in the early stages, when you saw the first builds, there must have been turbulent emotions. How did you live with this?

- Hair stood on end.

- Yes. It is clear that at some point you, apparently, all major problems were fixed there and somehow you could continue to live with it at least clearly?

- Now we support Visual Studio 2015, roughly speaking, with closed eyes. We do not use it ourselves. We are planning on moving slowly to it, it has become better in the update. We cut ReSharper so that you can run it in pieces. We create smaller Solutions so that we can begin to use all of this.

- In IntelliJ IDEA, in terms of its perception as a tool, there was tremendous progress in 2007, immediately after the launch of the Core 2 Duo processors. There was a very strong (compared to the Pentium D) performance jerk. Accordingly, IntelliJ IDEA from the position β€œIDEA slows down” moved to the position β€œOh, IDEA is a great tool. Now you can work! ”IDEA began to work faster simply because iron has improved dramatically. That was enough. Since then, people do not complain about IDEA performance. Do I understand correctly that in an .NET stack, IDE performance is still a headache?

- Unfortunately yes. We are in a rather difficult situation. We have about half of the performance bugs caused by the work of Visual Studio, and the second half is caused by us. We very often cannot distinguish one from another. Maybe in ReSharper typing is slow, because now in the background Roslyn analyzes files and allocates hundreds of megabytes per second, why does GC just die?

When you are β€œinside your code, as it were,” Microsoft made some special optimizations that take into account how typing in IntelliSense interacts with the background code analyzer. Accordingly, when we start our activities on autocompletion and type assist, we have no influence on how the Roslyn background thread works.

β€œDid they do it on purpose?”

- I think they solved their problem. Of course, they did not think about us. It `s naturally.

About how to change the situation exit Roslyn


- And how much did Roslyn exit change the situation? Is this a headache for you?

- We feel better. The fact is that we began to better understand the different types of projects in which Roslyn is used as a language service. From there we pull out the compilation model, files, references going to the compilation. In previous versions of Visual Studio, when Roslyn was not there, this was quite a laborious moment associated with invoking the build, pulling references from Visual Studio directly. It was difficult and with bugs. Now it is a much more direct process. We use Roslyn to create modules and how they will interact with the compiler.

- How does Visual Studio interact with the compiler? Does the studio use the compiler itself to build its own code model?

- Visual Studio - yes. In process downloads Roslyn.

- And in the old case?

- In the old case it was the same, only in native C ++ code. One could only guess what he was doing and where. But he did not affect the Garbage Collector in any way, we have never seen him in profilers. He may have been there, but he was very fast.

- Is this due to the fact that Roslyn is still a raw technology? Or due to the fact that it is somehow fundamentally incorrectly designed?

- Yes of course. Very raw. In terms of optimizing the data constructor, which is used in Roslyn for the simplest Rename functionality or when errors are found in the entire Solution, these are direct algorithms that work stupidly. But, of course, affect the performance in the end.

- That is, in principle, there is a chance that Microsoft developers will speed up Roslyn?

- There is a chance, of course. But there may be a problem with Microsoft, where such a need may not be realized at the proper level. And time will not be allocated, and money for it.

- Clear. And the Open Source that is happening now, is it Open Source only from the point of view of β€œI can see” or β€œI can sign out”?

- Kontribyushenov I saw very little. Now, basically Core CLR, this is all such shown source code that you can compile or just watch, read. I have not heard that someone massively accepted them.

- That is, in principle, the chances that you will come and help them, fix them all the problems with the performance, also not very much, apparently?

- These problems with performance often lie in the field of compilation of a studio with Roslyn. The chance that we will come and we will change something at Roslyn is, of course. We look, analyze, what and how is happening. We have an idea about architecture, about architectural problems.

How ReSharper will develop further


β€œSo Roslyn is building his own model, his own tree, right?” This, apparently, something like Concrete Syntax Tree.

- Yes. Very specific, with spaces, with comments ... Specific syntax, as it is written in the editor. What the IDE uses is a very specific syntax tree, not an AST in any way.

- You build a model code. Do you have your own tree?

- Yes.

- And Roslyn has his own. Apparently, the studio uses it - this is logical. Actually, how do you live with it? How will you live with this?

- We now have several directions. The first is to not use Visual Studio. The second is to use Visual Studio, but run ReSharper as a separate process. We have a vision, a design, a solution, when all ReSharper code models, all syntax trees, indexes, caches, and everything related to the semantic model are stored in a separate process.

- Cyril Skrygan and I discussed this when he said that ReSharper strongly rests on the memory limit of 32-bit Visual Studio. I told him that it was obvious then to do the ReSharper out-of-process, to which he replied that yes, it was necessary, but this is fraught with Memory Traffic.

- Actually, the design solution is to minimize this Memory-Traffic. It works like this: we can perceive the studio as a UI application. That is, make MVVM. One can consider that the ReSharper backend is such a ViewModel for a studio that is a View. If we consider the traffic between them, it will be the traffic of those data that are sufficient to display changes in the UI. You will never find massive data transfer at the UI level. You should always use two characters, two highlighting ...

It all lives on the studio side, on the UI side. There is little data that needs to be sent in order to display the UI. Thousands of objects to send - it is instant. Forward changes in the document during taiping - also instantly. On this idea, you can build a code so that only those data that are sufficient to display the UI are synchronized.

- How well-designed is Visual Studio, how much will it allow you to do this?

- This is only a question of our code, that is, our integration with the studio will not change.

- You have described everything very nicely. But in reality it will work? Visual Studio will allow you to get all the work with UI somewhere?

- This is a question of writing our UI elements. Let's give an example. Here, for example, shows the "bulb". In order to show it, PSI, syntax trees, documents, the whole project model are now used. If we leave what we have and send these syntactic trees entirely, then this, of course, will not fly up. But in general, in order to draw a β€œbulb”, we need an icon, text and that's it.

When we pressed Alt + Enter, we passed the item as text and icon, when we clicked β€œapply some kind of bullet”, we are on the backend, which works out-of-process, sent one command to the execution. All changes to the data in the syntax trees and documents - they all occurred Out-of-process. Now, as a result, you need to return the new position of the cursor and change the documents that were opened in the editors. And that's all.

- The task is to develop a data exchange protocol between ReSharper and what the user sees on the UI, with the minimum traffic.

- We have groundwork for the protocol. The protocol is very interesting, reactive. We synchronize the same data structure that will work on both sides. This is a big change - you need to change the entire source code of ReSharper.

This change is that the ViewModel must be rewritten so that they do not contain references to semantic code models. This is a huge change, so you have to do it gradually. We will slowly begin to make our product work this way and that. And we will lead the architecture to the fact that the UI will not depend on the semantic model. And this is again an inversion of dependence.

The fact that users will feel the changes
- How transparent will it be for users?

- In the end, it must be the same User Experience.

β€” , ?

β€” . - . And that's all.

β€” - , , . , , ?

β€” . ReSharper , , - β€” 10%.

β€” c Visual Studio, , IDE?

β€” Visual Studio, , , . , , Microsoft. Microsoft. β€” .

, Visual Studio Microsoft. , , Universal Windows Platform, , , , , … .



ReSharper C++, Microsoft


β€” Microsoft, , ReSharper?

β€” . , - , , .

β€” , Microsoft , ReSharper . , β€” .

β€” ReSharper C++ β€” .

β€” , , .

β€” ReSharper ++ 3-4 . . , C++ . , ReSharper C++ β€” 2/3 ReSharper, ReSharper C++ ReSharper Ultimate.

β€” , C++ Windows, Visual Studio?

β€” , Visual Studio ++ .

β€” Managed ++ ?

β€” Managed ++ β€” Microsoft, Managed -Managed .

β€” ,- - ++, -

β€” , . header, ++, Managed ++ β€” . , interop, COM, Implicit PInvoke. Managed C++ β€” .

, Visual Studio Managed C++, ++ β€” , , .. β€” , , C++ .

β€” , C++ Windows Visual Studio β€” ?

β€” . Windows. , Linux, Visual Studio β€” . .

++


β€” , ++, CLion β€” /C++. AppCode Objective-C. ReSharper IDE? - ? IDE?

β€” . -, C++, - β€” Microsoft. CLion AppCode . c . -, CLion ReSharper. ReSharper C++ β€” ReSharper C++ CLion.
, ++ AppCode . Objective C, - , header-, Objective C ++. - define' ++, , , . - ++ , Objective C. ++ AppCode.

CLion AppCode , ?

β€” , , .

β€” ?

β€” . ReSharper ++ , , ++ AppCode. ReSharper ++ , .

β€” «» ? , , ?

- Yes. , IDE.

β€” Microsoft C++?

β€” .

β€” , .

β€” # , . , , , , . - , β€” , , c.

β€” , β€” ?

β€” Use Case. , , , , , , - -, . Those. - .

β€” ReSharper JetBrains?

β€” : ReSharper 2007 3 4-. ReSharper , Eclipse. , , : - , IDE Java – .

β€” , -?

- I think yes.

β€” JetBrains , Eclipse?

β€” , .


β€” ReSharper? , , , C#: , DevExpress CodeRush, Roslyn . , ?

β€” , DevExpress - , . CodeRush β€” -: 2000- , ReSharper .

β€” , . ? ?

β€” Roslyn , Roslyn. , , . ReSharper Roslyn , Roslyn. , . - , . Visual Studio , , , , . , , . , , , , , , Β« varΒ». .

β€” Roslyn. .

β€” , .

β€” ?

β€” .

β€” . . Roslyn .

β€” . , completion' .

β€” , .

β€” . Microsoft'. , , . , , , .

. , . . . – Visual Studio.



.NET-


β€” ReSharper, , .NET- . ?

β€” , dotTrace. dotTrace , ReSharper ++. - . ReSharper' , UI, , , Application- .. dotTrace , : dotTrace ReSharper.

β€” , , «», ?

β€” , , . . . , , . , .NET , , , Solution, . , , , .

dotTrace : ReSharper Extension'a Visual Studio, , Visual Studio, , , package – Visual Studio . , Visual Studio, . ReSharper β€” , Extension, Visual Studio. Extension . , . , Runtime side-by-side.

, . , , , ReSharper, Command Line Inspect Code Tool ( -), dotPeek, dotTrace, dotCover, dotMemory, β€” , . , , .

- DotNext , Application-, , . , . . . : Β« dotCover ReSharper?Β» ReSharper C++ , ReSharper, ReSharper , .

β€” ?

β€” , β€” dotTrace .

β€” -.

β€” - , , . , , . , ReSharper, dotTrace, , . . , , – , … , .


β€” Performance. ReSharper' , , . , .NETe, , workload, , - . - . ? ?

β€” . – Profile Visual Studio. , , , ReSharper , , , - . , . , , . … .

, ? Find Usage, , , , - . , . Find Usage 10 , . , , . - , , Code Completion, - , Foreground .

, - - , , , , ReSharper, , – typing, , β€” , - .

β€” ?

β€” . . , , . typing 10- , β€” .

β€” , , .

β€” , . Code Completion', - , -, , , output. .

β€” , , ? β€” , , – ?

β€” , . : , - , , , . , . , , .

β€” ?

β€” . , ReSharper, - ReSharper', Visual Studio Visual Studio. -, .

β€” Microsoft , ReSharper?

β€” Microsoft , . Microsoft - , . , Microsoft, . , , , Microsoft . .




Β« Β» Youtube- , β€” , .

Source: https://habr.com/ru/post/274091/


All Articles