digitalmars.D - Rebuilding phobos' ddox after a change
- Andrei Alexandrescu (15/15) Sep 16 2016 So I changed one file in phobos and then went to the dlang.org tree and
- Vladimir Panteleev (19/26) Sep 16 2016 There are two issues here:
So I changed one file in phobos and then went to the dlang.org tree and issued "make". The old-style ddoc was rebuilt, but the ddox was not. I recall this has been an issue for a while now. What is a reasonable fix? The last line output by the process says "To force a rebuild of up-to-date targets, run again with --force." which gives a suggestion. I tried the workaround to pass --always-make to make, but then I got this: fatal: destination path '../druntime' already exists and is not an empty directory issued by "git clone". We should probably only use git clone only if a dir doesn't exist, and use git pull otherwise. My only recourse right now is to issue "make clean; make", which is inefficient if I do it many times. Could someone please look into this? Thanks, Andrei
Sep 16 2016
On Friday, 16 September 2016 at 13:36:38 UTC, Andrei Alexandrescu wrote:So I changed one file in phobos and then went to the dlang.org tree and issued "make". The old-style ddoc was rebuilt, but the ddox was not.There are two issues here: 1. The dlang.org makefile does not know the full set of files in Phobos, or how they map to .html files. Currently this is worked around by a recursive make invocation (we invoke the Phobos posix.mak and ask it to build the docs, if needed). 2. The makefiles do not know how Phobos .d files map to DDox .html files. In fact, the Phobos makefile (which knows what the Phobos .d files are) does not know anything about DDox at all. Though, I believe that currently DDox gets all information from DMD's .json output, which is obtained by globbing for *.d files in the Phobos directory.I recall this has been an issue for a while now. What is a reasonable fix?In theory, it would be possible to fix this by adding a DDox feature to generate a Makefile include, which would represent the mappings between .d files and generated .html files, similar to rdmd's --makedepend.My only recourse right now is to issue "make clean; make", which is inefficient if I do it many times.According to the makefile, deleting docs-prerelease.json should force "make" to rebuild the DDox documentation.
Sep 16 2016