-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit the number of deprecation messages by default
- Loading branch information
Showing
10 changed files
with
78 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Deprecation warnings are now also limited by `-verrors` | ||
|
||
By default, the compiler stops after 20 error messages, unless a different amount is specified by passing e.g. `-verrors=50` or `-verrors=0` for no limit. | ||
This error limit now also applies to deprecation messages, so the command line isn't flooded with hundreds of them when compiling a big project that hasn't fixed all deprecations yet. | ||
|
||
--- | ||
deprecated void f() | ||
{ | ||
} | ||
|
||
void main() | ||
{ | ||
f(); | ||
f(); | ||
f(); | ||
f(); | ||
} | ||
--- | ||
|
||
$(CONSOLE | ||
> dmd -verrors=3 app.d | ||
app.d(7): Deprecation: function `deprecationlimit.x` is deprecated | ||
app.d(8): Deprecation: function `deprecationlimit.x` is deprecated | ||
app.d(9): Deprecation: function `deprecationlimit.x` is deprecated | ||
1 deprecation warning omitted, use `-verrors=0` to show all | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
REQUIRED_ARGS: -verrors=3 | ||
TEST_OUTPUT: | ||
--- | ||
compilable/deprecationlimit.d(18): Deprecation: function `deprecationlimit.f` is deprecated | ||
compilable/deprecationlimit.d(19): Deprecation: function `deprecationlimit.f` is deprecated | ||
compilable/deprecationlimit.d(20): Deprecation: function `deprecationlimit.f` is deprecated | ||
1 deprecation warning omitted, use `-verrors=0` to show all | ||
--- | ||
*/ | ||
|
||
deprecated void f() | ||
{ | ||
} | ||
|
||
void main() | ||
{ | ||
f(); | ||
f(); | ||
f(); | ||
f(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// PERMUTE_ARGS: | ||
// REQUIRED_ARGS: -unittest | ||
// REQUIRED_ARGS: -unittest -verrors=0 | ||
|
||
/* | ||
TEST_OUTPUT: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters