Categorization of warnings

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 29 05:52:50 PDT 2016


On 03/29/2016 03:34 PM, Steven Schveighoffer wrote:
> I think it might be simply deprecation. I can't remember.
> 
> Tested:
> 
> Yes, it is a deprecation, not a warning (compilation succeeds on -w). I
> stand corrected!

Thanks, no need for me to panic in that case :)

> This is in essence, still a warning. Just not one that fails
> compilation. It makes build messages from large projects basically
> unreadable.

There is essential difference. Warning indicates some error-prone code
and most projects do want to build with warnings enabled by default.
Deprecation is simply early indication of requested change and it is OK
for any projects to take weeks and months to clean up deprecatations as
the time allows.

The fact that deprecations don't break compilation by default is crucial
in dub ecosystem as otherwise each compiler release could make your dub
dependencies unusable until their maintainers make new release with
fixes. Deprecations provide that transitional step.

Also you can disable deprecation messages completely with `-d`.


More information about the Digitalmars-d mailing list