Skip to content

Conversation

ErikEJ
Copy link
Contributor

@ErikEJ ErikEJ commented Mar 11, 2022

(and avoid reported issues with older analyzers)

I have used this in an ASP.NET Core 3.1/5/6 solution

@ErikEJ ErikEJ requested a review from davidkallesen March 11, 2022 12:17
Copy link
Collaborator

@davidkallesen davidkallesen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Mar 11, 2022

@davidkallesen I have already done that - try:

gh pr checkout 68 

and have a look

davidkallesen
davidkallesen previously approved these changes Mar 11, 2022
@LarsSkovslund
Copy link
Contributor

The suggested new analyzer Microsoft.VisualStudio.Threading.Analyzers is target towards running in Visual Studio including the constraints imposed by it. I don't see this as a all around analyzer.

@davidkallesen davidkallesen dismissed their stale review March 14, 2022 12:14

After LarsShovslund feedback - we need to investigate the dependency to VS

@davidkallesen
Copy link
Collaborator

After reading Async code smells and how to track them down with analyzers - Part I and Async code smells and how to track them down with analyzers - Part II
I think AsyncFixer is still relevante... and still not sure how vs-threading is dependent on Visual Studio

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Mar 15, 2022

@davidkallesen agree - all three analysers are relevant! (I also found your link) - I will update the PR.

@LarsSkovslund
Copy link
Contributor

I might have expressed myself wrongly in regards to Microsoft.VisualStudio.Threading.Analyzers. What is was trying to say was that the rules enforce in this library are there to govern how you write VS extensions code. Please see FAQ here.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Mar 15, 2022

@LarsSkovslund I do not agree, some of the rules are generally useful, as mentioned in the blog post linked above.

@LarsSkovslund
Copy link
Contributor

Yes some of them are useful, but they will conflict with other async rules and/or suggest changes that are not appropriate for most projects unless you write Windows UI code. If we go through them one by one you will see these are target against STA/MTA issues or synchronizing with the UI thread.

@ErikEJ would it be possible for you to point me in the direction of included rules that is not related to VS internals or UI programming (async void is in this category)?

If the primary use-case for this analyzer is when writing Windows UI code, this should only be included there and not as a general requirement for all project types.

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Mar 15, 2022

@LarsSkovslund Sorry, I thought @davidkallesen had already linked to them above 😊 - https://cezarypiatek.github.io/post/async-analyzers-summary/ - as you can see in the summary there are 2-3 rules in the vs-threading rules that are useful. (You can always discuss each, for example VSTHRD200)

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Mar 15, 2022

PR updated

@ErikEJ
Copy link
Contributor Author

ErikEJ commented Nov 1, 2022

Are you waiting for me to do anything here?

@ErikEJ ErikEJ closed this Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants