You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have noticed that in Visual Studio our incremental source generator is not regenerating its output when an additional file (that's watched by the incremental generator) is modified by an external action (i.e. the file is changed while not being opened in VS).
I was able to trace this to Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.FileChangeWatcher and specifically to the changes from #70936. Since that PR, it seems FileChangeWatcher is not reporting external changes to the correct project (files from multiple projects form a batch, and changes to these files are then all reported to the same sink, which corresponds to the first project in the batch), which is the cause of our source generator issue.
This can be seen by the following test (place it inside the Microsoft.VisualStudio..LanguageServices.UnitTests project):
@DoctorKrolic I believe that issue is about additional files that are open and edited inside VS. This issue is about additional files that are modified by something else.
Version Used: VS 17.10.5, Roslyn main (d939cd6)
We have noticed that in Visual Studio our incremental source generator is not regenerating its output when an additional file (that's watched by the incremental generator) is modified by an external action (i.e. the file is changed while not being opened in VS).
I was able to trace this to
Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.FileChangeWatcher
and specifically to the changes from #70936. Since that PR, it seemsFileChangeWatcher
is not reporting external changes to the correct project (files from multiple projects form a batch, and changes to these files are then all reported to the same sink, which corresponds to the first project in the batch), which is the cause of our source generator issue.This can be seen by the following test (place it inside the Microsoft.VisualStudio..LanguageServices.UnitTests project):
Expected: handler1Called=False, handler2Called=True
Actual: handler1Called=True, handler2Called=False
The text was updated successfully, but these errors were encountered: