Comments (11)
Hi, is there an update to this issue? It's happening in our project and it's bugging our devs...
from asyncfixer.
Looking at it, but an example would be great.
from asyncfixer.
Could not find anything wrong given that we do not have any implicit or explicit casting for the symbols. This might be due to a bug in the Roslyn APIs. The repro example would be nice to confirm this. Then, I can try updating Roslyn dependencies to see whether it mitigates the crash.
from asyncfixer.
I am having the exact same issue.
I can't seem to replicate it in a simpler way, so I'll just show exactly how I'm triggering the error.
[FunctionName(nameof(SubscribeToOrders))]
public async Task SubscribeToOrders(
[SignalRTrigger(HubName, "messages", nameof(SubscribeToOrders), ConnectionStringSetting = "AppSettings:SignalRConnection")] InvocationContext invocationContext,
[SignalRParameter] SubscribeToOrdersParameters parameters)
{
var groupManager = await invocationContext.GetGroupsAsync();
var tasks = parameters.OrderIds.Select(x => groupManager.AddToGroupAsync(invocationContext.ConnectionId, $"order-{x}"));
await Task.WhenAll(tasks);
}
My workaround is to write it like this, and no errors show.
var groupManager = await invocationContext.GetGroupsAsync();
var tasks = new List<Task>();
foreach (var orderId in parameters.OrderIds)
{
tasks.Add(groupManager.AddToGroupAsync(invocationContext.ConnectionId, $"order-{orderId}"));
}
await Task.WhenAll(tasks);
The error does not show the correct line or file.
File is CSC and line is 1.
from asyncfixer.
Thank you for the example. I could not repro it. Because the problem is related to the semantic model and symbol table, I need something compilable. Is that code snippet from a public Github repo?
from asyncfixer.
No it's not public unfortunately. When I get some spare time, I will create a compilable repository with just this code, so you can clone it.
from asyncfixer.
Great, thank you!
from asyncfixer.
https://github.com/lupusbytes/AsyncFixerBugExample
Let me know if this works for you
from asyncfixer.
Any progress on this issue ?
from asyncfixer.
I'm facing the same error with my code as well. Is there any workaround? Will this be fixed?
from asyncfixer.
I'm facing the same issue. Any plans to fix this?
from asyncfixer.
Related Issues (20)
- Using declaration treated differently to using blocks HOT 1
- Is AsyncFixer01 really an anti-pattern? HOT 4
- Visual Studio 2022 support HOT 5
- AsyncFixer01 does not take await foreach into account HOT 1
- VS2022 Support HOT 7
- Analyzer links should be directed to the docs HOT 1
- AsyncFixer01: false positive with ValueTask awaited in method returning Task HOT 4
- `delegate Task FooAsync()` is passed a `Func<Task<T>>` hiding a bug
- AsyncFixer05 doesn't cover `return Task.Factory.StartNew(async () =>...);`
- CancellationTokenSource in using block inconsistently triggers AsyncFixer04
- AsyncFixer04 should also include return of Task HOT 1
- nameof(Task<object>.Result) should not trigger error AsyncFixer02
- AsyncFixer05 of TaskTupleAwaiter
- asyncfixer.com down
- Conflicting AsyncFixer01 on use of FluentAssertions ThrowAsync HOT 5
- provide as dotnet tool
- What's the preferred way to fix AsyncFixer02 warning when accessing task.Result after Task.WhenAll(tasks)? HOT 2
- Documenting Mapping Between AsyncFixer and VSThreading Analyzers HOT 1
- Code is sometimes mangled if it is a sync call that is supplying a method argument
- Parentheses are not added if a chained sync call is converted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asyncfixer.