On Wednesday, 5 December 2018 at 15:55:45 UTC, Anonymouse wrote:
As far as I understand you use dub.json "-ddoxFilterArgs": [ "--ex", "pattern" ] to make ddox exclude files from the documentation it generates. However, it still parses, warns and errors out on dependencies, even if they're set up to be exempted.

1. $ dub init
[...]
Add dependency (leave empty to skip) []: requests
Added dependency requests ~>1.0.3

2. edit dub.json to include:
"-ddoxFilterArgs":    [
    "--ex", "cachetools."
]

3. $ dub build -b ddox
Performing "ddox" build using /usr/bin/dmd for x86_64.
cachetools 0.0.6: building configuration "library"...
../../../.dub/packages/cachetools-0.0.6/cachetools/source/cachetools/hash.d(14,6):
 Error: unmatched --- in DDoc comment
/usr/bin/dmd failed with exit code 1.

The offending lines look like this:
/// For classes (and structs with toHash method) we use v.toHash() to compute hash. /// -------------------------------------------------------------------------------

Am I doing it right?

The compiler (DMD) is triggered to generate a JSON file docs.json which contains technical information used by ddox in a later step. The error message you see is thrown by dmd.
At this point of time, ddoxFilterArgs isn't evaluated at all.

I assume this line causes the issue
https://github.com/ikod/cachetools/blob/master/source/cachetools/hash.d#L7
You can contact the author (via github issue) to solve the DDOC warning.

Kind regards
André

The -ddoxFilterArgs is evaluated in a later step by DDOX.

Reply via email to