Skip to content

Conversation

@jasonmalinowski
Copy link
Member

Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities depended on Microsoft.VisualStudio.Editor which brought along various VS layer services. Further, we had some stub implementations of those VS services there. Digging into this this coupling wasn't really necessary:

  1. There were EditorFeatures tests using the editor adapters stub, but those tests pass just fine without it, so that was easy to move to the VS specific tests.
  2. StubVsServiceExporters didn't appear to be used either, so unsure why those were in this layer at all. Those were also moved.
  3. We had implementations of some settings services, which it's easier to just delete and remove the options persister from the composition in the first place. This also better ensures that we don't have code that might try creating registry keys from ILocalRegistry which we absolutely don't want.

Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities depended on
Microsoft.VisualStudio.Editor which brought along various VS layer
services. Further, we had some stub implementations of those VS services
there. Digging into this this coupling wasn't really necessary:

1. There were EditorFeatures tests using the editor adapters stub,
   but those tests pass just fine without it, so that was easy to
   move to the VS specific tests.
2. StubVsServiceExporters didn't appear to be used either, so unsure
   why those were in this layer at all. Those were also moved.
3. We had implementations of some settings services, which it's easier
   to just delete and remove the options persister from the composition
   in the first place. This also better ensures that we don't have
   code that might try creating registry keys from ILocalRegistry
   which we absolutely don't want.
@jasonmalinowski jasonmalinowski force-pushed the decouple-editorfeatures-tests-from-vs branch from 8a292ed to ef33d32 Compare June 4, 2025 21:39
Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

Love it!

@jasonmalinowski jasonmalinowski merged commit a15f64a into dotnet:main Jun 4, 2025
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jun 4, 2025
@jasonmalinowski jasonmalinowski deleted the decouple-editorfeatures-tests-from-vs branch July 10, 2025 19:44
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
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.

4 participants