-
Notifications
You must be signed in to change notification settings - Fork 393
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
load doc comments from xml files when available #1047
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brettfo
force-pushed
the
xml-doc-comments
branch
from
February 9, 2021 21:21
e4fca0b
to
a816df4
Compare
jonsequitur
reviewed
Feb 9, 2021
src/Microsoft.DotNet.Interactive.Tests/LanguageServices/SignatureHelpTests.cs
Outdated
Show resolved
Hide resolved
jonsequitur
reviewed
Feb 9, 2021
jonsequitur
reviewed
Feb 9, 2021
src/Microsoft.DotNet.Interactive.Tests/LanguageServices/HoverTextTests.cs
Outdated
Show resolved
Hide resolved
brettfo
force-pushed
the
xml-doc-comments
branch
from
February 16, 2021 20:39
a816df4
to
90c0fdc
Compare
brettfo
force-pushed
the
xml-doc-comments
branch
from
February 16, 2021 20:41
90c0fdc
to
2f83621
Compare
brettfo
commented
Feb 16, 2021
return new CachingMetadataResolver(SearchPaths, baseDirectory); | ||
} | ||
|
||
public ImmutableArray<string> SearchPaths => _resolver.SearchPaths; | ||
|
||
public string BaseDirectory => _resolver.BaseDirectory; | ||
|
||
internal static PortableExecutableReference ResolveReferenceWithXmlDocumentationProvider(string path, MetadataReferenceProperties properties = default(MetadataReferenceProperties)) | ||
{ | ||
var peReference = MetadataReference.CreateFromFile(path, properties, XmlDocumentationProvider.CreateFromFile(Path.ChangeExtension(path, ".xml"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately, this was the real fix; the rest was just plumbing.
jonsequitur
reviewed
Feb 16, 2021
src/Microsoft.DotNet.Interactive.Tests/LanguageServices/SignatureHelpTests.cs
Outdated
Show resolved
Hide resolved
jonsequitur
reviewed
Feb 16, 2021
src/Microsoft.DotNet.Interactive.Tests/LanguageServices/SignatureHelpTests.cs
Outdated
Show resolved
Hide resolved
…ureHelpTests.cs Co-authored-by: Jon Sequeira <jonsequeira@gmail.com>
…ureHelpTests.cs Co-authored-by: Jon Sequeira <jonsequeira@gmail.com>
jonsequitur
approved these changes
Feb 16, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This loads doc comments from
.xml
files that are next to.dll
files and ensures that data is passed through to the events.For all the currently supported language services (completion, hover, sighelp) I've added tests that cover retrieving doc comments from (source, assembly reference, NuGet package).
Filed issue #1071 to track some edge cases around NuGet and C# doc comments.
Filed issue #1072 to track loading doc comments from BCL/Framework types.
Fixes #626 (added test).
Fixes #628 (added test).
Fixes #727 (added test).