Skip to content
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

[Fuse] bind-Value:attribute support #11214

Merged
merged 3 commits into from
Nov 18, 2024
Merged

Conversation

chsienki
Copy link
Contributor

@chsienki chsienki commented Nov 14, 2024

The various @bind-Value:get @bind-Value:set, @bind-Value:event tag helpers are mostly macro based, meaning that what they expand into isn't represented in the document.

For the IDE to enable Hover, FAR etc on the Value part of the attribute, we need to emit something that we can map (we can't map the same piece of text twice).

This PR takes the approach of emitting a simple discard expression of the nameof the referenced value so we have something to map for the IDE, but is completely elided by the compiler at build time, so has no runtime effect.

We already had the machinery to correctly emit the nameof including on generic types, so this PR just re-uses that.

Fixes: #10966

@chsienki chsienki added area-compiler Umbrella for all compiler issues New Feature: Fuse labels Nov 14, 2024
@chsienki chsienki added this to the 17.13 P2 milestone Nov 14, 2024
@chsienki chsienki requested a review from a team as a code owner November 14, 2024 23:26
@chsienki chsienki requested a review from a team as a code owner November 14, 2024 23:31
Copy link
Contributor

@ryzngard ryzngard left a comment

Choose a reason for hiding this comment

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

Do you have an integration test run going for the tooling side?

@chsienki
Copy link
Contributor Author

Do you have an integration test run going for the tooling side?

https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=10561480&view=logs&j=a44c3a94-68a7-5fe1-af29-00143c0d8cef

@chsienki
Copy link
Contributor Author

@dotnet/razor-compiler for review please :)

@chsienki
Copy link
Contributor Author

@333fred or @DustinCampbell for a second review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-compiler Umbrella for all compiler issues New Feature: Fuse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FUSE] No source mapping for @bind :set and :after modifiers
4 participants