OS Platform and distribution: EndeavourOS/Arch Linux x86_64
compiler version: dmd 2.105.0
Bug Description
When building a package with -b docs, all of its dependencies are also built this way, and any warnings in them (e.g. parameter mismatches) will halt the process if the failing dependency'sdub.sdl doesn't have buildRequirements "allowWarnings". Even if you add it to your own dub.sdl, it will still exit if the dependency at fault doesn't have it too. There is no way for you to build your docs until the dependency fixes its source. Not even DFLAGS=-wi seems to work.
How to reproduce?
Create a local targetType library dub package (e.g. a) and do --add-local to add it
Intentionally document a function in it wrong, such as a parameter count mismatch
Create a second targetType executable dub package (e.g. b)
Add the library package a as a dependency to b
Build b docs with dub build -b docs
Get "Error: warnings are treated as errors" due to a bad ddoc
Expected Behavior
One of...
Dependencies' docs aren't also built? I just want b docs
Dependencies' docs warnings are gagged unconditionally
A configuration "docs" with buildRequirements "allowWarnings" in the importing package (e.g. b) applies to dependencies' warnings too. Not ideal though.
~/src/tests/b $ dub build -b docs
Starting Performing "docs" build using /usr/bin/dmd for x86_64.
Building a ~master [library]
../a/source/lib.d(10,6): Warning: Ddoc: function declaration has no parameter 'bar'
../a/source/lib.d(10,6): Warning: Ddoc: parameter count mismatch, expected 1, got 2
Error: warnings are treated as errors
Use -wi if you wish to treat warnings only as informational.
Error /usr/bin/dmd failed with exit code 1.
System information
Bug Description
When building a package with
-b docs
, all of its dependencies are also built this way, and any warnings in them (e.g. parameter mismatches) will halt the process if the failing dependency'sdub.sdl
doesn't havebuildRequirements "allowWarnings"
. Even if you add it to your owndub.sdl
, it will still exit if the dependency at fault doesn't have it too. There is no way for you to build your docs until the dependency fixes its source. Not evenDFLAGS=-wi
seems to work.How to reproduce?
a
) and do--add-local
to add itb
)a
as a dependency tob
b
docs withdub build -b docs
"Error: warnings are treated as errors"
due toa
bad ddocExpected Behavior
b
docs"docs"
withbuildRequirements "allowWarnings"
in the importing package (e.g.b
) applies to dependencies' warnings too. Not ideal though.Logs
a/dub.sdl
:a/source/lib.d
:b/dub.sdl
:b/source/app.d
:Building
b
docs: