API Proposal: Allow creating custom Workspace classes #76433
Labels
Area-IDE
Concept-API
This issue involves adding, removing, clarification, or modification of an API.
Feature Request
untriaged
Issues and PRs which have not yet been triaged by a lead
Background and Motivation
The
Workspace
API is currently essentially closed to extension. TheAdhocWorkspace
andMSBuildWorkspace
classes aresealed
and while one can derive fromWorkspace
itself, trying to implement a basicWorkspace
by copying the code forAdhocWorkspace
won't work because said class usesinternal
APIs.Given that there are a number of
Workspace
implementations in the Roslyn codebase itself, I'm sure that you can appreciate that being able to implement/extendWorkspace
is valuable. Looking though old issues, it looks likeWorkspace
was originally intended to be extensible.Proposed API
Either remove
sealed
fromAdhocWorkspace
(and maybeMSBuildWorkspace
?) or provide a new abstractAbstractCustomWorkspace
class which implements the parts which require internal APIs.Alternative Designs
It's entirely possible that I'm missing something here and that this is already possible. An alternative solution would be to document/provide a sample of how to implement a custom workspace on top of
Workspace
with existing APIs.Risks
More API surface for the Roslyn team to maintain ;)
The text was updated successfully, but these errors were encountered: