-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend obsolete to support multiple levels #2923
Conversation
See also issue #1456 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. Would love to see further PRs which will update DeclareObsoleteSynonym
, to be reviewed, and then indeed to see things being removed as intended.
0b9c72c
to
3172925
Compare
Codecov Report
@@ Coverage Diff @@
## master #2923 +/- ##
==========================================
- Coverage 83.8% 75.64% -8.17%
==========================================
Files 681 625 -56
Lines 346747 312674 -34073
==========================================
- Hits 290591 236518 -54073
- Misses 56156 76156 +20000
|
Hopefully all @fingolfin 's comments addressed, once tests cycle (adding a test did find a bug, where only printing the message once meant the message was never shown if the function had been called when the Info level was too low to show it). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad that adding tests revealed a bug, it once again proves the importance of tests. ;-)
The manual tests fail. |
766fc3f
to
6708c58
Compare
Obsolete warnings of level 1 will be displayed by default. Obsolete declarations taken an optional argument to set obsolete level (which defaults to 2). Obsolete warnings are now only printed once per obsolete function.
6708c58
to
b575234
Compare
One problem with the way we currently handle 'obsolete' is that normal users of GAP will never see an obsolete warning, until we delete the function (as they don't tend to increase InfoObsolete, or run with
-O
).This extends 'obsolete' into two levels, 1 and 2. Level 1 messages are always printed, level 2 messages have to be explicitly enabled.
The -O option still disables any obsolete functions from being used at all.
My long-term plan is that we would put obsolete messages in a major release at level 1 before removing them, so users would actually see a warning, and have the chance to fix their code.
If changing how InfoObsolete works upsets anyone, we could add a different variable (
InfoObsoleteSoon
?) which displayed messages about things we will delete in the future.