-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revised warning API: warnings can have multiple categories
and categories can have subcategories, and also be used as warning names. The terminology here means: - warning: a name with a status (off/on/error) - category: a name which contains categories and warnings, where "contain" means when it appears in the flag list it stands for all its elements. - hybrid: a name which has its own status and may also contain categories and warnings. In the implementation type `warning` is for both pure warnings and for hybrids. Type `category` internally includes some pure warnings, but the exposed API only exposes it with pure categories and hybrids. When a warning is in multiple categories (including transitively, except "all") we print all of them. This may be a bit verbose (see test changes) but still reasonable IMO. The categories would be pretty undiscoverable without this. ---------- This allows us to have more specific warning names for deprecations than just "deprecated-since-8.16". For instance with `Arith.Minus.minus_n_O` we get `deprecated-notation-since-8.16,deprecated-since-8.16,deprecated-notation,deprecated,default`. We may want to instead create the warning name based on the specific thing which is deprecated and warning_name_if_no_since instead a common category, getting something like `deprecated-Coq.Arith.Minus.minus_n_O,deprecated-notation,deprecated-since-8.16,deprecated,default`. The code would be more complex so not sure if good idea. ---------- It also makes "default" almost a normal category (the way to get included in "default" is still by the `default` argument instead of including it in the category list). BTW maybe it would be useful to have separate categories for default-off default-on and default-error?
- Loading branch information
1 parent
177cd3e
commit 8fcbbb4
Showing
99 changed files
with
732 additions
and
370 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
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
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
Oops, something went wrong.