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

Expose WorkspaceKind off of Solution snapshot instance #62913

Merged
merged 4 commits into from
Jul 25, 2022

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Jul 25, 2022

This helps the effort to stop exposing the Workspace off of a solution snapshot.

We intend to add solutionInstance.Workspace to the banned api list for roslyn itself. It's highly problematic for OOP, as we have to try to replicate that concept, which isn't something sensical in that world. First, OOP cannot mutation things, so exposing the mutable workspace doesn't make much sense. Second, in VS you can have many workspaces, but in OOP we map that all back to one, which means we don't have a proper representation of VS state (for example, where you might have the VSWorkspace and the Metadata-as-source workspace). This means those features either cannot use OOP, or they try to use OOP and can end up with non-sensical results.

This is a series of PRs to get us off of that API so we can move to a much cleaner and simpler OOP model for the solution and services.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner July 25, 2022 18:56
@CyrusNajmabadi CyrusNajmabadi merged commit 5fb47b1 into dotnet:main Jul 25, 2022
@ghost ghost added this to the Next milestone Jul 25, 2022
@@ -150,6 +154,8 @@ public SolutionState WithNewWorkspace(Workspace workspace, int workspaceVersion)

public ImmutableDictionary<ProjectId, ProjectState> ProjectStates => _projectIdToProjectStateMap;

public string? WorkspaceKind { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkspaceKind

Shouldn't this be serialized somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants