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

CodeLens reference count is broken with references from generated code #76608

Open
Sergio0694 opened this issue Jan 3, 2025 · 0 comments
Open
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@Sergio0694
Copy link
Contributor

Version Used: 4.12.0-3.24572.7 (dfa7fc6)

Steps to Reproduce:

  1. Use a source generator that produces any partial methods that you can implement, for instance the MVVM Toolkit
  2. Implement any of those generated partial methods (which are also invoked by the generated code)
  3. Observe that the reference count in CodeLens is != 0 (and the method is indeed not grayed out)
  4. Click on the reference count
  5. A flyout will show up and load
  6. The flyout will just fail to show any results
  7. After this, the reference count will be 0 (?!), however the method will (correctly) remain not grayed out
  8. Try to do right click > find all references on the method
  9. This will show the references correctly (however it'll show a mismatch with the original CodeLens count, eg. it'll say 1 but CodeLens said 2)

Expected Behavior:

  • The reference count shoud be consistent and always work
  • The CodeLens references flyout should work correctly

Actual Behavior:

Step 3:

Image

Step 5:

Image

Step 7 and 9:

Image

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant