Thread overview
ddox filters out my doc
Jul 15, 2017
Jean-Louis Leroy
Jul 15, 2017
Mike Parker
Jul 15, 2017
Jean-Louis Leroy
July 15, 2017
I began to write documentation for my open method library. After googling around quite a bit, I came across the incantation:

dub build -b ddox

Problem is, it generates no doc. And I believe that it actually says so:

Performing "ddox" build using dmd for x86_64.
methods ~genesis: building configuration "library"...
Performing "debug" build using dmd for x86_64.
[...]
Running ../../../.dub/packages/ddox-0.16.2/ddox/ddox filter --min-protection=Protected --only-documented docs.json
Reading doc file...
Parsing JSON...
Filtering modules...
No name for module source/methods.d - ignoring
Writing filtered docs...

My module has a name in dub.sdl. After running ddox I see that an empty docs.json has been created in my root dir. Maybe I must put things in there? But I haven't found such a file in several dlang projects I have sought inspiration from...

Project is here: https://github.com/jll63/meth.d/tree/genesis and the exact snapshot I am using is here: https://github.com/jll63/meth.d/tree/28b3419a6f5f9936fb95e906fc990e00568a32f8
July 15, 2017
On Saturday, 15 July 2017 at 08:29:52 UTC, Jean-Louis Leroy wrote:

> My module has a name in dub.sdl.

No, it does not. That's the name of the DUB project. The module in this case is source/methods.d. I've never used ddox, but based on what I see in the readme and on looking at the ddox source where that specific error message is displayed, if I were you my first attempt at resolving this would be to add a module declaration to the top of methods.d and try again:

module methods;

import std.traits;
import...
July 15, 2017
On Saturday, 15 July 2017 at 08:55:41 UTC, Mike Parker wrote:
> On Saturday, 15 July 2017 at 08:29:52 UTC, Jean-Louis Leroy wrote:
>
>> My module has a name in dub.sdl.
>
> No, it does not. That's the name of the DUB project. The module in this case is source/methods.d. I've never used ddox, but based on what I see in the readme and on looking at the ddox source where that specific error message is displayed, if I were you my first attempt at resolving this would be to add a module declaration to the top of methods.d and try again:
>
> module methods;
>
> import std.traits;
> import...

Aaaah yes that fixed it. I suspected it was something *that* simple. Thanks a bunch.

J-L