version(StdDoc)

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Nov 24 01:21:25 UTC 2018


On Sat, Nov 24, 2018 at 12:51:36AM +0000, Adam D. Ruppe via Digitalmars-d-learn wrote:
> On Friday, 23 November 2018 at 23:13:04 UTC, H. S. Teoh wrote:
> > There are a few cases where this is needed, e.g., to generate docs
> > for Windows-specific modules, since the website script is run on
> > Posix and the Windows APIs would not be compiled at all, leading to
> > empty docs.
> 
> Note that that is only because ddoc is a badly designed piece of
> garbage.  Good doc generators can handle that just fine.

Ddoc may have its stink points, but in this case, the stuff inside
version(Windows) blocks simply isn't compiled, so you can't expect ddoc
to do much about it.  You can't just arbitrarily ddoc everything inside
version blocks, because then you'll end up with ddocs for stuff inside
version(none) and/or conflicting docs for alternative declarations in,
say, OS-specific version blocks, or user-defined static if's.

Having said that, though, it would be nice if there was a way to tell
the compiler "please generate docs for Windows, even though you're
currently running on Posix".  Resorting to hacks like that just to
generate Phobos docs simply sux.


T

-- 
Notwithstanding the eloquent discontent that you have just respectfully expressed at length against my verbal capabilities, I am afraid that I must unfortunately bring it to your attention that I am, in fact, NOT verbose.


More information about the Digitalmars-d-learn mailing list