-
Notifications
You must be signed in to change notification settings - Fork 10.4k
~/ should result in error in local functions and @functions #10734
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
Comments
So I've been investigating multiple ways to do this over the past several days all of which have hit various roadblocks all exposing different issues with fulfilling this issues core requirement. The core requirement for this feature is: Work at least as well as the To make that possible we need to support:
Less important but possible today:
So we're left with a few options: Option 1Stop supporting all that Pros: Lesser implementation/maintenance cost Option 2Buffer the world. Everytime we see a Pros: Keeps consistency with previous versions of Razor Option 3Leave Pros: Easy to implement and maintain Option 4Do nothing @mkArtakMSFT @danroth27 @rynowak @ajaybhargavb Would appreciate your input here. I personally am leaning towards 3 or 4 to avoid the more common behavior changes of 1 and 6. |
Talked offline with @rynowak. For 3.0.0 we're going to investigate what it means to go with Option 3 |
Updated the cost to reflect the potential that we might need to perform some VS changes to make this plausible. |
- This change results in proper errors for tags that utilize `~/`inside of local functions at design time. #10734
- This change results in proper errors for tags that utilize `~/`inside of local functions at design time. - Updated TagHelper in code blocks analyzer error to mention `~/` since it will typically be a cause of confusion. #10734
- This change results in proper errors for tags that utilize `~/`inside of local functions at design time. - Updated TagHelper in code blocks analyzer error to mention `~/` since it will typically be a cause of confusion. #10734
- This change results in proper errors for tags that utilize `~/`inside of local functions at design time. - Updated TagHelper in code blocks analyzer error to mention `~/` since it will typically be a cause of confusion. #10734
Because of how ~/ is implemented today (as a TagHelper) it requires the method that contains it to be asynchronous. This means when utilizing
~/
in local functions, lambdas etc. you must mark those methods asasync Task
. Sadly,~/
does not show up at design time as a TagHelper so you don't get errors for this scenario.All the being said, we should consider moving ~/ off of the TagHelper infrastructure and make it a compiler intrinsic.
Filing this issue because #8630 did not cover the
~/
scenario.The text was updated successfully, but these errors were encountered: