dotnet/roslyn

CodeLens does not invalidate for changes in downstream projects

Aberta

#49.775 aberto em 3 de dez. de 2020

 (0 comentário) (0 reação) (0 responsável)C# (4.257 forks)batch import
Area-IDEBugCodeLenshelp wanted

Métricas do repositório

Stars
 (20.414 estrelas)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (256 fundiu PRs em 30d)

Description

Version Used: e9fd4dc7

Steps to Reproduce:

  1. Create project A:

    public static class First {
      public static void Method() { }
    }
    
  2. Create project B, which references project A:

    public class Second {
      public void Method() {
        First.Method();
      }
    }
    
  3. Observe the CodeLens reference count on First.Method

  4. Comment out Second.Method

  5. Observe the CodeLens reference count on First.Method

Expected Behavior:

  • At step (3), the reference count is 1
  • At step (5), the reference count is 0

Actual Behavior:

  • ✔ At step (3), the reference count is 1
  • ❌ At step (5), the reference count is 1

Additional Details:

The change in step (4) does not update the project version which is used here for data point invalidation:

https://github.com/dotnet/roslyn/blob/6eecbdbeff1a547709b53f5bdc93b60749c6b1ef/src/VisualStudio/Core/Def/Implementation/CodeLens/CodeLensCallbackListener.cs#L70

Guia do colaborador