Project
ReSharper
Priority
Normal
Type
Feature
Fix versions
6.1
State
Fixed
Assignee
Evgeny Pasynkov
Subsystem
Psi - C#
Affected versions
5.0, 5.1, 5.1.1, 6.0
Fixed in build
6.1.0.2421  
  • Created by   Paul Rohde
    18 months ago (29 Oct 2010 03:27)
  • Updated by   Ilya Ryzhenkov
    6 months ago (04 Nov 2011 19:47)
 
RSRP-196518 Support for async and await keywords in the upcoming version of C#
63
Issue is visible to: All Users
  The issue is visible to the selected user group only
After installing the Asynchronous Programming for C# and Visual Basic CTP release, the async and await keywords are not supported by ReSharper. Will this be supported in a future version and is there a way to add that support now?

Link to the CTP releases page: http://msdn.microsoft.com/en-us/vstudio/async.aspx
Comments (39)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Ilya Ryzhenkov
  Ilya Ryzhenkov
02 Nov 2010 00:24
18 months ago
We are not going to support experimental builds of C# vNext compiler before we get any official information from the vendor about the future plans, features, etc. Please understand, that it is not just "parser", it is the whole infrastructure for new way of doing things and it doesn't make any sense to support it in an experimental mode.
Related Changes
Resolved Date
18 months ago (02 Nov 2010 00:24)
State
SubmittedWon't fix
Paul Rohde
  Paul Rohde
02 Nov 2010 00:30
18 months ago
Fair enough, I had hoped there was some kind of generic language definition xml that would allow us to use the CTP without Resharper choking on methods marked with async and blocks marked with await, but since that is not the case I'll just turn resharper off while experimenting with the CTP. Thanks for the response!
Alex Martsynkevich
  Alex Martsynkevich
02 Nov 2010 02:48
18 months ago
What would break current situation if you add the following:

async Task<T> Foo()
{
    var a = await Xxx();
    return new T(a);
}

  1. check async modifier requirement with methods containing await
  2. require these methods to be either void or return a Task<T>
  3. all returns have expression of type T
  4. all "await {expression}" simply can be replaced with "{expression}.Result" ({expression} is something of type Task<T>) for type analysis.

Compiler has to do fancy syntactic expansion, but for R# syntax validation do you really need to understand the details of this? This shouldn't go into primary release though, I'll be happy with some EAP build you guys are spawning too often anyway :)
Ilya Ryzhenkov
  Ilya Ryzhenkov
02 Nov 2010 02:55
18 months ago
Alex, what about overload resolution? Type inference? async delegates? Control flow analyses? etc, etc, etc...
Paul Rohde
  Paul Rohde
02 Nov 2010 03:01
18 months ago
Ilya Ryzhenkov
  Ilya Ryzhenkov
02 Nov 2010 03:09
18 months ago
Yes, we have the specs. Nobody said they are final, though. And who knows what other features there will be in C# 5, which will influence C# support in ReSharper. It would be just waste of time to support them now.
Paul Rohde
  Paul Rohde
02 Nov 2010 03:15
18 months ago
Sorry, that was more in reference to Alex for him to dig into the complexity of the feature. As I said before, definitely understand the difficulty in supporting an unreleased spec. Is there the possibility that ReSharper would not support C# in the future?
Ilya Ryzhenkov
  Ilya Ryzhenkov
02 Nov 2010 08:30
18 months ago
Why would ReSharper stop supporting C#? :)) No, it is not going to happen, provided world remains mostly the same and suddenly all developers do not stop using C# anymore.
Alex Martsynkevich
  Alex Martsynkevich
02 Nov 2010 18:59
18 months ago
Ilya, the point of my comment was that if you handle those items (and oh yeah, I forgot to mention anonymous functions with all their type inference jazz) things like control flow analysis shouldn't be affected. R# could still analyze an async method sequentially ignoring the fact that compiler does a complex transformation.

But I realize that it can't be as simple I see it from my viewpoint. Just augmenting a unit test collection to cover new specs would be a sizable project. I'd be really interesting to read more blogposts about not-so-obvious nuances of C# which from our standpoint as regular users of the language don't stand out as much as they do for you guys. Thanks for your hard work!
Ilya Ryzhenkov
  Ilya Ryzhenkov
02 Nov 2010 20:30
18 months ago
Short example for complexity:
var x = from item in items where item > 10 select item.Foo;

This converts to
var x = items.Where(item => item > 10).Select(item => item.Foo);

depending on what is "items" (not necessary IEnumerable) and how methods Where and Select are implemented, item in the original query can have different type in where and select clause. Go figure how to handle this :)
Jaroslav Půbal
  Jaroslav Půbal
21 Apr 2011 20:27
13 months ago
Any "hotfix" just ignoring keywords async and await ?
We only want to use both Resharper and Async CTP.
Jake Ginnivan
  Jake Ginnivan
03 May 2011 07:12
12 months ago
A hotfix to simply ignore the keywords would be great, understand support is not feasible but just not highlighting the keywords red would be a great start, simply ignore them when parsing the code?
Thonemann
  Thonemann
04 May 2011 13:39
12 months ago
As the PM at Microsoft stated, that this will become a feature of the next .NET release (http://channel9.msdn.com/posts/Mads-Torgersen-Visual-Studio-Async-CTP-SP1-Refresh-Overview) will this be supported in R# 6? We are also using the CTP1 Refresh.
Peter Schlau
  Peter Schlau
14 May 2011 00:13
12 months ago
Now that the Async CTP SP1 Refresh has an Go-Live license, I am using this new feature and do not want to miss it anymore. Resharper's competition does not support it... yet. So I was looking for an alternative. If Resharper somehow supports the async/await keyword - or ignores it so that it does not get in its way - I am going to switch to Resharper...
tetsu shimizu
  tetsu shimizu
15 May 2011 17:01
12 months ago
I started using async/await to see how it works. It's awesome. Now, I don't need any callbacks and the using() statements to dispose everything work perfectly. The problem of TPL without the new feature or BackgroundWorker in general is that you need to take care of the callbacks. The more you refactor your code, the more event chains you have to maintain. The only problem of async/await is that ReSharper doesn't recognize it. Until MS releases VS2012/.NET5, just ignoring the keywords would work for me.
Brian Vallelunga
  Brian Vallelunga
23 May 2011 22:12
12 months ago
Here's a vote for simply ignoring the keywords as well, if possible. The CTP is just too useful to ignore right now and some large projects are using it already, such as Raven DB.
Paul den Boer
  Paul den Boer
24 May 2011 10:59
12 months ago
You have another vote from me for the feature that R# could ignore the new async keywords for now. I understand this might be a daunting task to implement, especially since you are working hard on stabilizing R# 6, however I would not ignore this important and useful CTP simply based on it being experimental. The Async CTP goes a long way in freeing us from callback-hell, giving us the benefit of faster development and cleaner, more maintainable code. Ultimately this is the same reason why we like working with R#, it's just a pity that their use is mutually exclusive.
Neil MacMullen
  Neil MacMullen
27 May 2011 16:00
11 months ago
Here's another vote for some kind of kludge to minimise the pain of using resharper with the Async CTP. I'm not expecting R# to pickup errors associated with incorrect async usage but it would be nice if it could suppress errors associated with these keywords so my R# error bar is no longer a sea of red :-)
Bob Hall
  Bob Hall
29 May 2011 01:11
11 months ago
Is there a pragma to shut off ReSharper for parts of or the entire file? For now I just turned off the code analysis part in the options.
Arne Claassen
  Arne Claassen
01 Jun 2011 02:46
11 months ago
Ignoring the keywords or even a pragma would be great. Resharper-less VS is just too painful to endure for any serious work.
Shaun de Villiers
  Shaun de Villiers
03 Jun 2011 16:24
11 months ago
Another vote for ignoring the keywords, or a pragma as suggested above. It would make our code so much cleaner to use async, but it's a no-go at present because of the clash with R#.
Stephen
  Stephen
27 Jun 2011 13:38
10 months ago
Another vote for ignoring the keywords! I'm trying Resharper after talking to a fellow developer, and hearing how fantastic it was. I'm rather heavily invested in the Async CTP (as Microsoft very kindly adjusted thier EULA) and seeing red squiggles makes me sad. :) Apart from that, I'm rather enjoying R#!
Fil Mackay
  Fil Mackay
16 Jul 2011 16:16
10 months ago
I think it's stable enough now, right... ?
Craig Dean
  Craig Dean
28 Jul 2011 13:11
9 months ago
Yeah, another vote for just ignoring the keywords if possible until vNext. Really makes developing async code a pain with R# switched on, which means switching off a really important and expensive tool... I know full implementation and support would take time but simply ignoring the keywords would allow us all to continue developing.
Ilya Ryzhenkov
  Ilya Ryzhenkov
28 Jul 2011 18:45
9 months ago
We scheduled initial async support for ReSharper minor update, and work is in progress. Stay tuned for EAP builds to open.
Related Changes
Fix versions
Mirabile Futurum, 6.1
State
OpenIn Progress
Assignee
Ilya RyzhenkovEvgeny Pasynkov
Stuart Leitch
  Stuart Leitch
28 Jul 2011 18:56
9 months ago
Fantastic news... I'm eagerly awaiting it. I'm having to disable R# now when working with async.
Paul den Boer
  Paul den Boer
28 Jul 2011 18:59
9 months ago
You guys rock!! Can't wait for EAP 6.1.
Stephen
  Stephen
28 Jul 2011 19:06
9 months ago
Great news, and very much appreciated! Thank you for listening! :D
Craig Dean
  Craig Dean
28 Jul 2011 21:48
9 months ago
Fantastic news, we've spent hours today debating whether to disable R# or async CTP!
Alex Martsynkevich
  Alex Martsynkevich
02 Aug 2011 00:18
9 months ago
Wait, you can't just mark it as fixed and then leave for a day! :)
Paul den Boer
  Paul den Boer
02 Aug 2011 10:41
9 months ago
The first one from JetBrains that posts a link to build 6.1.0.2421 will get "+1"'d from me. :D. Otherwise, a possible date for public access to 6.1 EAP would also suffice.
Ilya Ryzhenkov
  Ilya Ryzhenkov
02 Aug 2011 12:05
9 months ago
We are working on some other improvements and bugfixes for 6.1, so we cannot share builds right now. I think EAP builds will be available in a month or two, depending on their quality and completeness.
Craig Dean
  Craig Dean
18 Sep 2011 12:42
8 months ago
I saw in another forum that the plan was to release the 6.1 EAP in September, with less than two week left in September, is that still the plan? Do we have a date yet? This async issue is killing us. Even StyleCop for Resharper has added async support now.
Paul den Boer
  Paul den Boer
22 Sep 2011 09:23
8 months ago
I have to agree with Craig. As a developer writing LOB apps in Silverlight, it is very cumbersome not being able to use the Async language feature. I would much rather have async + a bug prone EAP of ReSharper 6.1, than having to choose between only one of them. Is there any insider news on the current state of 6.1 you could share with us? Much appreciated.
Paul den Boer
  Paul den Boer
27 Sep 2011 11:36
7 months ago
I found this post on the R# forum: http://devnet.jetbrains.net/message/5319510?tstart=0. From what I read here, it looks like the EAP will be released in days?
Bas ter Vrugt
  Bas ter Vrugt
15 Oct 2011 19:23
7 months ago
This is getting really annoying, can you please give us an ETA? I have to disable resharper serveral time per day for many months now.
Ilya Ryzhenkov
  Ilya Ryzhenkov
18 Oct 2011 07:10
7 months ago
Support for async and await is not the only thing we do for ReSharper 6.x. Having EAP build for CTP product is itself quite a bit of pain, and we don't want to deliver half-baked build. As soon as build is stable enough to be useful, we'll deliver.
André Ziegler
  André Ziegler
04 Nov 2011 19:29
6 months ago
ok, 6.1 EAP is out now and support Async
Ilya Ryzhenkov
  Ilya Ryzhenkov
04 Nov 2011 19:47
6 months ago
If you have any comments on async support, please file them as separate issues. Thanks!