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

Rejection should prefer the ImportMany site over the Export site #50

Open
AArnott opened this issue Dec 13, 2017 · 1 comment
Open

Rejection should prefer the ImportMany site over the Export site #50

AArnott opened this issue Dec 13, 2017 · 1 comment

Comments

@AArnott
Copy link
Member

AArnott commented Dec 13, 2017

When vs-mef encounters this graph error:

Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextEditorFactoryService.WpfTextViewCreationListeners: is not assignable from exported MEF value Microsoft.PythonTools.Django.Intellisense.TemplateTextViewConnectionListener.
   part definition Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextEditorFactoryService 

EXPECTED

The TemplateTextViewConnectionListener MEF part should be rejected from the graph, as that is where the fault lies.

The graph analysis justification for this may be any or all of the following reasons:

  1. WpfTextEditorFactoryService has the [ImportMany] attribute, suggesting it's in a more vulnerable position to bad actors, and should not be penalized when one exists.
  2. The import site's type identity strings matches the import element type, which is a very strong indicator that it is correct.

ACTUAL

vs-mef throws out the WpfTextEditorFactoryService instead.

@ZoeyR
Copy link
Contributor

ZoeyR commented Mar 28, 2018

This would have to be a backwards incompatible change. TemplateTextViewConnectionListener could export itself as multiple types. If it is rejected from the graph then it will break components that imported it as one of the other types it was exported as.

AArnott added a commit that referenced this issue Jun 7, 2022
Stop passing $(System.AccessToken) as an arg in AzP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants