adamdruppe / adrdox

41 stars 14 forks source link

version(D_Ddoc) end up being in documentation #25

Open FreeSlave opened 6 years ago

FreeSlave commented 6 years ago
///
module main;

///
interface SomeInterface
{
    void someFunc();
}

///
version(D_Ddoc){
    final class SomeClass : SomeInterface
    {
        void someFunc() {}
    }
}

void main()
{

}

Result:

screenshot from 2018-05-30 15-56-03

You can also see strange positioning of final keyword.

adamdruppe commented 6 years ago

On Wed, May 30, 2018 at 05:56:42AM -0700, Roman Chistokhodov wrote:

screenshot from 2018-05-30 15-56-03

Yeah, it doesn't give version ddoc any special treatment (you will notice any version things show up there).... not sure if I want to change that or not. Actually, I think version(ddoc) should be considered harmful and removed, but I get compatibility with the upstream.

I guess if it is present, it can just favor that maybe.

You can also see strange positioning of final keyword.

oh yeah that's a bug.

FreeSlave commented 6 years ago

Actually, I think version(ddoc) should be considered harmful and removed

What do you suggest users should do when there're two completely different implementations (depending on platform), but with the same interface?

adamdruppe commented 6 years ago

On Wed, May 30, 2018 at 06:10:03AM -0700, Roman Chistokhodov wrote:

What do you suggest users should do when there're two completely different implementations (depending on platform), but with the same interface?

Document it just like anything else then use /// ditto like you would an overload.