dlang / dub

Package and build management system for D
MIT License
678 stars 227 forks source link

Additive flags vs overriding flags #1011

Open John-Colvin opened 7 years ago

John-Colvin commented 7 years ago

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).

s-ludwig commented 7 years ago

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

Geod24 commented 10 months ago

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

John-Colvin commented 10 months ago

Documentation is actionable