dub is building docs of dependencies

Jedzia jed69 at gmx.de
Thu Dec 6 14:09:34 UTC 2018


On Wednesday, 5 December 2018 at 12:00:45 UTC, Andre Pany wrote:
> On Wednesday, 5 December 2018 at 02:08:13 UTC, Jedzia wrote:
>> dmd2-2.083.0, win
>> minimal dub init
>> with dub.json:
>> {
>> 	"description": "A minimal D application.",
>> 	"dependencies": {
>> 		"iz": "~>0.6.23"
>> 	},
>> 	"authors": [
>> 		"Jedzia"
>> 	],
>> 	"copyright": "Copyright © 2018, Jedzia",
>> 	"license": "MIT",
>> 	"name": "testdoc"
>> }
>>
>> and `dub build -b docs`
>>
>> Is it normal that dub builds the docs of dependencies (iz 
>> library in that case).
>> And if, how to build only the docs of my own project?
>
> To your dub.json you can add following line to exclude e.g. 
> arsd.cgi:
> "-ddoxFilterArgs": ["--ex", "arsd.cgi", "--min-protection", 
> "Public"],
>
> Kind regards
> André

Thank you Andre, but that refers to ddox which is badly 
applicable under windows, thanks to the "Unexpected OPTLINK 
Termination at EIP=....." problem.
A solution to this is building ddox from the repository with `dub 
build --arch=x86_64`.
With ´dub build --arch=x86_64 -b ddox´ in the minimal app above 
and your filter added(and without), the ddox build fails with the 
above error. For reasons I don't know it seems that ddox is build 
as 32bit app and OPTILINK fails.
The solution for this is to point dub to my successful built 
64bit ddox ... which I don't know how to do. If someone can 
clarify this? Thanks.

But all of that has nothing to do with the simple and essential 
task of building documentation for your project. Not for the 
dependencies, not for something else. Your project.
Don't get me wrong. I am not pissed, only lost as newbie. The 
solution or at least a hint to this problem should be stated in 
the documentation right under 
http://code.dlang.org/docs/commandline#build and should not turn 
into a research project:)

So lets dig into 
https://github.com/dlang/dub/blob/master/source/dub/commandline.d 
GeneratorSettings.m_buildType == "docs"



More information about the Digitalmars-d-learn mailing list