Skip to content

Conversation

@DustinCampbell
Copy link
Member

There's a long discussion about this, but it turns out that CLaSP relies on MEF metadata that exposes System.Types. This means that MEF must load assemblies in order to produce metadata. Recently, one of our co-hosting endpoints unintentionally pulled in Microsoft.CodeAnalysis.Razor.Workspaces by using a protocol type from MS.CA.Razor.Workspaces as generic type argument. Since, CLaSP loads the type, it had to additionally load MS.CA.Razor.Workspaces to satisfy the generic argument.

The fix is easy -- just don't use that protocol type. However, that's not sustainable and this change has started a conversation about potential re-architecture to CLaSP to avoid eagerly loading assemblies.

There's a long discussion about this, but it turns out that CLaSP relies on MEF metadata that exposes System.Types. This means that MEF must load assemblies in order to produce metadata. Recently, one of our co-hosting endpoints unintentionally pulled in Microsoft.CodeAnalysis.Razor.Workspaces by using a protocol type from MS.CA.Razor.Workspaces as generic type argument. Since, CLaSP loads the type, it had to additionally load MS.CA.Razor.Workspaces to satisfy the generic argument.

The fix is easy -- just don't use that protocol type. However, that's not sustainable and this change has started a conversation about potential re-architecture to CLaSP to avoid eagerly loading assemblies.
@DustinCampbell DustinCampbell requested a review from a team as a code owner May 9, 2024 22:07
@333fred 333fred enabled auto-merge (squash) May 9, 2024 22:22
@333fred
Copy link
Member

333fred commented May 9, 2024

Setting automerge to unblock insertion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants