docs.json is incomplete

Adam D. Ruppe destructionator at
Sat Apr 11 13:13:45 UTC 2020

On Saturday, 11 April 2020 at 06:49:21 UTC, Anonymouse wrote:
> I'm trying to get docs for my project hosted, and everything 
> works, except there are entries missing. Looking at the 
> generated docs.json there's simply a lot of omitted stuff.

My site doesn't use docs.json, it goes directly from 
the source with a custom parser. So always a chance I bugged 
things up there.


this is a wholly different generator though, so my bugs won't 
affect it.

> (TL;DR: the module contains one public class and (private) two 
> structs, three free functions and one module-level mixin, but 
> only the class is shown.

It is all under a `private:` thing for this file.

Then there's a `public:` directly above the class. My doc 
generator skips private members unless you run the generator 
yourself and pass `-p` to the command line. This is impossible on 
the hosted version, but you can `dub run adrdox -- args...` 
yourself to generate the files.

I would assume the json thing does the same basically.

> I have more elaborate examples where some free functions make 
> it and some don't, showing that public/private visibility is 
> not the cause.)

Have an example there? My parser has been known to get off track 
before on things and just give up on the rest of the file. The D 
parser I have is pretty hacky.

> The fact that it is listed four times seems to have to do with 
> the use of `version(Something):` at the top of the module, to 
> allow for opt-in enabling it based on dub build configuration. 
> Commenting them out does not bring the missing stuff back.
> Is there a syntax error somewhere? I can't see it. Is the 
> docs.json generator at fault?

That repetition sounds like a bug in the other thing. Their weird 
handling of `version` is why I actually decided to write my own 

my version at least shows it kinda sanely:

class SedReplacePlugin : IRCPlugin {}

More information about the Digitalmars-d-learn mailing list