-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add a WorkspaceKind property to ProjectContext. #75384
Conversation
Why not just copy the existing value over? Not sure why we're mapping only two of the values over to two new values. |
Same question from me. 😄 Does this really need to be an enum? Could it just be the string. |
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.
seems OK to me (assuming other feedback is taken) - mind adding a test or two for this?
Or should this just have some string for a general "warning" concept, which maybe we can use in other ways too? Like source generated files being read only (like we show a banner), or other things for debugger files, etc? |
I'd also propose it could just be isMiscellaneous boolean value or something else too, in case we change how workspace kinds work on the server a bit and have to figure out how to map it back to this enum type. |
I went with Jason's suggestion because it is what I wanted to do initially before I complicated things. |
We can talk more if you have scenarios in mind. We are considering also showing a notification when the user opens a misc file after project loading has completed. I think we would still want to show a warning in the status bar, especially if the user has configured not to show those notifications. It is tricky because we are walking the fine line of not being in the users way but also making it obvious that something is different about the open file. This will have time in the prerelease to further refine the behavior. |
This change will allow the C# extension to warn users that their active file is not part of the open workspace. See dotnet/vscode-csharp#7628