[Issue 18062] ddoc: Generated .html files should retain the package hierarchy

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 5 09:04:25 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=18062

Max Samukha <maxsamukha at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxsamukha at gmail.com

--- Comment #3 from Max Samukha <maxsamukha at gmail.com> ---
(In reply to SHOO from comment #2)
> LDC has a `-oq` option that solves this.
> 
> > -oq   - Write object files with fully qualified names
> 
> The `-oq` option seems to have been created for object files, but it also
> seems to have an effect on the HTML output of the document.
> This option uses dots instead of slashes for hierarchy.
> I think adding this option to dmd will help solve this issue.

But it won't solve the issue for -H? I would rather fix "-op" to use the real
module FQNs instead of source paths (now "-op" is pretty useless because it
forces you to run dmd in the source dir with the folder hierarchy exactly
mirroring the package hierarchy). And -oq would be a useful addition too.

foo.d:
module a.b.foo;
--
dmd -D -H -Dddoc -Hdimport -op whatever/path/to/test.d

would then produce:
doc/a/b/foo.html // reasonable folder structure
import/a/b/foo.di // autoimport would work as expected


dmd -D -Dddoc -oq whatever/path/to/test.d:
doc/a.b.test.html

--


More information about the Digitalmars-d-bugs mailing list