dub icon indicating copy to clipboard operation
dub copied to clipboard

Additive flags vs overriding flags

Open John-Colvin opened this issue 9 years ago • 3 comments

Some flags are always additive (e.g. sourcePaths) and some override (e.g. targetType).

Unfortunately that means that you can't define a configuration that doesn't include the global sourcePaths, which is particularly annoying when those are implicitly the defaults (source/src).

John-Colvin avatar Dec 09 '16 14:12 John-Colvin

It should be possible to specify "sourcePaths": [] or sourcePaths /* no etries */ to avoid using the default paths. DUB only infers them if nothing has otherwise been set: https://github.com/dlang/dub/blob/0e9ddcf03a2bb1671eb04e7b3b86a135edee07af/source/dub/package_.d#L625-L634

Both, the JSON parser and the SDLang parser will create an empty list if no paths are specified: https://github.com/dlang/dub/blob/0e9ddcf03a2bb1671eb04e7b3b86a135edee07af/source/dub/recipe/sdl.d#L307

s-ludwig avatar Dec 19 '16 00:12 s-ludwig

@John-Colvin : Is there something actionable here ? @s-ludwig 's comment should work AFAIK.

Geod24 avatar Jan 19 '24 12:01 Geod24

Documentation is actionable

John-Colvin avatar Jan 19 '24 13:01 John-Colvin