dlang / ddox

Advanced D documentation engine
MIT License
62 stars 20 forks source link

Documentation is duplicated when symbol is under version(D_Ddoc) #208

Open FreeSlave opened 6 years ago

FreeSlave commented 6 years ago
/// module
module app;
import std.stdio;

version(D_Ddoc)
{
    ///
    class SomeClass
    {
        ///
        this() {}
    }

    ///
    void someFunction() {}
}

void main()
{
    writeln("Edit source/app.d to start your project.");
}

screenshot from 2018-05-27 16-13-45 screenshot from 2018-05-27 16-14-02

FreeSlave commented 6 years ago

Also example of duplication in standard library docs https://dlang.org/library/std/file/dir_entry.html

Abscissa commented 4 years ago

I'm getting this same problem even though I'm using a different version identifier name in my project (MySQLDocs) instead of D_Ddoc.

The problem appears to be compiler-related. Using ddox v0.16.12, I get this problem on DMD 2.078.0 and up. But on DMD 2.077.1 and below it works fine, with no duplicate entries. I don't know if DMD 2.078.0 introduced a bug, or if maybe it just made a change to its json doc output that ddox isn't aware of.