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

Add a WorkspaceKind property to ProjectContext. #75384

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

JoeRobich
Copy link
Member

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

@CyrusNajmabadi
Copy link
Member

Why not just copy the existing value over? Not sure why we're mapping only two of the values over to two new values.

@DustinCampbell
Copy link
Member

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.

Copy link
Member

@dibarbet dibarbet left a 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?

@jasonmalinowski
Copy link
Member

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?

@jasonmalinowski
Copy link
Member

jasonmalinowski commented Oct 8, 2024

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.

@JoeRobich
Copy link
Member Author

I went with Jason's suggestion because it is what I wanted to do initially before I complicated things.

@JoeRobich
Copy link
Member Author

JoeRobich commented Oct 8, 2024

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?

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.

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 VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants