Skip to content
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

Various changes related to obsolete symbols #1452

Merged
merged 5 commits into from
Jul 12, 2017

Conversation

fingolfin
Copy link
Member

No description provided.

Instead, just say they might be removed in "a future release".
Which we might or might not do...
Previously we used CALL_WITH_CATCH, which is (a) undocumented, and (b)
does additional things we don't actually want here.
@codecov
Copy link

codecov bot commented Jun 26, 2017

Codecov Report

Merging #1452 into master will decrease coverage by 1.88%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #1452       +/-   ##
==========================================
- Coverage   63.79%   61.9%    -1.89%     
==========================================
  Files        1009     533      -476     
  Lines      337592   84317   -253275     
  Branches    13483   13453       -30     
==========================================
- Hits       215375   52200   -163175     
+ Misses     119253   29167    -90086     
+ Partials     2964    2950       -14
Impacted Files Coverage Δ
src/system.c 50.08% <0%> (-3.79%) ⬇️
src/c_oper1.c 87.32% <0%> (-0.89%) ⬇️
src/scanner.c 69.5% <0%> (-0.77%) ⬇️
src/intfuncs.c 90.36% <0%> (-0.63%) ⬇️
src/hpc/threadapi.c 32.14% <0%> (-0.6%) ⬇️
src/hpc/thread.c 46.24% <0%> (-0.51%) ⬇️
src/finfield.c 86.83% <0%> (-0.42%) ⬇️
src/stats.c 72.34% <0%> (-0.4%) ⬇️
src/hpc/traverse.c 79.45% <0%> (-0.39%) ⬇️
src/tietze.c 83.74% <0%> (-0.38%) ⬇️
... and 522 more

Copy link
Member

@olexandr-konovalov olexandr-konovalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR submitted without description - I have asked a couple of questions where it was not clear for me why it does so.

detect that an obsolete variable is used at runtime (this detection is
possible, however, only for obsolete variables declared using
<C>DeclareObsoleteSynonym</C>).
detect that an obsolete variable is used at runtime.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why the limitation of using DeclareObsoleteSynonym may be dropped.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no limitation here being dropped. Rather, what happens is this: Some official documentation references to an unofficial and undocumented internal function DeclareObsoleteSynonym, which it should not do. I then tried to rephrase the parens to not use it, but that made it realize that it actually does not convey much if any useful information to the user; in summary, the only thing the user might learn is that sometimes, we might fail to detect use of an obsolete, for reasons the user has no chance to understand ("so what is this DeclareObsoleteSynonym? And why don't they always use it?).

However, re-reading it again now, I realize another issue with this paragraph: It refers to "variables", which is highly misleading. Sure, from a purely technical point of view, it is correct, because things like Group and IsGroup are strictly speaking variables which contain or reference functions, filters, etc.

But a user may very well read this as "global variable". Which is ironic, because that's the only kind of obsolete object we currently cannot warn about it being used.

So, I think this paragraph should instead refer to "functions" (or perhaps "functions, operation, properties, attributes, filters, ..." ?!).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or perhaps change it to obsolete identifier, then explain that we cannot resp. "do not warn about obsolete identifiers for global variables, only for global functions, operations, attributes and properties".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had no chance to comment back on this, and now the PR has been merged without further discussions. Perhaps documenting DeclareObsoleteSynonym and leaving the text as it was would also be an option.

@@ -76,9 +76,9 @@
## <#/GAPDoc>
##

BIND_GLOBAL( "DeclareObsoleteSynonym", function( name_obsolete, name_current, desc )
BIND_GLOBAL( "DeclareObsoleteSynonym", function( name_obsolete, name_current )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I understand this as that you're suggesting not to specify the version in which it may be deleted, just because it's not guaranteed to happen.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not just |not guaranteed", it is completely unclear whether it'll ever happen. If we leave a value in, somebody has to take care of updating it before it becomes obsolete -- which clearly here did not happen.

And as long as these are used by lots of packages, realistically we are not going to make them go away.

If we ever have a concrete plan for phasing out obsolete identifiers, we can still re-introduce warnings referencing specific versions -- if that'll be necessary by that hypothetical plan.

@@ -879,18 +879,6 @@ end );

#############################################################################
##
#F USER_HOME_EXPAND
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to check, are you sure it's not used anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USER_HOME_EXPAND is not being removed, just switched to using DeclareObsoleteSynonym.

@markuspf markuspf merged commit 50a6db9 into gap-system:master Jul 12, 2017
@fingolfin fingolfin deleted the mh/obsolete branch July 12, 2017 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants