-
Notifications
You must be signed in to change notification settings - Fork 199
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
Improve Find All Refs results #11279
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change seems fine, but it feels like this deserves more explanation. From the change, it looks like we no longer run code to remove artifacts like "__o = ". Isn't that a significant regression? I'd like to see a bit more justification of why the right tradeoff is to trade one bug for another.
Excellent question, and definitely a valid concern the existing tests did nothing to validate. If we take the screenshots I posted in the original PR description though, what was actually happening was that Roslyn was returning us "Found a reference to What we now do instead is take the line of text from the Razor file itself, therefore there can't possibly be any In the non-cohosing test, this line would have said |
// <SurveyPrompt Title="Blah" /> | ||
// | ||
// A FAR for the Title property will return just the word "Title" in the Text of the reference item, which does not | ||
// help the user reason about the result. For such cases, its better to return the text from the Razor file, even |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does classification happen in FAR? Can we provide the classification?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just logging an issue for that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! Another question: there don't seem to be any tests that demonstrate the new behavior -- unclassified or not. Should there be a test that validates the result in your scrreenshot above? |
No new tests, no, but new validation for the existing tests was added to ensure the Text of the reference item matches the line of text from the test input. |
Update integration test base lines to match the FAR behavior introduced with #11279
Fixes #11278
Fixes #4611
We lose classification, but get more context. Worthy trade off I think
Before:
![image](https://private-user-images.githubusercontent.com/754264/393657203-1fd57f57-e1d9-4ea4-881d-26afa5d5a547.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250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