dub should be more command-line oriented

Seb seb at wilzba.ch
Thu Jan 11 15:37:20 UTC 2018


On Wednesday, 10 January 2018 at 15:07:40 UTC, Luís Marques wrote:
> I often feel that dub relies too much on dub.[json|sdl] and too 
> little on command-line switches. Here's the latest example:
>
> 1) Write code
> 2) Start refactoring code
> 3) Compile and run to check the partially implemented change
> 4) dub gives a warning; the warning is expected due to the 
> incomplete change; I don't care about it right now, I just want 
> to check that something related to that change works
> 5) Because of the warning, dub doesn't even finish building the 
> project
> 6) I want to force dub to build it, but there's no switch for 
> that
> 7) I have to go check the docs for what is the dub.json setting 
> that allows warnings (it's "buildRequirements": 
> ["allowWarnings"])
> 8) I change dub.json
> 9) I compile it again
>
> universe 1:
> 10) I finish the refactoring
> 11) I forget to remove the new setting
>
> universe 2:
> 10) I remove "allowWarnings" immediately
> 11) while trying to do another intermediate testing step, I get 
> another warning
> 12) goto 7 or 8

It's not well documented, but you can always overwrite DUB with 
DFLAGS:

DFLAGS="-dw" dub

It will give you a warning though, but it's justified as you 
might have `DFLAGS` set accidentally.


More information about the Digitalmars-d mailing list