Add option to show deprecated errors as warnings #1185

Merged
merged 1 commit into from Nov 12, 2012

Projects

None yet

4 participants

@llucax
Contributor
llucax commented Oct 15, 2012

The new option -di treats deprecation errors as informational warnings,
just like -wi show warnings as informational messages without triggering
errors.

Tests that required -d are updated to use -di options too to ensure -d
and -di works exactly the same (except for the compiler messages). Test
that didn't really required -d to run (usually obscure bugs only
triggered with -d), are now using both -d and -di as PERMUTE_ARGS
instead of REQUIRED_ARGS, so the are more generally tested.

@llucax
Contributor
llucax commented Oct 15, 2012

BTW, I think that now that we have deprecations with messages, the -di options makes perfect sense to avoid having the "soft-deprecation" hacks in phobos.

@llucax
Contributor
llucax commented Oct 26, 2012

This depends on #1222 to compile in win32 because of a tester bug.

@yebblies yebblies and 1 other commented on an outdated diff Oct 27, 2012
src/mars.c
@@ -527,6 +531,8 @@ int tryMain(int argc, char *argv[])
{
if (strcmp(p + 1, "d") == 0)
global.params.useDeprecated = 1;
+ else if (strcmp(p + 1, "di") == 0)
@yebblies
yebblies Oct 27, 2012 Member

Indentation

@llucax
llucax Oct 27, 2012 Contributor

Thanks! Fixed.

Leandro Lucarella Add option to show deprecated errors as warnings
The new option -di treats deprecation errors as informational warnings,
just like -wi show warnings as informational messages without triggering
errors.

Tests that required -d are updated to use -di options too to ensure -d
and -di works exactly the same (except for the compiler messages). Test
that didn't really required -d to run (usually obscure bugs only
triggered with -d), are now using both -d and -di as PERMUTE_ARGS
instead of REQUIRED_ARGS, so the are more generally tested.
5881617
@WalterBright WalterBright merged commit b67fbdb into dlang:master Nov 12, 2012

1 check passed

default Pass: 9
Details
@leandro-lucarella-sociomantic

Thanks! :D

@llucax llucax deleted the llucax:deprecation-warnings branch Jan 3, 2013
@llucax
Contributor
llucax commented Jan 3, 2013

Just for documentation purposes, bare in mind that this pull request was modified by #1287 (flags are now -de and -dw).

@llucax llucax referenced this pull request in dlang/dlang.org Jan 4, 2013
Merged

Document -de and -dw flags #232

@timotheecour timotheecour pushed a commit to timotheecour/dlang.org that referenced this pull request Dec 4, 2013
@llucax llucax Document -de and -dw flags
Document changes introduced by:
dlang/dmd#1185
dlang/dmd#1287
0ac2871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment