The current dlang.org makefile has all sorts of bells and whistles that take up tons of time and requires network access, like downloading tarballs, cloning git repos, *compiling* old compiler releases, and so forth.
Can we pretty please have an `offline` target that builds just the HTML and *nothing* else? All I want to do is to test local doc changes (spec / Phobos); I should not have to download gobs of stuff that's only relevant for the actual dlang.org site, not for local testing of doc changes.
Comment #1 by hsteoh — 2018-03-02T22:50:29Z
(Not to mention, the makefile outright fails because it makes assumptions incompatible with my system, therefore one of the compilation targets fail. Why generating HTML docs should depend on compiling a cloned remote repo escapes me.)
Comment #2 by greensunny12 — 2018-03-27T00:20:43Z
> The current dlang.org makefile has all sorts of bells and whistles that take up tons of time and requires network access, like downloading tarballs, cloning git repos, *compiling* old compiler releases, and so forth.
Note that:
- it's not an "old" compiler release, it's the current stable one (i.e. the latest release)
- all binaries etc. will only be fetched once and are put in .generated, so subsequent runs will be much faster
> Can we pretty please have an `offline` target that builds just the HTML and *nothing* else?
Hmm, it's already there for a few releases?
HTML pages (e.g. spec)
make -f posix.mak html DIFFABLE=1
Phobos pages:
make -f posix.mak phobos-prerelease
> should not have to download gobs of stuff that's only relevant for the actual dlang.org site,
The Makefile is already setup to only download and build what's needed for your selected target.
> Why generating HTML docs should depend on compiling a cloned remote repo escapes me.
We need to build the compiler once though because we now use DMD as a library in a custom Ddoc preprocessor
> Not to mention, the makefile outright fails because it makes assumptions incompatible with my system,
What are those?
Comment #3 by hsteoh — 2018-03-27T18:36:33Z
Thanks for taking the time to clarify.
I simply assumed it was downloading old releases because it needed to generate tarballs and whatnot. I've been on git master for too long, I don't even know which official release we're on anymore. :-D
Is there any way to direct it to use the locally cloned and already-built dmd instead? I mean, it seems a little excessive to have to separately clone the dmd repo when I already have one on hand.
Also, is the DIFFABLE=1 thing documented anywhere? I admit I didn't look very hard, I was just using the plain `html` target out of years of habit.
Anyway, the system incompatibility seems to have gone away with the latest git pull. I don't know if it was an actual incompatibility, or if it was caused by dub not liking it when I interrupt it with ctrl-C and then try to rebuild again afterwards, or something like that. (I know it shouldn't be a problem, but sometimes these things do happen.)
Basically, I would like to have the option of being able to build docs without network access.
Comment #4 by hsteoh — 2018-03-27T18:39:09Z
Argh, is there a way to tell the `phobos-prerelease` target to just use the local dmd repo instead of yet another remote cloning?
Comment #5 by robert.schadek — 2024-12-15T15:24:51Z