Jump to page: 1 2
Thread overview
Generating documentation help
Jan 17, 2021
Tim
Jan 17, 2021
Paul Backus
Jan 17, 2021
Adam D. Ruppe
Jan 19, 2021
Tim
Jan 19, 2021
Adam D. Ruppe
Jan 19, 2021
Tim
Jan 20, 2021
Adam D. Ruppe
Jan 20, 2021
Tim
Jan 20, 2021
Adam D. Ruppe
Jan 20, 2021
Tim
Jan 20, 2021
Adam D. Ruppe
Jan 20, 2021
Tim
Jan 20, 2021
Adam D. Ruppe
Jan 20, 2021
Tim
January 17, 2021
Hi there,

I have a couple of (probably) fairly simple questions. First, when I generate documentation files (-Dd docs) for my project, it also generates documentation for the library Mir. How can I fix the compiler pulling in those docs as well?

It seems that D won't let me document class constructors. This is a problem as I'd like to be able to document the constructor parameters. If I put the class documentation above the class definition, then ddoc gives an error that the parameters specified can't be found.


Thanks
January 17, 2021
On Sunday, 17 January 2021 at 21:07:31 UTC, Tim wrote:
> Hi there,
>
> I have a couple of (probably) fairly simple questions. First, when I generate documentation files (-Dd docs) for my project, it also generates documentation for the library Mir. How can I fix the compiler pulling in those docs as well?
>
> It seems that D won't let me document class constructors. This is a problem as I'd like to be able to document the constructor parameters. If I put the class documentation above the class definition, then ddoc gives an error that the parameters specified can't be found.
>
>
> Thanks

DDoc has a number of annoying bugs like this, and as far as I know it isn't really maintained, so they are unlikely to be fixed any time soon. I recommend using adrdox instead:

https://code.dlang.org/packages/adrdox
January 17, 2021
On Sunday, 17 January 2021 at 21:48:20 UTC, Paul Backus wrote:
> I recommend using adrdox instead:

note you should be able to just

dub run adrdox

and it will spit out `generated_docs/files...`

(assuming i haven't broken that recently)
January 19, 2021
On Sunday, 17 January 2021 at 22:27:13 UTC, Adam D. Ruppe wrote:
> On Sunday, 17 January 2021 at 21:48:20 UTC, Paul Backus wrote:
>> I recommend using adrdox instead:
>
> note you should be able to just
>
> dub run adrdox
>
> and it will spit out `generated_docs/files...`
>
> (assuming i haven't broken that recently)

This is really amazing! However, it only lays out the documentation for modules that are being imported (useful for documenting libraries). I'm creating a u-services based app so my apps need to be documented properly as well. I can get around this by defining them as modules but then adrdox doesn't add them to index.html
January 19, 2021
On Tuesday, 19 January 2021 at 23:51:00 UTC, Tim wrote:
> I'm creating a u-services based app so my apps need to be documented properly as well. I can get around this by defining them as modules but then adrdox doesn't add them to index.html

Well, it does all .d files passed in directories given to it that have a module declaration. (And all .d files should have a module declaration anyway btw.)

If they live in different places, you can pass that too like

dub run adrdox -- . ../whatever-else

January 19, 2021
On Tuesday, 19 January 2021 at 23:57:21 UTC, Adam D. Ruppe wrote:
> On Tuesday, 19 January 2021 at 23:51:00 UTC, Tim wrote:
>> I'm creating a u-services based app so my apps need to be documented properly as well. I can get around this by defining them as modules but then adrdox doesn't add them to index.html
>
> Well, it does all .d files passed in directories given to it that have a module declaration. (And all .d files should have a module declaration anyway btw.)
>
> If they live in different places, you can pass that too like
>
> dub run adrdox -- . ../whatever-else

The main issue is that those scripts aren't being added to index.html
January 20, 2021
On Tuesday, 19 January 2021 at 23:58:59 UTC, Tim wrote:
> The main issue is that those scripts aren't being added to index.html

Do they have module definitions and doc comments in there somewhere?

like here I have all kinds of things http://dpldocs.info/experimental-docs/index.html
January 20, 2021
On Wednesday, 20 January 2021 at 00:03:16 UTC, Adam D. Ruppe wrote:
> On Tuesday, 19 January 2021 at 23:58:59 UTC, Tim wrote:
>> The main issue is that those scripts aren't being added to index.html
>
> Do they have module definitions and doc comments in there somewhere?
>
> like here I have all kinds of things http://dpldocs.info/experimental-docs/index.html

Yeah, they have both. They also contain the main entrypoint
January 20, 2021
On Wednesday, 20 January 2021 at 00:06:35 UTC, Tim wrote:
> Yeah, they have both. They also contain the main entrypoint

What are the module names? If it is like `module foo.main;` it will be listed under `foo` as a submodule rather than top-level since it is all organized by name.

(if the code is public just send a link plz and I'll take a look there)
January 20, 2021
On Wednesday, 20 January 2021 at 00:13:42 UTC, Adam D. Ruppe wrote:
> On Wednesday, 20 January 2021 at 00:06:35 UTC, Tim wrote:
>> Yeah, they have both. They also contain the main entrypoint
>
> What are the module names? If it is like `module foo.main;` it will be listed under `foo` as a submodule rather than top-level since it is all organized by name.
>
> (if the code is public just send a link plz and I'll take a look there)

Unfortunately, the code isn't public. They are defined "module simulator" and "module analyzer". I also have "module math" etc. that are added to the index, just not simulator and analyzer (which both have the main entrypoint)
« First   ‹ Prev
1 2