dub
dub copied to clipboard
debugMode wrongly documented
The build option debugMode is wrongly documented.
https://github.com/dlang/dub/blob/cdf858029d8a6fa9052b49c0f82bb0ed02bf9690/source/dub/compilers/buildsettings.d#L354 It says "Compile in debug mode (enables contracts, -debug)"
But all it does is enabling -debug
and what the debug flag is doing is NOT enabling contracts: https://p0nce.github.io/d-idioms/#So-what-does--debug-do,-exactly?
From DMD command line: "compile in debug code"
This is the only thing that -debug does: debug clauses, and debug identifiers.
Edited with permalink (press y to get it - It also displays code inline).
The way I understand this, the intent is for it to be a "debug mode" (literally). AFAIK, contracts are enabled when debugMode is used, because they are enabled by default. In which case does debugMode not lead to contracts being enabled ?
You can have BuildOptions.debugMode and BuildOptions.releaseMode at once, and the second disable the contracts.