On Tuesday, 8 April 2025 at 14:27:24 UTC, Jonathan M Davis wrote:
I would assume that you need to create a similar build config
which doesn't use -w (though really, -w should be gotten rid
of, because it causes a variety of problems, and thanks to how
code introspection works, it can actually affect how your code
compiles). From what, I've seen, that's typically what you need
to do when you want to change the flags for a dub build. It
_might_ be possible to redefine one of the standard build
configs - in this case, docs - but I don't think that I've
succeeded when I've tried that in the past (though I haven't
tried recently).
Like this, yes?
```sdl
configuration "docs" {
buildRequirements "allowWarnings"
}
```
This is similar to how I add dflags to `unittest` builds.
If I do this in my `dub.{sdl,json}`, it doesn't carry to
dependencies, despite `dub build -b docs` being called in my
project root. It seems like dependencies build individually as
separate steps, each in their own `configuration "docs"` and/or
global `buildRequirements`. I have to clone each failing one and
modify their `dub.json` manually, or in practice fork them if I
want to build docs (to check for errors) as part of CI.
Is there no other way?