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

improve warning message about global namespace class #457

Merged
merged 2 commits into from
Jul 5, 2016
Merged

improve warning message about global namespace class #457

merged 2 commits into from
Jul 5, 2016

Conversation

superyyrrzz
Copy link
Contributor

@@ -130,9 +130,10 @@ public override MetadataItem VisitAssembly(IAssemblySymbol symbol)
item.Type = MemberType.Assembly;
_references = new Dictionary<string, ReferenceItem>();
var namespaces = symbol.GlobalNamespace.GetNamespaceMembers().ToList();
if (namespaces.Count == 0)
var allMembers = symbol.GlobalNamespace.GetMembers().ToList();
Copy link
Contributor

Choose a reason for hiding this comment

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

how about getting the non namespace members directly?

@ansyral
Copy link
Contributor

ansyral commented Jul 4, 2016

👍

{
Logger.LogWarning($"No namespace is found in assembly {symbol.MetadataName}. DocFX currently only supports generating metadata with namespace defined.");
Logger.LogWarning($"DocFX currently only supports generating metadata with namespace defined. The following types in assembly \"{symbol.MetadataName}\" will have no metadata generated: {string.Join(", ", allMembers.Except(namespaces).Select(m => m.MetadataName))}. ");
Copy link
Contributor

Choose a reason for hiding this comment

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

how about using \n{string.Join("\t")} to make warning message more readable when there're too many non namespace members?

@hellosnow
Copy link
Contributor

:shipit:

@vwxyzh
Copy link
Contributor

vwxyzh commented Jul 4, 2016

👍

1 similar comment
@qinezh
Copy link
Contributor

qinezh commented Jul 4, 2016

👍

@superyyrrzz superyyrrzz merged commit 810ec11 into dotnet:dev Jul 5, 2016
@superyyrrzz superyyrrzz deleted the warning branch July 5, 2016 00:57
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.

DocFX currently only supports generating metadata with namespace defined
6 participants