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

Nullable's XML documentation leaks into XML docs of referencing libraries #8

Closed
rdeago opened this issue Feb 24, 2020 · 8 comments
Closed

Comments

@rdeago
Copy link

rdeago commented Feb 24, 2020

Every library that references Nullable and has XML documentation finds the latter "polluted" by the documentation for Nullable's attributes.

Although I understand that Intellisense is nice to have, I'd rather push F1 when I need an explanation on some attribute than have the attributes' documentation injected into every NuGet package I produce. Not to mention automatically-generated online docs!

I propose that XML documentation be removed completely from Nullable, as the inconveniences it brings to referencing libraries outweigh its usefulness.

@manuelroemer
Copy link
Owner

Hi, I totally agree, the documentation should not leak. I will look into this.

I‘m thinking about a potential middle ground right now which might allow to preserve the XML documentation during development: The XML doc could simply be wrapped in an #if DEBUG block. Then it would be visible during development, but would not appear in a release build (which should be used for every published library). Would this satisfy your use case?

And thanks for raising the issue! Much appreciated!

@rdeago
Copy link
Author

rdeago commented Feb 24, 2020

Looks like a good idea to me. Thanks for your quick answer!

If you don't have time to implement the change I can make a PR in a few hours.

@manuelroemer
Copy link
Owner

I should be able to make the change today when I arrive at home, but thanks for the offer!
I will notify you when it is done.

@manuelroemer
Copy link
Owner

I just uploaded the new version 1.2.1 which should fix the issue as discussed. In DEBUG builds, the XML documentation is still there for convenient development, but in RELEASE builds, it will be omitted and therefore not leak.

I have done my best to test the new version locally with a variety of project types, but I cannot cover every single kind of setup. Please feel free to tell me if the issue persists despite the changes.

@rdeago
Copy link
Author

rdeago commented Feb 25, 2020

I can confirm that the issue has been resolved. Thanks!

@AArnott
Copy link

AArnott commented Mar 15, 2020

Not to mention automatically-generated online docs!

What doc generator are you using that produces documentation for internal types from your xml file?

@rdeago
Copy link
Author

rdeago commented Mar 15, 2020

What doc generator are you using that produces documentation for internal types from your xml file?

Point taken. My main concern, however, was with the extra XML in all NuGet packages for my .NET Standard 2.0 libraries. It just shouldn't have been there. As for doc generators, I may have been mistaken.

@AArnott
Copy link

AArnott commented Mar 16, 2020

There's probably a lot of xml documentation for internal types in that file for any library that bothers to document itself. I've never heard a complaint myself. And this is just a small amount, I can't imagine why it would matter.

But the work is done to suppress it already, so water under the bridge.

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

No branches or pull requests

3 participants