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

harden discovery of codeCompletionProvider. #10858

Merged

Conversation

mjkkirschner
Copy link
Member

@mjkkirschner mjkkirschner commented Jul 7, 2020

Purpose

When search the appdomain for the CompletionProvider interfaces, if this linq statement encountered an exception it would bail out and fail to find the loaded completion providers. Now it does continues.

I could not figure out quick way to test this, if others believe this is required for this scenario I appreciate ideas.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.

@mjkkirschner mjkkirschner added this to the 2.7.0 milestone Jul 7, 2020
Copy link
Collaborator

@mmisol mmisol left a comment

Choose a reason for hiding this comment

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

The changes look good to me. I can't see a way to unit test this. Did you do a manual test?

{
return new Type[0];
}
}).Where(p => completionType.IsAssignableFrom(p) && !p.IsInterface);
Copy link
Collaborator

Choose a reason for hiding this comment

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

One thing we could add is an explicit call to ToList. I see loadedCodeCompletionTypes is used afterwards a couple of times.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure will do - I tested it manually.

@mjkkirschner mjkkirschner changed the title try catch harden discovery of codeCompletionProvider. Jul 7, 2020
@mjkkirschner mjkkirschner merged commit 8cd74d2 into DynamoDS:master Jul 7, 2020
@mjkkirschner mjkkirschner mentioned this pull request Jul 7, 2020
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.

3 participants