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

load doc comments from xml files when available #1047

Merged
merged 3 commits into from
Feb 16, 2021

Conversation

brettfo
Copy link
Member

@brettfo brettfo commented Feb 9, 2021

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).

dotnet-interactive.sln Outdated Show resolved Hide resolved
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")));
Copy link
Member Author

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.

brettfo and others added 2 commits February 16, 2021 13:19
…ureHelpTests.cs

Co-authored-by: Jon Sequeira <jonsequeira@gmail.com>
…ureHelpTests.cs

Co-authored-by: Jon Sequeira <jonsequeira@gmail.com>
@brettfo brettfo merged commit c3b9a2a into dotnet:main Feb 16, 2021
@brettfo brettfo deleted the xml-doc-comments branch February 16, 2021 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants