Thread overview
[Issue 18062] ddoc: Generated .html files should retain the package hierarchy
Dec 11, 2017
Jonathan M Davis
Sep 23, 2019
SHOO
Oct 05, 2019
Max Samukha
Oct 17, 2019
Mike Parker
Dec 17, 2022
Iain Buclaw
Jan 11, 2023
Dlang Bot
December 11, 2017
https://issues.dlang.org/show_bug.cgi?id=18062

--- Comment #1 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
Upon further reflection, while in principle, I definitely prefer having folders over using underscores to replace slashes, the underscores solution works a lot better with stuff like css files, since then you don't have to worry about figuring out a way to keep track of where in the package hierarchy you are and thus what the adjusted relative path would be to something like the css directory.

--
September 23, 2019
https://issues.dlang.org/show_bug.cgi?id=18062

SHOO <zan77137@nifty.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zan77137@nifty.com

--- Comment #2 from SHOO <zan77137@nifty.com> ---
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.

--
October 05, 2019
https://issues.dlang.org/show_bug.cgi?id=18062

Max Samukha <maxsamukha@gmail.com> changed:

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

--- Comment #3 from Max Samukha <maxsamukha@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

--
October 17, 2019
https://issues.dlang.org/show_bug.cgi?id=18062

Mike Parker <aldacron@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldacron@gmail.com

--- Comment #4 from Mike Parker <aldacron@gmail.com> ---
A bounty has been set on this issue:

https://www.flipcause.com/secure/cause_pdetails/NjU3MTU=

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=18062

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
January 11, 2023
https://issues.dlang.org/show_bug.cgi?id=18062

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
@ichordev created dlang/dmd pull request #14804 "fix Issue 18062 - ddoc: Generated .html files should retain the package hierarchy " fixing this issue:

- fix Issue 18062 - ddoc: Generated .html files should retain the package hierarchy

  Added a command-line option for generating docs with different file
structures.

https://github.com/dlang/dmd/pull/14804

--