docs.json is incomplete

Anonymouse zorael at
Sat Apr 11 14:49:17 UTC 2020

On Saturday, 11 April 2020 at 13:13:45 UTC, Adam D. Ruppe wrote:
> On Saturday, 11 April 2020 at 06:49:21 UTC, Anonymouse wrote:
>> (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 makes sense.

>> 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.

onBusMessage is private like the other functions, but it shows 
up. (Additionally the public imports are private.)

In,,,,, ...; in 
nearly all modules listed in private 
members are partly included.

The idea is for every plugin module to only expose the public 
IRCPlugin class and hide the rest. Some, correctly then, only 
show the plugin (e.g.

>> 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 parser!
> my version at least shows it kinda sanely:
> version(WithSedReplacePlugin)
> class SedReplacePlugin : IRCPlugin {}

Yeah, I like yours more, I just imagined it used docs.json too.

More information about the Digitalmars-d-learn mailing list