ProjectSystemProjectOptionsProcessor does not set CompilationOptions when given empty command line
Open
Area-IDE
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
https://github.com/dotnet/roslyn/blob/c5fab36af117b83adfae7a3f4649df415e9de4fb/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LoadedProject.cs#L143
It is expected that after SetCommandLine is called, the associated ProjectSystemProject is updated with non-null CompilationOptions (if it doesn't have the appropriate options on it already).
This doesn't happen when the command line we pass in is `[]`. That's because the constructor calls `ReparseCommandLineIfChanged_NoLock(arguments: []);`, which skips setting CompilationOptions, and when the new call comes in, it is perceived that nothing is changed and there's no need to update.
Contributor guide
Assessment
This issue has not been assessed yet.