Code size without documentation comments and unittests

Seb via Digitalmars-d digitalmars-d at puremagic.com
Sat Feb 25 22:37:55 PST 2017


On Sunday, 26 February 2017 at 05:50:32 UTC, Andrei Alexandrescu 
wrote:
> I might be missing something, so bear with me. My current 
> understanding is:
>
> * The usual way to run stuff gotten via dub is with "dub run", 
> so that people don't need to deal with version directories and 
> complex paths such as ~/.dub/packages/dscanner-0.4.0/dscanner.
>
> * There is no easy way to get rid of the chatteroo prefacing 
> the actual output from the application. One possibility I 
> imagine is a rather gnarly sed script that prints nothing until 
> it detects '^Running ', and then starts printing everything.
>
> * There is even no --quiet option 
> (https://code.dlang.org/docs/commandline#run) with run that 
> instructs dub to not inform about things being up to date.
>
> Are these correct? In that case, dub runs afoul of the Rule of 
> Silence: the command "dub run xyz" should only output whatever 
> xyz outputs if dub takes no actual additional build steps. By 
> the RoS, there might be a --verbose flag with dmd run that 
> prints the above.
>
> What am I missing?

I think that the DUB issue list [0]
has grown immensely over the last two years as it's nearly only 
Sönke maintaining - it's not like he doesn't maintain ddox [1], 
Vibe.d [2], eventcore [3] (an abstraction for event loop 
libraries that hopefully one day finds its way to Phobos), 
std.data.json [4] (an kickass Json library), diet-ng [5] (the 
template system used by Vibe.d), tagged-algebraic [6], the DUB 
registry [7] and so on.
Moreover, Dub's issue list [0] is filled with real bugs and 
important feature requests (git support, C/C++ integration like 
Rust, ...).

That been said DUB is a build tool and it's good to be in verbose 
in case of errors and there's `-q` which you can use as expected, 
e.g:

> dub run dscanner -q -- --sloc .

It's documented in the beginning of the document you linked under 
"general options".
When it's used in the `--single` file mode (aka #!/usr/bin/env 
dub) it's quiet by default.

[0] https://github.com/dlang/dub/issues
[1] https://github.com/rejectedsoftware/ddox
[2] https://github.com/rejectedsoftware/vibe.d
[3] https://github.com/vibe-d/eventcore
[4] https://github.com/s-ludwig/std_data_json
[5] https://github.com/rejectedsoftware/diet-ng
[6] https://github.com/s-ludwig/taggedalgebraic
[7] https://github.com/dlang/dub-registry


More information about the Digitalmars-d mailing list