Add option to document private members
Removes all instances of .publicX in favor of .documentedX, to reflect that private elements can be documented if the user chooses. This came with the main change of relying on filterNonPublic (which checks Privacy.isPublic) to filterNonDocumented (checks Documentable.isDocumented). Changes some implementation to maintain current behavior
So far, I've got the smoke tests to pass. I haven't tested the new behavior nor run the full existing test suite. I'm mainly opening this PR to get the CI to run the suite for me because I've been having issues (#3095). Also open to feedback on current changes before I make even more, although I suspect the main part of the implementation is mostly done.
TODO:
- possibly remove
privateLibrariesInSidebaroption - test, test, test behavior with
documentPrivateturned on
@srawlins, can you enable the bots? I'd like them to run the tests since I can't do it locally.
@srawlins, sorry to bother you again, but the bots need their permissions renewed for some reason. Maybe because I rebased with master, not sure if that affects it.
No problem! Sorry about that, kind of weird...
Not sure why the tests failed. https://github.com/dart-lang/dartdoc/runs/7775813969 failed at check-build even though:
- running
grind builddoesn't result in a different file (at least not according to git) - running
grind check-buildon my end (Windows) passes with no errors
Also it seems the workflows need a manual approval on every commit
@srawlins, can you point out the purpose of this assert within Documentation.asHtml?
https://github.com/dart-lang/dartdoc/blob/8ee30225e2d89d6044dc48965c9ce1ec1c406cb9/lib/src/model/documentation.dart#L18-L24
It fails when a public class in a private library is being exported in the private library. But I can't figure out what it's meant to check for. It seems to be saying: "If this is not the canonical reference, then _asOneLiner must not have been generated." But... why?
(Also, is there a place off GitHub where I can ask rapid-fire questions like these? If not, that's okay too.)
can you point out the purpose of this assert within Documentation.asHtml?
Sorry for the extreme delay in responding. This code always trips me up when I look at it. I come away with more questions than I started with 😛 . I've been meaning to refactor it but I've always been afraid. Since I couldn't even answer this question without getting my hands dirty, I decided to refactor it now, haha. See https://github.com/dart-lang/dartdoc/pull/3131, and see the long comment I inserted in there which makes things hopefully more clear.