Code size without documentation comments and unittests

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 26 06:09:22 PST 2017


On 2017-02-26 06:50, Andrei Alexandrescu wrote:
> On 2/25/17 2:55 PM, Timothee Cour via Digitalmars-d wrote:
>> Try dscanner --sloc although IMO --tokenCount should be the most
>> relevant metric (only caveat is mixin strings with which one could cheat
>> to make token count smaller).
>
> Thanks, got that working with ease. The operation of dub has gotten
> quite a bit smoother, props to Sönke!
>
> One thing that I found surprising is the chatter that seems impossible
> to mute. Here's a session:
>
> $ dub run dscanner -- --sloc ../phobos/std/traits.d
> Building package dscanner in /Users/andrei/.dub/packages/dscanner-0.4.0/
> Target libdparse 0.7.0 is up to date. Use --force to rebuild.
> Target emsi_containers 0.5.3 is up to date. Use --force to rebuild.
> Target dsymbol 0.2.0 is up to date. Use --force to rebuild.
> Target inifiled 0.0.6 is up to date. Use --force to rebuild.
> Target dscanner 0.4.0 is up to date. Use --force to rebuild.
> Running ../../.dub/packages/dscanner-0.4.0/dscanner --sloc
> ../phobos/std/traits.d
> ../phobos/std/traits.d:    3747
> total:    3747
>
> 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?

Dub is not intended for end user installation of programs/tools. The 
system package manager should be used for that.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list