-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide information to users if a C# suggestion cannot be applied because of e.g. a lower language version used in project #13
Comments
A lower language version used in the project is just one of the possible reasons why a suggestion cannot be applied. Type availability in the framework is another one. E.g. only some of the features of C# 8.0 are directly supported in .NET 4.8. We could even have a situation that the framework version does not support a certain type like e.g. On the other hand, for e.g. Default interface implementation there are no special framework types needed, but the feature will work only on the Core runtime (at the moment). Long story short: it's complex 😄 (The table with language feature and framework support is taken from @miroslavpopovic's presentation that can be found in his what-is-new-in-dotnet-core-3 repository.) |
Thanks for digging deeper into the issue @shankyjain7243. I'll answer the question from your PR #26 here so that we have all the things in one place and document at the same time some additional difficulties we have in this issue.
No, this replacement wouldn't work. Why? Because of these two major reasons:
In the meanwhile, two more difficulties popped up. The first one is explained in this TODO. Basically, we can have analyzers that analyze files from a certain project and report findings in different projects. The solution provided in the PR does not support that, same as the existing implementation of the analyzers. The second one is the larger-scale refactoring which we want to do, basically fixing all the points mentioned in the above TODO. The PR #26 is a WIP as the title suggests but I wouldn't integrate it before we solve the other issues which are pretty heavy:
So I will close the PR and I suggest that we postpone the work on this issue until all the points above are closed. Thanks once again for providing more info! |
E.g. if the project sets the C# language version to 5.0 in its settings, the suggestions for e.g. version 7.0 will also be provided in the Sharpen Results window. We need a mechanism to provide visual information to users that the particular suggestion cannot be applied because the project settings use a lower version of the compiler.
We need a more detailed UX/UI concept how to do this.
The text was updated successfully, but these errors were encountered: